summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-01-05 12:37:50 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-05 12:37:50 +0100
commitff46dd485aa3e4ae5114de71405b9de4123ef59b (patch)
treea75f0602dab317fda8bda4d0e0e8a397cad51b12
parent[bugfix/frogend] replace ch units to prevent layout shift on page load (#1301) (diff)
downloadgotosocial-ff46dd485aa3e4ae5114de71405b9de4123ef59b.tar.xz
[chore] Fix emoji notnull constraint on initial gtsmodel (#1303)
-rw-r--r--internal/db/bundb/migrations/20211113114307_init/emoji.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/bundb/migrations/20211113114307_init/emoji.go b/internal/db/bundb/migrations/20211113114307_init/emoji.go
index 860eb46c8..cef8dd02e 100644
--- a/internal/db/bundb/migrations/20211113114307_init/emoji.go
+++ b/internal/db/bundb/migrations/20211113114307_init/emoji.go
@@ -26,7 +26,7 @@ type Emoji struct {
CreatedAt time.Time `validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created
UpdatedAt time.Time `validate:"-" bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item last updated
Shortcode string `validate:"required" bun:",nullzero,notnull,unique:shortcodedomain"` // String shortcode for this emoji -- the part that's between colons. This should be lowercase a-z_ eg., 'blob_hug' 'purple_heart' Must be unique with domain.
- Domain string `validate:"omitempty,fqdn" bun:",notnull,default:'',unique:shortcodedomain"` // Origin domain of this emoji, eg 'example.org', 'queer.party'. empty string for local emojis.
+ Domain string `validate:"omitempty,fqdn" bun:",nullzero,default:'',unique:shortcodedomain"` // Origin domain of this emoji, eg 'example.org', 'queer.party'. empty string for local emojis.
ImageRemoteURL string `validate:"required_without=ImageURL,omitempty,url" bun:",nullzero"` // Where can this emoji be retrieved remotely? Null for local emojis.
ImageStaticRemoteURL string `validate:"required_without=ImageStaticURL,omitempty,url" bun:",nullzero"` // Where can a static / non-animated version of this emoji be retrieved remotely? Null for local emojis.
ImageURL string `validate:"required_without=ImageRemoteURL,required_without=Domain,omitempty,url" bun:",nullzero"` // Where can this emoji be retrieved from the local server? Null for remote emojis.