mirror of
https://github.com/ddworken/hishtory.git
synced 2025-07-14 19:35:39 +02:00
More debug prints for auto-migration
This commit is contained in:
@ -53,9 +53,11 @@ func (db *DB) AddDatabaseTables() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, model := range models {
|
for _, model := range models {
|
||||||
|
fmt.Printf("Beginning migration of %#v\n", model)
|
||||||
if err := db.AutoMigrate(model); err != nil {
|
if err := db.AutoMigrate(model); err != nil {
|
||||||
return fmt.Errorf("db.AutoMigrate: %w", err)
|
return fmt.Errorf("db.AutoMigrate: %w", err)
|
||||||
}
|
}
|
||||||
|
fmt.Printf("Done migrating %#v\n", model)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user