fix migrate
This commit is contained in:
parent
cf9cb7c6c3
commit
1bfec3d35e
@ -29,7 +29,7 @@ func New(ctx *cli.Context) (datastore.Datastore, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Bool("pg-migrate") {
|
if ctx.Bool("migrate") {
|
||||||
if err := db.AutoMigrate(&model.Submission{}); err != nil {
|
if err := db.AutoMigrate(&model.Submission{}); err != nil {
|
||||||
log.WithError(err).Errorln("database migration failed")
|
log.WithError(err).Errorln("database migration failed")
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user