DB Migrations
Replacing modl’s built-in table creation and removal with manual migrations. Thanks to @DavidHuie for gomigrate!
This commit is contained in:
parent
c5f94ab67d
commit
8fa594e3f0
6 changed files with 53 additions and 17 deletions
|
@ -117,8 +117,10 @@ The options are:
|
|||
}
|
||||
|
||||
datastore.Connect()
|
||||
migrationsPath := "./datastore/migrations"
|
||||
|
||||
if *drop {
|
||||
datastore.Drop()
|
||||
datastore.Drop(migrationsPath)
|
||||
}
|
||||
datastore.Create()
|
||||
datastore.Create(migrationsPath)
|
||||
}
|
||||
|
|
Reference in a new issue