summaryrefslogtreecommitdiffhomepage
path: root/cloud/core/src/schema/key.sql.ts
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-09-11 17:21:49 -0400
committerFrank <[email protected]>2025-09-11 17:22:05 -0400
commit3abca8fd4b08f5d122c2352fcee64755a028228a (patch)
tree338a442124fd0f9aa7bba265558594f961bcc156 /cloud/core/src/schema/key.sql.ts
parentf5b3992479b616b5900a5f752d8928980837426e (diff)
downloadopencode-3abca8fd4b08f5d122c2352fcee64755a028228a.tar.gz
opencode-3abca8fd4b08f5d122c2352fcee64755a028228a.zip
wip: zen
Diffstat (limited to 'cloud/core/src/schema/key.sql.ts')
-rw-r--r--cloud/core/src/schema/key.sql.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/cloud/core/src/schema/key.sql.ts b/cloud/core/src/schema/key.sql.ts
index 07982779b..98b99c788 100644
--- a/cloud/core/src/schema/key.sql.ts
+++ b/cloud/core/src/schema/key.sql.ts
@@ -10,8 +10,13 @@ export const KeyTable = mysqlTable(
...timestamps,
actor: json("actor").$type<Actor.Info>(),
name: varchar("name", { length: 255 }).notNull(),
+ oldName: varchar("old_name", { length: 255 }),
key: varchar("key", { length: 255 }).notNull(),
timeUsed: utc("time_used"),
},
- (table) => [...workspaceIndexes(table), uniqueIndex("global_key").on(table.key)],
+ (table) => [
+ ...workspaceIndexes(table),
+ uniqueIndex("global_key").on(table.key),
+ uniqueIndex("name").on(table.workspaceID, table.name),
+ ],
)