Skip to content

Commit

Permalink
fix: migration not possible when upgrading from version 0.3.24 and ea…
Browse files Browse the repository at this point in the history
…rlier (#931)

Co-authored-by: crwxaj <crwxaj>
  • Loading branch information
crwxaj authored Aug 21, 2022
1 parent ae1f633 commit 35eee64
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions pkg/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,20 @@ func Migrate() {
return tx.AutoMigrate(File{}).Error
},
},
{
ID: "0038-edits-applied",
Migrate: func(tx *gorm.DB) error {
type Scene struct {
EditsApplied bool `json:"edits_applied" gorm:"default:false"`
}
return tx.AutoMigrate(Scene{}).Error
},
},

// ===============================================================================================
// Put DB Schema migrations above this line and migrations that rely on the updated schema below
// ===============================================================================================

{
ID: "0024-drop-actions-old",
Migrate: func(tx *gorm.DB) error {
Expand Down Expand Up @@ -901,15 +915,6 @@ func Migrate() {
return nil
},
},
{
ID: "0038-edits-applied",
Migrate: func(tx *gorm.DB) error {
type Scene struct {
EditsApplied bool `json:"edits_applied" gorm:"default:false"`
}
return tx.AutoMigrate(Scene{}).Error
},
},
{
ID: "0039-title-size-change",
Migrate: func(tx *gorm.DB) error {
Expand Down

0 comments on commit 35eee64

Please sign in to comment.