Skip to content

Commit

Permalink
fixed executing empty statements
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 22, 2023
1 parent 35e9224 commit ff4d949
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/backend/migration/20200000000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ func (m TumDBMigrator) migrate20200000000000() *gormigrate.Migration {
ID: "20200000000000",
Migrate: func(tx *gorm.DB) error {
for _, line := range strings.Split(sourceSchema, ";") {
line = strings.TrimSpace(line)
if line == "" {
continue
}
if err := tx.Exec(line).Error; err != nil {
return err
}
Expand Down

0 comments on commit ff4d949

Please sign in to comment.