Add session migration

This commit is contained in:
Maximilian 2023-02-28 14:55:09 -06:00
parent baa8eb2b93
commit b9ac6fbd5f

View File

@ -13,7 +13,6 @@ func RunAllMigrations(app *app.App) error {
Id: 1, // Id is handled automatically, but it is added here to show it will be skipped during column creation Id: 1, // Id is handled automatically, but it is added here to show it will be skipped during column creation
Username: "migrate", Username: "migrate",
Password: "migrate", Password: "migrate",
AuthToken: "migrate",
CreatedAt: time.Now(), CreatedAt: time.Now(),
UpdatedAt: time.Now(), UpdatedAt: time.Now(),
} }
@ -22,5 +21,16 @@ func RunAllMigrations(app *app.App) error {
return err return err
} }
session := Session{
Id: 1,
UserId: 1,
AuthToken: "migrate",
CreatedAt: time.Now(),
}
err = database.Migrate(app, session)
if err != nil {
return err
}
return nil return nil
} }