Playlist: Add create+update timestamps to the database (#76295)

This commit is contained in:
Ryan McKinley
2023-10-10 12:46:12 -07:00
committed by GitHub
parent 3d84956215
commit c26e3d80e3
9 changed files with 81 additions and 328 deletions

View File

@@ -33,6 +33,14 @@ func addPlaylistMigrations(mg *Migrator) {
{Name: "value", Type: DB_Text, Nullable: false},
{Name: "title", Type: DB_Text, Nullable: false},
}))
// Add columns used for kubernetes dual write synchronization
mg.AddMigration("Add playlist column created_at", NewAddColumnMigration(playlistV2(), &Column{
Name: "created_at", Type: DB_BigInt, Nullable: false, Default: "0",
}))
mg.AddMigration("Add playlist column updated_at", NewAddColumnMigration(playlistV2(), &Column{
Name: "updated_at", Type: DB_BigInt, Nullable: false, Default: "0",
}))
}
func addPlaylistUIDMigration(mg *Migrator) {