Skip noop migrations, instead of executing SELECT 0. (#103086)
* Skip noop migrations, instead of executing SELECT 0.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user