Skip noop migrations, instead of executing SELECT 0. (#103086)

* Skip noop migrations, instead of executing SELECT 0.
This commit is contained in:
Peter Štibraný
2025-03-31 15:19:32 +02:00
committed by GitHub
parent f0a6327edc
commit f7f28757f6
3 changed files with 8 additions and 8 deletions
@@ -74,7 +74,6 @@ type Dialect interface {
CleanDB(engine *xorm.Engine) error
TruncateDBTables(engine *xorm.Engine) error
NoOpSQL() string
// CreateDatabaseFromSnapshot is called when migration log table is not found.
// Dialect can recreate all tables from existing snapshot. After successful (nil error) return,
// migrator will list migrations from the log, and apply all missing migrations.
@@ -353,10 +352,6 @@ func (b *BaseDialect) CreateDatabaseFromSnapshot(ctx context.Context, engine *xo
return nil
}
func (b *BaseDialect) NoOpSQL() string {
return "SELECT 0;"
}
func (b *BaseDialect) TruncateDBTables(engine *xorm.Engine) error {
return nil
}