mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 17:28:06 -06:00
[bugfix] Replace named unique constraint on header filter header with generic unique directive (#2525)
* [bugfix] Replace named unique constraint on header filter header with generic unique directive * add migration retry * the old fixie uppie * fix constraint name * my goodness
This commit is contained in:
parent
02668756a7
commit
07aee57af2
2 changed files with 117 additions and 2 deletions
|
|
@ -45,8 +45,8 @@ type HeaderFilterBlock struct{ HeaderFilter }
|
|||
// matching regex, and details about its creation.
|
||||
type HeaderFilter struct {
|
||||
ID string `bun:"type:CHAR(26),pk,nullzero,notnull,unique"` // ID of this item in the database
|
||||
Header string `bun:",nullzero,notnull,unique:header_regex"` // Request header this filter pertains to
|
||||
Regex string `bun:",nullzero,notnull,unique:header_regex"` // Request header value matching regular expression
|
||||
Header string `bun:",nullzero,notnull"` // Canonical request header this filter pertains to.
|
||||
Regex string `bun:",nullzero,notnull"` // Request header value matching regular expression.
|
||||
AuthorID string `bun:"type:CHAR(26),nullzero,notnull"` // Account ID of the creator of this filter
|
||||
Author *Account `bun:"-"` // Account corresponding to AuthorID
|
||||
CreatedAt time.Time `bun:"type:timestamptz,nullzero,notnull,default:current_timestamp"` // when was item created
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue