diff options
| author | 2021-08-25 15:34:33 +0200 | |
|---|---|---|
| committer | 2021-08-25 15:34:33 +0200 | |
| commit | 2dc9fc1626507bb54417fc4a1920b847cafb27a2 (patch) | |
| tree | 4ddeac479b923db38090aac8bd9209f3646851c1 /internal/gtsmodel/statusbookmark.go | |
| parent | Manually approves followers (#146) (diff) | |
| download | gotosocial-2dc9fc1626507bb54417fc4a1920b847cafb27a2.tar.xz | |
Pg to bun (#148)
* start moving to bun
* changing more stuff
* more
* and yet more
* tests passing
* seems stable now
* more big changes
* small fix
* little fixes
Diffstat (limited to 'internal/gtsmodel/statusbookmark.go')
| -rw-r--r-- | internal/gtsmodel/statusbookmark.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/gtsmodel/statusbookmark.go b/internal/gtsmodel/statusbookmark.go index 468939bae..26dafa420 100644 --- a/internal/gtsmodel/statusbookmark.go +++ b/internal/gtsmodel/statusbookmark.go @@ -23,15 +23,15 @@ import "time" // StatusBookmark refers to one account having a 'bookmark' of the status of another account type StatusBookmark struct { // id of this bookmark in the database - ID string `pg:"type:CHAR(26),pk,notnull,unique"` + ID string `bun:"type:CHAR(26),pk,notnull,unique"` // when was this bookmark created - CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"` + CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"` // id of the account that created ('did') the bookmarking - AccountID string `pg:"type:CHAR(26),notnull"` - Account *Account `pg:"rel:belongs-to"` + AccountID string `bun:"type:CHAR(26),notnull"` + Account *Account `bun:"rel:belongs-to"` // id the account owning the bookmarked status - TargetAccountID string `pg:"type:CHAR(26),notnull"` - TargetAccount *Account `pg:"rel:has-one"` + TargetAccountID string `bun:"type:CHAR(26),notnull"` + TargetAccount *Account `bun:"rel:belongs-to"` // database id of the status that has been bookmarked - StatusID string `pg:"type:CHAR(26),notnull"` + StatusID string `bun:"type:CHAR(26),notnull"` } |
