Skip to content

Commit

Permalink
refresh migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Shandling committed Jan 8, 2025
1 parent a41be09 commit 394c89b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20250103112935, Down_20250103112935)
MigrationClient.AddMigration(Up_20250107165731, Down_20250107165731)
}

func Up_20250103112935(tx *sql.Tx) error {
func Up_20250107165731(tx *sql.Tx) error {
_, err := tx.Exec(`ALTER TABLE users ADD COLUMN settings json NOT NULL DEFAULT (JSON_OBJECT())`)
if err != nil {
return fmt.Errorf("failed to add settings to users: %w", err)
}
return nil
}

func Down_20250103112935(tx *sql.Tx) error {
func Down_20250107165731(tx *sql.Tx) error {
return nil
}
Loading

0 comments on commit 394c89b

Please sign in to comment.