CurrentDatabase returns current database name
()
| 911 | |
| 912 | // CurrentDatabase returns current database name |
| 913 | func (m Migrator) CurrentDatabase() (name string) { |
| 914 | m.DB.Raw("SELECT DATABASE()").Row().Scan(&name) |
| 915 | return |
| 916 | } |
| 917 | |
| 918 | // ReorderModels reorder models according to constraint dependencies |
| 919 | func (m Migrator) ReorderModels(values []interface{}, autoAdd bool) (results []interface{}) { |