feat(console): add workspace migration timestamp (#46627)

This commit is contained in:
Victor Navarro 2026-09-01 18:20:52 +02:00 committed by GitHub
parent ebece6efd7
commit 5341a5e442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3262 additions and 1 deletions

View file

@ -0,0 +1 @@
ALTER TABLE `workspace` ADD `migrated_at` timestamp(3);

View file

@ -1,5 +1,5 @@
import { boolean, json, primaryKey, mysqlTable, uniqueIndex, varchar } from "drizzle-orm/mysql-core"
import { timestamps, ulid } from "../drizzle/types"
import { timestamps, ulid, utc } from "../drizzle/types"
export const WorkspaceTable = mysqlTable(
"workspace",
@ -12,6 +12,7 @@ export const WorkspaceTable = mysqlTable(
is_blocked: boolean(),
is_flagged_by_anthropic: boolean(),
is_flagged_by_openai: boolean(),
migrated_at: utc("migrated_at"),
...timestamps,
},
(table) => [uniqueIndex("slug").on(table.slug)],