AddSQL registers a raw SQL migration with a given name and module.
(moduleName, name, content string)
| 56 | |
| 57 | // AddSQL registers a raw SQL migration with a given name and module. |
| 58 | func (m *Migrator) AddSQL(moduleName, name, content string) { |
| 59 | m.migrations = append(m.migrations, Migration{ |
| 60 | Name: name, |
| 61 | Module: moduleName, |
| 62 | Content: content, |
| 63 | }) |
| 64 | } |
| 65 | |
| 66 | // Run executes all collected migrations sorted by filename. |
| 67 | // Uses a migrations tracking table to avoid re-running. |
no outgoing calls