Migrator returns migrator
()
| 9 | |
| 10 | // Migrator returns migrator |
| 11 | func (db *DB) Migrator() Migrator { |
| 12 | tx := db.getInstance() |
| 13 | |
| 14 | // apply scopes to migrator |
| 15 | for len(tx.Statement.scopes) > 0 { |
| 16 | tx = tx.executeScopes() |
| 17 | } |
| 18 | |
| 19 | return tx.Dialector.Migrator(tx.Session(&Session{})) |
| 20 | } |
| 21 | |
| 22 | // AutoMigrate run auto migration for given models |
| 23 | func (db *DB) AutoMigrate(dst ...interface{}) error { |
no test coverage detected