Skip to content

Commit

Permalink
Another type->check conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Dec 31, 2024
1 parent b9fd215 commit cf5369c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/database/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,7 @@ var migrations = []func(tx *sql.Tx, driver string) error{
},
func(tx *sql.Tx, _ string) (err error) {
sql := `
CREATE TYPE entry_sorting_order AS enum('published_at', 'created_at');
ALTER TABLE users ADD COLUMN entry_order entry_sorting_order default 'published_at';
ALTER TABLE users ADD COLUMN entry_order text CHECK(entry_order in ('published_at', 'created_at')) default 'published_at';
`
_, err = tx.Exec(sql)
return err
Expand Down

0 comments on commit cf5369c

Please sign in to comment.