fix(add_pats): fix name of column (#7026)

This commit is contained in:
Vibhu Pandey 2025-02-05 11:02:17 +05:30 committed by GitHub
parent aecbb71ce4
commit 035999250e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,11 +56,10 @@ func (migration *addPats) Up(ctx context.Context, db *bun.DB) error {
return err
}
// table:rules op:add column created_at
if _, err := db.
NewAddColumn().
Table("personal_access_tokens").
ColumnExpr("role test not null default 'ADMIN'").
ColumnExpr("role TEXT NOT NULL DEFAULT 'ADMIN'").
Apply(WrapIfNotExists(ctx, db, "personal_access_tokens", "role")).
Exec(ctx); err != nil && err != ErrNoExecute {
return err