Update: removing the need to call DDLSpec in the migration file

Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@gmail.com>
This commit is contained in:
Gnanakeethan Balasubramaniam 2017-07-16 07:24:58 +05:30
parent cb38ab4f85
commit d58ad2ee36
No known key found for this signature in database
GPG Key ID: 24924006ABA72F31
1 changed files with 6 additions and 1 deletions

View File

@ -80,9 +80,14 @@ func init() {
migrationMap = make(map[string]Migrationer)
}
//DDLSpec implement in the Inheritance struct for defining structure
func (m *Migration) DDLSpec() {
}
// Up implement in the Inheritance struct for upgrade
func (m *Migration) Up() {
m.DDLSpec()
switch m.ModifyType {
case "reverse":
m.ModifyType = "alter"