Exit with non-zero if migration fails
This commit is contained in:
parent
bed9381509
commit
7932350980
1 changed files with 2 additions and 0 deletions
|
@ -46,10 +46,12 @@ func main() {
|
|||
// Migrate the database
|
||||
if err = db.Migrate(); err != nil {
|
||||
fmt.Println("Error migrating database: ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if err = db.MigrateSampleData(); err != nil {
|
||||
fmt.Println("Error migrating sample data: ", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Get our global state
|
||||
|
|
Loading…
Reference in a new issue