ServiceAccounts: Add Service Account Token last used at date (#51446)

* ServiceAccounts Add api key last used at

* ServiceAccounts: LastUpdateAt tests
This commit is contained in:
Jguer
2022-06-28 16:42:40 +02:00
committed by GitHub
parent daf0e3cb4e
commit 6d0261263c
11 changed files with 60 additions and 0 deletions
@@ -91,4 +91,8 @@ func addApiKeyMigrations(mg *Migrator) {
mg.AddMigration("set service account foreign key to nil if 0", NewRawSQLMigration(
"UPDATE api_key SET service_account_id = NULL WHERE service_account_id = 0;"))
mg.AddMigration("Add last_used_at to api_key table", NewAddColumnMigration(apiKeyV2, &Column{
Name: "last_used_at", Type: DB_DateTime, Nullable: true,
}))
}