DB Migrations

Replacing modl’s built-in table creation and removal
with manual migrations. Thanks to @DavidHuie for
gomigrate!
This commit is contained in:
Matthew Dillon 2014-10-06 17:09:41 -08:00
parent c5f94ab67d
commit 8fa594e3f0
6 changed files with 53 additions and 17 deletions

View file

@ -117,8 +117,10 @@ The options are:
}
datastore.Connect()
migrationsPath := "./datastore/migrations"
if *drop {
datastore.Drop()
datastore.Drop(migrationsPath)
}
datastore.Create()
datastore.Create(migrationsPath)
}