From d895e5fd7f082d4a97bdf38cc01c60ce1e783715 Mon Sep 17 00:00:00 2001 From: "kim (grufwub)" Date: Fri, 10 Sep 2021 08:30:54 +0100 Subject: [PATCH] add nullzero back to accountid tag Signed-off-by: kim (grufwub) --- internal/gtsmodel/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go index a6ca90ed8..ef4b66ecf 100644 --- a/internal/gtsmodel/account.go +++ b/internal/gtsmodel/account.go @@ -29,7 +29,7 @@ import ( // Account represents either a local or a remote fediverse account, gotosocial or otherwise (mastodon, pleroma, etc). type Account struct { - ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,notnull,unique"` // id of this item in the database + ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // id of this item in the database CreatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item created UpdatedAt time.Time `validate:"-" bun:"type:timestamp,nullzero,notnull,default:current_timestamp"` // when was item last updated Username string `validate:"required" bun:",nullzero,notnull,unique:userdomain"` // Username of the account, should just be a string of [a-zA-Z0-9_]. Can be added to domain to create the full username in the form ``[username]@[domain]`` eg., ``user_96@example.org``. Username and domain should be unique *with* each other