)
@@ -435,6 +467,8 @@ export const SettingsGeneral: Component = () => {
+
+
diff --git a/packages/app/src/context/file/path.test.ts b/packages/app/src/context/file/path.test.ts
index f2a3c44b6c..7eb5e8b2a3 100644
--- a/packages/app/src/context/file/path.test.ts
+++ b/packages/app/src/context/file/path.test.ts
@@ -13,6 +13,14 @@ describe("file path helpers", () => {
expect(path.pathFromTab("other://src/app.ts")).toBeUndefined()
})
+ test("normalizes Windows absolute paths with mixed separators", () => {
+ const path = createPathHelpers(() => "C:\\repo")
+ expect(path.normalize("C:\\repo\\src\\app.ts")).toBe("src/app.ts")
+ expect(path.normalize("C:/repo/src/app.ts")).toBe("src/app.ts")
+ expect(path.normalize("file://C:/repo/src/app.ts")).toBe("src/app.ts")
+ expect(path.normalize("c:\\repo\\src\\app.ts")).toBe("src/app.ts")
+ })
+
test("keeps query/hash stripping behavior stable", () => {
expect(stripQueryAndHash("a/b.ts#L12?x=1")).toBe("a/b.ts")
expect(stripQueryAndHash("a/b.ts?x=1#L12")).toBe("a/b.ts")
diff --git a/packages/app/src/context/file/path.ts b/packages/app/src/context/file/path.ts
index 859fdc0406..72c058aec6 100644
--- a/packages/app/src/context/file/path.ts
+++ b/packages/app/src/context/file/path.ts
@@ -103,16 +103,21 @@ export function encodeFilePath(filepath: string): string {
export function createPathHelpers(scope: () => string) {
const normalize = (input: string) => {
- const root = scope()
- const prefix = root.endsWith("/") ? root : root + "/"
+ const root = scope().replace(/\\/g, "/")
- let path = unquoteGitPath(decodeFilePath(stripQueryAndHash(stripFileProtocol(input))))
+ let path = unquoteGitPath(decodeFilePath(stripQueryAndHash(stripFileProtocol(input)))).replace(/\\/g, "/")
- if (path.startsWith(prefix)) {
- path = path.slice(prefix.length)
- }
-
- if (path.startsWith(root)) {
+ // Remove initial root prefix, if it's a complete match or followed by /
+ // (don't want /foo/bar to root of /f).
+ // For Windows paths, also check for case-insensitive match.
+ const windows = /^[A-Za-z]:/.test(root)
+ const canonRoot = windows ? root.toLowerCase() : root
+ const canonPath = windows ? path.toLowerCase() : path
+ if (
+ canonPath.startsWith(canonRoot) &&
+ (canonRoot.endsWith("/") || canonPath === canonRoot || canonPath.startsWith(canonRoot + "/"))
+ ) {
+ // If we match canonRoot + "/", the slash will be removed below.
path = path.slice(root.length)
}
diff --git a/packages/app/src/context/settings.tsx b/packages/app/src/context/settings.tsx
index d279a7f321..b43469b5c3 100644
--- a/packages/app/src/context/settings.tsx
+++ b/packages/app/src/context/settings.tsx
@@ -23,6 +23,8 @@ export interface Settings {
autoSave: boolean
releaseNotes: boolean
showReasoningSummaries: boolean
+ shellToolPartsExpanded: boolean
+ editToolPartsExpanded: boolean
}
updates: {
startup: boolean
@@ -44,6 +46,8 @@ const defaultSettings: Settings = {
autoSave: true,
releaseNotes: true,
showReasoningSummaries: false,
+ shellToolPartsExpanded: true,
+ editToolPartsExpanded: false,
},
updates: {
startup: true,
@@ -129,6 +133,20 @@ export const { use: useSettings, provider: SettingsProvider } = createSimpleCont
setShowReasoningSummaries(value: boolean) {
setStore("general", "showReasoningSummaries", value)
},
+ shellToolPartsExpanded: withFallback(
+ () => store.general?.shellToolPartsExpanded,
+ defaultSettings.general.shellToolPartsExpanded,
+ ),
+ setShellToolPartsExpanded(value: boolean) {
+ setStore("general", "shellToolPartsExpanded", value)
+ },
+ editToolPartsExpanded: withFallback(
+ () => store.general?.editToolPartsExpanded,
+ defaultSettings.general.editToolPartsExpanded,
+ ),
+ setEditToolPartsExpanded(value: boolean) {
+ setStore("general", "editToolPartsExpanded", value)
+ },
},
updates: {
startup: withFallback(() => store.updates?.startup, defaultSettings.updates.startup),
diff --git a/packages/app/src/i18n/ar.ts b/packages/app/src/i18n/ar.ts
index e860a7e5d5..91a16b3b85 100644
--- a/packages/app/src/i18n/ar.ts
+++ b/packages/app/src/i18n/ar.ts
@@ -529,6 +529,7 @@ export const dict = {
"settings.general.section.notifications": "إشعارات النظام",
"settings.general.section.updates": "التحديثات",
"settings.general.section.sounds": "المؤثرات الصوتية",
+ "settings.general.section.feed": "الخلاصة",
"settings.general.section.display": "شاشة العرض",
"settings.general.row.language.title": "اللغة",
"settings.general.row.language.description": "تغيير لغة العرض لـ OpenCode",
@@ -538,6 +539,12 @@ export const dict = {
"settings.general.row.theme.description": "تخصيص سمة OpenCode.",
"settings.general.row.font.title": "الخط",
"settings.general.row.font.description": "تخصيص الخط الأحادي المستخدم في كتل التعليمات البرمجية",
+ "settings.general.row.shellToolPartsExpanded.title": "توسيع أجزاء أداة shell",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "إظهار أجزاء أداة shell موسعة بشكل افتراضي في الشريط الزمني",
+ "settings.general.row.editToolPartsExpanded.title": "توسيع أجزاء أداة edit",
+ "settings.general.row.editToolPartsExpanded.description":
+ "إظهار أجزاء أدوات edit و write و patch موسعة بشكل افتراضي في الشريط الزمني",
"settings.general.row.wayland.title": "استخدام Wayland الأصلي",
"settings.general.row.wayland.description": "تعطيل التراجع إلى X11 على Wayland. يتطلب إعادة التشغيل.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/br.ts b/packages/app/src/i18n/br.ts
index e96a0195df..7682a12b69 100644
--- a/packages/app/src/i18n/br.ts
+++ b/packages/app/src/i18n/br.ts
@@ -535,6 +535,7 @@ export const dict = {
"settings.general.section.notifications": "Notificações do sistema",
"settings.general.section.updates": "Atualizações",
"settings.general.section.sounds": "Efeitos sonoros",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Tela",
"settings.general.row.language.title": "Idioma",
"settings.general.row.language.description": "Alterar o idioma de exibição do OpenCode",
@@ -544,6 +545,12 @@ export const dict = {
"settings.general.row.theme.description": "Personalize como o OpenCode é tematizado.",
"settings.general.row.font.title": "Fonte",
"settings.general.row.font.description": "Personalize a fonte monoespaçada usada em blocos de código",
+ "settings.general.row.shellToolPartsExpanded.title": "Expandir partes da ferramenta shell",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Mostrar partes da ferramenta shell expandidas por padrão na linha do tempo",
+ "settings.general.row.editToolPartsExpanded.title": "Expandir partes da ferramenta de edição",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Mostrar partes das ferramentas de edição, escrita e patch expandidas por padrão na linha do tempo",
"settings.general.row.wayland.title": "Usar Wayland nativo",
"settings.general.row.wayland.description": "Desabilitar fallback X11 no Wayland. Requer reinicialização.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/bs.ts b/packages/app/src/i18n/bs.ts
index 1852afcd14..d658926268 100644
--- a/packages/app/src/i18n/bs.ts
+++ b/packages/app/src/i18n/bs.ts
@@ -599,6 +599,7 @@ export const dict = {
"settings.general.section.notifications": "Sistemske obavijesti",
"settings.general.section.updates": "Ažuriranja",
"settings.general.section.sounds": "Zvučni efekti",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Prikaz",
"settings.general.row.language.title": "Jezik",
@@ -610,6 +611,12 @@ export const dict = {
"settings.general.row.font.title": "Font",
"settings.general.row.font.description": "Prilagodi monospace font koji se koristi u blokovima koda",
+ "settings.general.row.shellToolPartsExpanded.title": "Proširi dijelove shell alata",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Prikaži dijelove shell alata podrazumijevano proširene na vremenskoj traci",
+ "settings.general.row.editToolPartsExpanded.title": "Proširi dijelove alata za uređivanje",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Prikaži dijelove alata za uređivanje, pisanje i patch podrazumijevano proširene na vremenskoj traci",
"settings.general.row.wayland.title": "Koristi nativni Wayland",
"settings.general.row.wayland.description": "Onemogući X11 fallback na Waylandu. Zahtijeva restart.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/da.ts b/packages/app/src/i18n/da.ts
index c5d2dc25f1..fabefcab75 100644
--- a/packages/app/src/i18n/da.ts
+++ b/packages/app/src/i18n/da.ts
@@ -594,6 +594,7 @@ export const dict = {
"settings.general.section.notifications": "Systemmeddelelser",
"settings.general.section.updates": "Opdateringer",
"settings.general.section.sounds": "Lydeffekter",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Skærm",
"settings.general.row.language.title": "Sprog",
@@ -605,6 +606,11 @@ export const dict = {
"settings.general.row.font.title": "Skrifttype",
"settings.general.row.font.description": "Tilpas mono-skrifttypen brugt i kodeblokke",
+ "settings.general.row.shellToolPartsExpanded.title": "Udvid shell-værktøjsdele",
+ "settings.general.row.shellToolPartsExpanded.description": "Vis shell-værktøjsdele udvidet som standard i tidslinjen",
+ "settings.general.row.editToolPartsExpanded.title": "Udvid edit-værktøjsdele",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Vis edit-, write- og patch-værktøjsdele udvidet som standard i tidslinjen",
"settings.general.row.wayland.title": "Brug native Wayland",
"settings.general.row.wayland.description": "Deaktiver X11-fallback på Wayland. Kræver genstart.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/de.ts b/packages/app/src/i18n/de.ts
index 34a80ee4c5..3a7bbe9277 100644
--- a/packages/app/src/i18n/de.ts
+++ b/packages/app/src/i18n/de.ts
@@ -544,6 +544,7 @@ export const dict = {
"settings.general.section.notifications": "Systembenachrichtigungen",
"settings.general.section.updates": "Updates",
"settings.general.section.sounds": "Soundeffekte",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Anzeige",
"settings.general.row.language.title": "Sprache",
"settings.general.row.language.description": "Die Anzeigesprache für OpenCode ändern",
@@ -553,6 +554,12 @@ export const dict = {
"settings.general.row.theme.description": "Das Thema von OpenCode anpassen.",
"settings.general.row.font.title": "Schriftart",
"settings.general.row.font.description": "Die in Codeblöcken verwendete Monospace-Schriftart anpassen",
+ "settings.general.row.shellToolPartsExpanded.title": "Shell-Tool-Abschnitte ausklappen",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Shell-Tool-Abschnitte standardmäßig in der Timeline ausgeklappt anzeigen",
+ "settings.general.row.editToolPartsExpanded.title": "Edit-Tool-Abschnitte ausklappen",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Edit-, Write- und Patch-Tool-Abschnitte standardmäßig in der Timeline ausgeklappt anzeigen",
"settings.general.row.wayland.title": "Natives Wayland verwenden",
"settings.general.row.wayland.description": "X11-Fallback unter Wayland deaktivieren. Erfordert Neustart.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/en.ts b/packages/app/src/i18n/en.ts
index 7ba82066c7..992509fcfa 100644
--- a/packages/app/src/i18n/en.ts
+++ b/packages/app/src/i18n/en.ts
@@ -495,6 +495,7 @@ export const dict = {
"session.review.change.other": "Changes",
"session.review.loadingChanges": "Loading changes...",
"session.review.empty": "No changes in this session yet",
+ "session.review.noVcs": "No git VCS detected, so session changes will not be detected",
"session.review.noChanges": "No changes",
"session.files.selectToOpen": "Select a file to open",
@@ -600,6 +601,7 @@ export const dict = {
"settings.general.section.notifications": "System notifications",
"settings.general.section.updates": "Updates",
"settings.general.section.sounds": "Sound effects",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Display",
"settings.general.row.language.title": "Language",
@@ -612,6 +614,12 @@ export const dict = {
"settings.general.row.font.description": "Customise the mono font used in code blocks",
"settings.general.row.reasoningSummaries.title": "Show reasoning summaries",
"settings.general.row.reasoningSummaries.description": "Display model reasoning summaries in the timeline",
+ "settings.general.row.shellToolPartsExpanded.title": "Expand shell tool parts",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Show shell tool parts expanded by default in the timeline",
+ "settings.general.row.editToolPartsExpanded.title": "Expand edit tool parts",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Show edit, write, and patch tool parts expanded by default in the timeline",
"settings.general.row.wayland.title": "Use native Wayland",
"settings.general.row.wayland.description": "Disable X11 fallback on Wayland. Requires restart.",
diff --git a/packages/app/src/i18n/es.ts b/packages/app/src/i18n/es.ts
index 28988bba1e..b55d54c0ca 100644
--- a/packages/app/src/i18n/es.ts
+++ b/packages/app/src/i18n/es.ts
@@ -602,6 +602,7 @@ export const dict = {
"settings.general.section.notifications": "Notificaciones del sistema",
"settings.general.section.updates": "Actualizaciones",
"settings.general.section.sounds": "Efectos de sonido",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Pantalla",
"settings.general.row.language.title": "Idioma",
@@ -613,6 +614,12 @@ export const dict = {
"settings.general.row.font.title": "Fuente",
"settings.general.row.font.description": "Personaliza la fuente monoespaciada usada en bloques de código",
+ "settings.general.row.shellToolPartsExpanded.title": "Expandir partes de la herramienta shell",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Mostrar las partes de la herramienta shell expandidas por defecto en la línea de tiempo",
+ "settings.general.row.editToolPartsExpanded.title": "Expandir partes de la herramienta de edición",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Mostrar las partes de las herramientas de edición, escritura y parcheado expandidas por defecto en la línea de tiempo",
"settings.general.row.wayland.title": "Usar Wayland nativo",
"settings.general.row.wayland.description": "Deshabilitar fallback a X11 en Wayland. Requiere reinicio.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/fr.ts b/packages/app/src/i18n/fr.ts
index 643c5e8211..c961f060e1 100644
--- a/packages/app/src/i18n/fr.ts
+++ b/packages/app/src/i18n/fr.ts
@@ -543,6 +543,7 @@ export const dict = {
"settings.general.section.notifications": "Notifications système",
"settings.general.section.updates": "Mises à jour",
"settings.general.section.sounds": "Effets sonores",
+ "settings.general.section.feed": "Flux",
"settings.general.section.display": "Affichage",
"settings.general.row.language.title": "Langue",
"settings.general.row.language.description": "Changer la langue d'affichage pour OpenCode",
@@ -552,6 +553,12 @@ export const dict = {
"settings.general.row.theme.description": "Personnaliser le thème d'OpenCode.",
"settings.general.row.font.title": "Police",
"settings.general.row.font.description": "Personnaliser la police mono utilisée dans les blocs de code",
+ "settings.general.row.shellToolPartsExpanded.title": "Développer les parties de l'outil shell",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Afficher les parties de l'outil shell développées par défaut dans la chronologie",
+ "settings.general.row.editToolPartsExpanded.title": "Développer les parties de l'outil edit",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Afficher les parties des outils edit, write et patch développées par défaut dans la chronologie",
"settings.general.row.wayland.title": "Utiliser Wayland natif",
"settings.general.row.wayland.description": "Désactiver le repli X11 sur Wayland. Nécessite un redémarrage.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/ja.ts b/packages/app/src/i18n/ja.ts
index 5f6e924025..7a62c9de27 100644
--- a/packages/app/src/i18n/ja.ts
+++ b/packages/app/src/i18n/ja.ts
@@ -533,6 +533,7 @@ export const dict = {
"settings.general.section.notifications": "システム通知",
"settings.general.section.updates": "アップデート",
"settings.general.section.sounds": "効果音",
+ "settings.general.section.feed": "フィード",
"settings.general.section.display": "ディスプレイ",
"settings.general.row.language.title": "言語",
"settings.general.row.language.description": "OpenCodeの表示言語を変更します",
@@ -542,6 +543,12 @@ export const dict = {
"settings.general.row.theme.description": "OpenCodeのテーマをカスタマイズします。",
"settings.general.row.font.title": "フォント",
"settings.general.row.font.description": "コードブロックで使用する等幅フォントをカスタマイズします",
+ "settings.general.row.shellToolPartsExpanded.title": "shell ツールパーツを展開",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "タイムラインで shell ツールパーツをデフォルトで展開して表示します",
+ "settings.general.row.editToolPartsExpanded.title": "edit ツールパーツを展開",
+ "settings.general.row.editToolPartsExpanded.description":
+ "タイムラインで edit、write、patch ツールパーツをデフォルトで展開して表示します",
"settings.general.row.wayland.title": "ネイティブWaylandを使用",
"settings.general.row.wayland.description": "WaylandでのX11フォールバックを無効にします。再起動が必要です。",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/ko.ts b/packages/app/src/i18n/ko.ts
index d5a0b090b9..8967c71cff 100644
--- a/packages/app/src/i18n/ko.ts
+++ b/packages/app/src/i18n/ko.ts
@@ -534,6 +534,7 @@ export const dict = {
"settings.general.section.notifications": "시스템 알림",
"settings.general.section.updates": "업데이트",
"settings.general.section.sounds": "효과음",
+ "settings.general.section.feed": "피드",
"settings.general.section.display": "디스플레이",
"settings.general.row.language.title": "언어",
"settings.general.row.language.description": "OpenCode 표시 언어 변경",
@@ -543,6 +544,12 @@ export const dict = {
"settings.general.row.theme.description": "OpenCode 테마 사용자 지정",
"settings.general.row.font.title": "글꼴",
"settings.general.row.font.description": "코드 블록에 사용되는 고정폭 글꼴 사용자 지정",
+ "settings.general.row.shellToolPartsExpanded.title": "shell 도구 파트 펼치기",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "타임라인에서 기본적으로 shell 도구 파트를 펼친 상태로 표시합니다",
+ "settings.general.row.editToolPartsExpanded.title": "edit 도구 파트 펼치기",
+ "settings.general.row.editToolPartsExpanded.description":
+ "타임라인에서 기본적으로 edit, write, patch 도구 파트를 펼친 상태로 표시합니다",
"settings.general.row.wayland.title": "네이티브 Wayland 사용",
"settings.general.row.wayland.description": "Wayland에서 X11 폴백을 비활성화합니다. 다시 시작해야 합니다.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/no.ts b/packages/app/src/i18n/no.ts
index 10a8c1042f..8e1b1ce629 100644
--- a/packages/app/src/i18n/no.ts
+++ b/packages/app/src/i18n/no.ts
@@ -602,6 +602,7 @@ export const dict = {
"settings.general.section.notifications": "Systemvarsler",
"settings.general.section.updates": "Oppdateringer",
"settings.general.section.sounds": "Lydeffekter",
+ "settings.general.section.feed": "Feed",
"settings.general.section.display": "Skjerm",
"settings.general.row.language.title": "Språk",
@@ -613,6 +614,11 @@ export const dict = {
"settings.general.row.font.title": "Skrift",
"settings.general.row.font.description": "Tilpass mono-skriften som brukes i kodeblokker",
+ "settings.general.row.shellToolPartsExpanded.title": "Utvid shell-verktøydeler",
+ "settings.general.row.shellToolPartsExpanded.description": "Vis shell-verktøydeler utvidet som standard i tidslinjen",
+ "settings.general.row.editToolPartsExpanded.title": "Utvid edit-verktøydeler",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Vis edit-, write- og patch-verktøydeler utvidet som standard i tidslinjen",
"settings.general.row.wayland.title": "Bruk innebygd Wayland",
"settings.general.row.wayland.description": "Deaktiver X11-fallback på Wayland. Krever omstart.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/pl.ts b/packages/app/src/i18n/pl.ts
index 9038fd1ad2..9b924fd642 100644
--- a/packages/app/src/i18n/pl.ts
+++ b/packages/app/src/i18n/pl.ts
@@ -534,6 +534,7 @@ export const dict = {
"settings.general.section.notifications": "Powiadomienia systemowe",
"settings.general.section.updates": "Aktualizacje",
"settings.general.section.sounds": "Efekty dźwiękowe",
+ "settings.general.section.feed": "Kanał",
"settings.general.section.display": "Ekran",
"settings.general.row.language.title": "Język",
"settings.general.row.language.description": "Zmień język wyświetlania dla OpenCode",
@@ -543,6 +544,12 @@ export const dict = {
"settings.general.row.theme.description": "Dostosuj motyw OpenCode.",
"settings.general.row.font.title": "Czcionka",
"settings.general.row.font.description": "Dostosuj czcionkę mono używaną w blokach kodu",
+ "settings.general.row.shellToolPartsExpanded.title": "Rozwijaj elementy narzędzia shell",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Domyślnie pokazuj rozwinięte elementy narzędzia shell na osi czasu",
+ "settings.general.row.editToolPartsExpanded.title": "Rozwijaj elementy narzędzia edit",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Domyślnie pokazuj rozwinięte elementy narzędzi edit, write i patch na osi czasu",
"settings.general.row.wayland.title": "Użyj natywnego Wayland",
"settings.general.row.wayland.description": "Wyłącz fallback X11 na Wayland. Wymaga restartu.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/ru.ts b/packages/app/src/i18n/ru.ts
index 69fee5c89a..cf02285821 100644
--- a/packages/app/src/i18n/ru.ts
+++ b/packages/app/src/i18n/ru.ts
@@ -600,6 +600,7 @@ export const dict = {
"settings.general.section.notifications": "Системные уведомления",
"settings.general.section.updates": "Обновления",
"settings.general.section.sounds": "Звуковые эффекты",
+ "settings.general.section.feed": "Лента",
"settings.general.section.display": "Дисплей",
"settings.general.row.language.title": "Язык",
@@ -611,6 +612,12 @@ export const dict = {
"settings.general.row.font.title": "Шрифт",
"settings.general.row.font.description": "Настройте моноширинный шрифт для блоков кода",
+ "settings.general.row.shellToolPartsExpanded.title": "Разворачивать элементы инструмента shell",
+ "settings.general.row.shellToolPartsExpanded.description":
+ "Показывать элементы инструмента shell в ленте развернутыми по умолчанию",
+ "settings.general.row.editToolPartsExpanded.title": "Разворачивать элементы инструмента edit",
+ "settings.general.row.editToolPartsExpanded.description":
+ "Показывать элементы инструментов edit, write и patch в ленте развернутыми по умолчанию",
"settings.general.row.wayland.title": "Использовать нативный Wayland",
"settings.general.row.wayland.description": "Отключить X11 fallback на Wayland. Требуется перезапуск.",
"settings.general.row.wayland.tooltip":
diff --git a/packages/app/src/i18n/th.ts b/packages/app/src/i18n/th.ts
index d66c8f6075..1b8abe953b 100644
--- a/packages/app/src/i18n/th.ts
+++ b/packages/app/src/i18n/th.ts
@@ -594,6 +594,7 @@ export const dict = {
"settings.general.section.notifications": "การแจ้งเตือนระบบ",
"settings.general.section.updates": "การอัปเดต",
"settings.general.section.sounds": "เสียงเอฟเฟกต์",
+ "settings.general.section.feed": "ฟีด",
"settings.general.section.display": "การแสดงผล",
"settings.general.row.language.title": "ภาษา",
@@ -605,6 +606,11 @@ export const dict = {
"settings.general.row.font.title": "ฟอนต์",
"settings.general.row.font.description": "ปรับแต่งฟอนต์โมโนที่ใช้ในบล็อกโค้ด",
+ "settings.general.row.shellToolPartsExpanded.title": "ขยายส่วนเครื่องมือ shell",
+ "settings.general.row.shellToolPartsExpanded.description": "แสดงส่วนเครื่องมือ shell แบบขยายตามค่าเริ่มต้นในไทม์ไลน์",
+ "settings.general.row.editToolPartsExpanded.title": "ขยายส่วนเครื่องมือ edit",
+ "settings.general.row.editToolPartsExpanded.description":
+ "แสดงส่วนเครื่องมือ edit, write และ patch แบบขยายตามค่าเริ่มต้นในไทม์ไลน์",
"settings.general.row.wayland.title": "ใช้ Wayland แบบเนทีฟ",
"settings.general.row.wayland.description": "ปิดใช้งาน X11 fallback บน Wayland ต้องรีสตาร์ท",
"settings.general.row.wayland.tooltip": "บน Linux ที่มีจอภาพรีเฟรชเรตแบบผสม Wayland แบบเนทีฟอาจเสถียรกว่า",
diff --git a/packages/app/src/i18n/zh.ts b/packages/app/src/i18n/zh.ts
index 46daeb701f..62c7bb9ff2 100644
--- a/packages/app/src/i18n/zh.ts
+++ b/packages/app/src/i18n/zh.ts
@@ -595,6 +595,7 @@ export const dict = {
"settings.general.section.notifications": "系统通知",
"settings.general.section.updates": "更新",
"settings.general.section.sounds": "音效",
+ "settings.general.section.feed": "动态",
"settings.general.section.display": "显示",
"settings.general.row.language.title": "语言",
"settings.general.row.language.description": "更改 OpenCode 的显示语言",
@@ -604,6 +605,10 @@ export const dict = {
"settings.general.row.theme.description": "自定义 OpenCode 的主题。",
"settings.general.row.font.title": "字体",
"settings.general.row.font.description": "自定义代码块使用的等宽字体",
+ "settings.general.row.shellToolPartsExpanded.title": "展开 shell 工具部分",
+ "settings.general.row.shellToolPartsExpanded.description": "默认在时间线中展开 shell 工具部分",
+ "settings.general.row.editToolPartsExpanded.title": "展开编辑工具部分",
+ "settings.general.row.editToolPartsExpanded.description": "默认在时间线中展开 edit、write 和 patch 工具部分",
"settings.general.row.wayland.title": "使用原生 Wayland",
"settings.general.row.wayland.description": "在 Wayland 上禁用 X11 回退。需要重启。",
"settings.general.row.wayland.tooltip": "在混合刷新率显示器的 Linux 系统上,原生 Wayland 可能更稳定。",
diff --git a/packages/app/src/i18n/zht.ts b/packages/app/src/i18n/zht.ts
index bbb00727b7..cb8f068f63 100644
--- a/packages/app/src/i18n/zht.ts
+++ b/packages/app/src/i18n/zht.ts
@@ -589,6 +589,7 @@ export const dict = {
"settings.general.section.notifications": "系統通知",
"settings.general.section.updates": "更新",
"settings.general.section.sounds": "音效",
+ "settings.general.section.feed": "資訊流",
"settings.general.section.display": "顯示",
"settings.general.row.language.title": "語言",
@@ -600,6 +601,10 @@ export const dict = {
"settings.general.row.font.title": "字型",
"settings.general.row.font.description": "自訂程式碼區塊使用的等寬字型",
+ "settings.general.row.shellToolPartsExpanded.title": "展開 shell 工具區塊",
+ "settings.general.row.shellToolPartsExpanded.description": "在時間軸中預設展開 shell 工具區塊",
+ "settings.general.row.editToolPartsExpanded.title": "展開 edit 工具區塊",
+ "settings.general.row.editToolPartsExpanded.description": "在時間軸中預設展開 edit、write 和 patch 工具區塊",
"settings.general.row.wayland.title": "使用原生 Wayland",
"settings.general.row.wayland.description": "在 Wayland 上停用 X11 後備模式。需要重新啟動。",
"settings.general.row.wayland.tooltip": "在混合更新率螢幕的 Linux 系統上,原生 Wayland 可能更穩定。",
diff --git a/packages/app/src/pages/session.tsx b/packages/app/src/pages/session.tsx
index a3f4b7164b..e0ef92682d 100644
--- a/packages/app/src/pages/session.tsx
+++ b/packages/app/src/pages/session.tsx
@@ -274,6 +274,11 @@ export default function Page() {
if (!hasReview()) return true
return sync.data.session_diff[id] !== undefined
})
+ const reviewEmptyKey = createMemo(() => {
+ const project = sync.project
+ if (!project || project.vcs) return "session.review.empty"
+ return "session.review.noVcs"
+ })
let inputRef!: HTMLDivElement
let promptDock: HTMLDivElement | undefined
@@ -531,7 +536,7 @@ export default function Page() {
) : (
)
}
diff --git a/packages/app/src/pages/session/composer/session-todo-dock.tsx b/packages/app/src/pages/session/composer/session-todo-dock.tsx
index ca7a5abd15..2799827602 100644
--- a/packages/app/src/pages/session/composer/session-todo-dock.tsx
+++ b/packages/app/src/pages/session/composer/session-todo-dock.tsx
@@ -87,7 +87,7 @@ export function SessionTodoDock(props: { todos: Todo[]; title: string; collapseL
icon="chevron-down"
size="normal"
variant="ghost"
- classList={{ "rotate-180": !store.collapsed }}
+ classList={{ "rotate-180": store.collapsed }}
onMouseDown={(event) => {
event.preventDefault()
event.stopPropagation()
diff --git a/packages/app/src/pages/session/message-timeline.tsx b/packages/app/src/pages/session/message-timeline.tsx
index b13ccb474a..615d1a0bea 100644
--- a/packages/app/src/pages/session/message-timeline.tsx
+++ b/packages/app/src/pages/session/message-timeline.tsx
@@ -539,6 +539,8 @@ export function MessageTimeline(props: {
messageID={message.id}
lastUserMessageID={props.lastUserMessageID}
showReasoningSummaries={settings.general.showReasoningSummaries()}
+ shellToolDefaultOpen={settings.general.shellToolPartsExpanded()}
+ editToolDefaultOpen={settings.general.editToolPartsExpanded()}
classes={{
root: "min-w-0 w-full relative",
content: "flex flex-col justify-between !overflow-visible",
diff --git a/packages/console/app/src/i18n/ar.ts b/packages/console/app/src/i18n/ar.ts
index bf22ec157f..105546f637 100644
--- a/packages/console/app/src/i18n/ar.ts
+++ b/packages/console/app/src/i18n/ar.ts
@@ -337,6 +337,7 @@ export const dict = {
"workspace.usage.table.input": "الدخل",
"workspace.usage.table.output": "الخرج",
"workspace.usage.table.cost": "التكلفة",
+ "workspace.usage.table.session": "الجلسة",
"workspace.usage.breakdown.input": "الدخل",
"workspace.usage.breakdown.cacheRead": "قراءة الكاش",
"workspace.usage.breakdown.cacheWrite": "كتابة الكاش",
diff --git a/packages/console/app/src/i18n/br.ts b/packages/console/app/src/i18n/br.ts
index 0f39484eff..8f94a1f6b8 100644
--- a/packages/console/app/src/i18n/br.ts
+++ b/packages/console/app/src/i18n/br.ts
@@ -342,6 +342,7 @@ export const dict = {
"workspace.usage.table.input": "Entrada",
"workspace.usage.table.output": "Saída",
"workspace.usage.table.cost": "Custo",
+ "workspace.usage.table.session": "Sessão",
"workspace.usage.breakdown.input": "Entrada",
"workspace.usage.breakdown.cacheRead": "Leitura de Cache",
"workspace.usage.breakdown.cacheWrite": "Escrita em Cache",
diff --git a/packages/console/app/src/i18n/da.ts b/packages/console/app/src/i18n/da.ts
index 39f8cfb525..cd887bf27b 100644
--- a/packages/console/app/src/i18n/da.ts
+++ b/packages/console/app/src/i18n/da.ts
@@ -340,6 +340,7 @@ export const dict = {
"workspace.usage.table.input": "Input",
"workspace.usage.table.output": "Output",
"workspace.usage.table.cost": "Omkostning",
+ "workspace.usage.table.session": "Session",
"workspace.usage.breakdown.input": "Input",
"workspace.usage.breakdown.cacheRead": "Cache læst",
"workspace.usage.breakdown.cacheWrite": "Cache skriv",
diff --git a/packages/console/app/src/i18n/de.ts b/packages/console/app/src/i18n/de.ts
index 733f38ca5f..bd711cd023 100644
--- a/packages/console/app/src/i18n/de.ts
+++ b/packages/console/app/src/i18n/de.ts
@@ -342,6 +342,7 @@ export const dict = {
"workspace.usage.table.input": "Input",
"workspace.usage.table.output": "Output",
"workspace.usage.table.cost": "Kosten",
+ "workspace.usage.table.session": "Sitzung",
"workspace.usage.breakdown.input": "Input",
"workspace.usage.breakdown.cacheRead": "Cache Read",
"workspace.usage.breakdown.cacheWrite": "Cache Write",
diff --git a/packages/console/app/src/i18n/en.ts b/packages/console/app/src/i18n/en.ts
index 08c716aba3..55551de645 100644
--- a/packages/console/app/src/i18n/en.ts
+++ b/packages/console/app/src/i18n/en.ts
@@ -334,6 +334,7 @@ export const dict = {
"workspace.usage.table.input": "Input",
"workspace.usage.table.output": "Output",
"workspace.usage.table.cost": "Cost",
+ "workspace.usage.table.session": "Session",
"workspace.usage.breakdown.input": "Input",
"workspace.usage.breakdown.cacheRead": "Cache Read",
"workspace.usage.breakdown.cacheWrite": "Cache Write",
diff --git a/packages/console/app/src/i18n/es.ts b/packages/console/app/src/i18n/es.ts
index 1a18a872eb..aafe8aa00c 100644
--- a/packages/console/app/src/i18n/es.ts
+++ b/packages/console/app/src/i18n/es.ts
@@ -343,6 +343,7 @@ export const dict = {
"workspace.usage.table.input": "Entrada",
"workspace.usage.table.output": "Salida",
"workspace.usage.table.cost": "Costo",
+ "workspace.usage.table.session": "Sesión",
"workspace.usage.breakdown.input": "Entrada",
"workspace.usage.breakdown.cacheRead": "Lectura de Caché",
"workspace.usage.breakdown.cacheWrite": "Escritura de Caché",
diff --git a/packages/console/app/src/i18n/fr.ts b/packages/console/app/src/i18n/fr.ts
index 8974927a96..a915fde3b2 100644
--- a/packages/console/app/src/i18n/fr.ts
+++ b/packages/console/app/src/i18n/fr.ts
@@ -348,6 +348,7 @@ export const dict = {
"workspace.usage.table.input": "Entrée",
"workspace.usage.table.output": "Sortie",
"workspace.usage.table.cost": "Coût",
+ "workspace.usage.table.session": "Session",
"workspace.usage.breakdown.input": "Entrée",
"workspace.usage.breakdown.cacheRead": "Lecture cache",
"workspace.usage.breakdown.cacheWrite": "Écriture cache",
diff --git a/packages/console/app/src/i18n/it.ts b/packages/console/app/src/i18n/it.ts
index ce464f0009..4ffc728c86 100644
--- a/packages/console/app/src/i18n/it.ts
+++ b/packages/console/app/src/i18n/it.ts
@@ -342,6 +342,7 @@ export const dict = {
"workspace.usage.table.input": "Input",
"workspace.usage.table.output": "Output",
"workspace.usage.table.cost": "Costo",
+ "workspace.usage.table.session": "Sessione",
"workspace.usage.breakdown.input": "Input",
"workspace.usage.breakdown.cacheRead": "Lettura Cache",
"workspace.usage.breakdown.cacheWrite": "Scrittura Cache",
diff --git a/packages/console/app/src/i18n/ja.ts b/packages/console/app/src/i18n/ja.ts
index 4dea6ccf4f..8ecc5d58b7 100644
--- a/packages/console/app/src/i18n/ja.ts
+++ b/packages/console/app/src/i18n/ja.ts
@@ -339,6 +339,7 @@ export const dict = {
"workspace.usage.table.input": "入力",
"workspace.usage.table.output": "出力",
"workspace.usage.table.cost": "コスト",
+ "workspace.usage.table.session": "セッション",
"workspace.usage.breakdown.input": "入力",
"workspace.usage.breakdown.cacheRead": "キャッシュ読み取り",
"workspace.usage.breakdown.cacheWrite": "キャッシュ書き込み",
diff --git a/packages/console/app/src/i18n/ko.ts b/packages/console/app/src/i18n/ko.ts
index 984dbbe67b..9692ef47a3 100644
--- a/packages/console/app/src/i18n/ko.ts
+++ b/packages/console/app/src/i18n/ko.ts
@@ -336,6 +336,7 @@ export const dict = {
"workspace.usage.table.input": "입력",
"workspace.usage.table.output": "출력",
"workspace.usage.table.cost": "비용",
+ "workspace.usage.table.session": "세션",
"workspace.usage.breakdown.input": "입력",
"workspace.usage.breakdown.cacheRead": "캐시 읽기",
"workspace.usage.breakdown.cacheWrite": "캐시 쓰기",
diff --git a/packages/console/app/src/i18n/no.ts b/packages/console/app/src/i18n/no.ts
index 1f9b1b2464..c1729b83c0 100644
--- a/packages/console/app/src/i18n/no.ts
+++ b/packages/console/app/src/i18n/no.ts
@@ -340,6 +340,7 @@ export const dict = {
"workspace.usage.table.input": "Input",
"workspace.usage.table.output": "Output",
"workspace.usage.table.cost": "Kostnad",
+ "workspace.usage.table.session": "Økt",
"workspace.usage.breakdown.input": "Input",
"workspace.usage.breakdown.cacheRead": "Cache Lest",
"workspace.usage.breakdown.cacheWrite": "Cache Skrevet",
diff --git a/packages/console/app/src/i18n/pl.ts b/packages/console/app/src/i18n/pl.ts
index f35300710c..0bcc7e735d 100644
--- a/packages/console/app/src/i18n/pl.ts
+++ b/packages/console/app/src/i18n/pl.ts
@@ -341,6 +341,7 @@ export const dict = {
"workspace.usage.table.input": "Wejście",
"workspace.usage.table.output": "Wyjście",
"workspace.usage.table.cost": "Koszt",
+ "workspace.usage.table.session": "Sesja",
"workspace.usage.breakdown.input": "Wejście",
"workspace.usage.breakdown.cacheRead": "Odczyt Cache",
"workspace.usage.breakdown.cacheWrite": "Zapis Cache",
diff --git a/packages/console/app/src/i18n/ru.ts b/packages/console/app/src/i18n/ru.ts
index 27a30cc815..489125a583 100644
--- a/packages/console/app/src/i18n/ru.ts
+++ b/packages/console/app/src/i18n/ru.ts
@@ -346,6 +346,7 @@ export const dict = {
"workspace.usage.table.input": "Вход",
"workspace.usage.table.output": "Выход",
"workspace.usage.table.cost": "Стоимость",
+ "workspace.usage.table.session": "Сессия",
"workspace.usage.breakdown.input": "Вход",
"workspace.usage.breakdown.cacheRead": "Чтение кэша",
"workspace.usage.breakdown.cacheWrite": "Запись кэша",
diff --git a/packages/console/app/src/i18n/th.ts b/packages/console/app/src/i18n/th.ts
index d94be479c9..cbd534c96f 100644
--- a/packages/console/app/src/i18n/th.ts
+++ b/packages/console/app/src/i18n/th.ts
@@ -339,6 +339,7 @@ export const dict = {
"workspace.usage.table.input": "Input",
"workspace.usage.table.output": "Output",
"workspace.usage.table.cost": "ค่าใช้จ่าย",
+ "workspace.usage.table.session": "เซสชัน",
"workspace.usage.breakdown.input": "Input",
"workspace.usage.breakdown.cacheRead": "Cache Read",
"workspace.usage.breakdown.cacheWrite": "Cache Write",
diff --git a/packages/console/app/src/i18n/tr.ts b/packages/console/app/src/i18n/tr.ts
index e2f747704e..4a333ccda8 100644
--- a/packages/console/app/src/i18n/tr.ts
+++ b/packages/console/app/src/i18n/tr.ts
@@ -342,6 +342,7 @@ export const dict = {
"workspace.usage.table.input": "Giriş",
"workspace.usage.table.output": "Çıkış",
"workspace.usage.table.cost": "Maliyet",
+ "workspace.usage.table.session": "Oturum",
"workspace.usage.breakdown.input": "Giriş",
"workspace.usage.breakdown.cacheRead": "Önbellek Okuması",
"workspace.usage.breakdown.cacheWrite": "Önbellek Yazma",
diff --git a/packages/console/app/src/i18n/zh.ts b/packages/console/app/src/i18n/zh.ts
index c31b9ea661..4628b99773 100644
--- a/packages/console/app/src/i18n/zh.ts
+++ b/packages/console/app/src/i18n/zh.ts
@@ -327,6 +327,7 @@ export const dict = {
"workspace.usage.table.input": "输入",
"workspace.usage.table.output": "输出",
"workspace.usage.table.cost": "成本",
+ "workspace.usage.table.session": "会话",
"workspace.usage.breakdown.input": "输入",
"workspace.usage.breakdown.cacheRead": "缓存读取",
"workspace.usage.breakdown.cacheWrite": "缓存写入",
diff --git a/packages/console/app/src/i18n/zht.ts b/packages/console/app/src/i18n/zht.ts
index c7b411ca5b..b7edf1b792 100644
--- a/packages/console/app/src/i18n/zht.ts
+++ b/packages/console/app/src/i18n/zht.ts
@@ -327,6 +327,7 @@ export const dict = {
"workspace.usage.table.input": "輸入",
"workspace.usage.table.output": "輸出",
"workspace.usage.table.cost": "成本",
+ "workspace.usage.table.session": "會話",
"workspace.usage.breakdown.input": "輸入",
"workspace.usage.breakdown.cacheRead": "快取讀取",
"workspace.usage.breakdown.cacheWrite": "快取寫入",
diff --git a/packages/console/app/src/routes/workspace/[id]/billing/black-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/black-section.tsx
index ce0eb2c6a1..5326306e28 100644
--- a/packages/console/app/src/routes/workspace/[id]/billing/black-section.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/billing/black-section.tsx
@@ -5,7 +5,8 @@ import { Billing } from "@opencode-ai/console-core/billing.js"
import { Database, eq, and, isNull, sql } from "@opencode-ai/console-core/drizzle/index.js"
import { BillingTable, SubscriptionTable } from "@opencode-ai/console-core/schema/billing.sql.js"
import { Actor } from "@opencode-ai/console-core/actor.js"
-import { Black } from "@opencode-ai/console-core/black.js"
+import { Subscription } from "@opencode-ai/console-core/subscription.js"
+import { BlackData } from "@opencode-ai/console-core/black.js"
import { withActor } from "~/context/auth.withActor"
import { queryBillingInfo } from "../../common"
import styles from "./black-section.module.css"
@@ -31,17 +32,19 @@ const querySubscription = query(async (workspaceID: string) => {
.then((r) => r[0]),
)
if (!row?.subscription) return null
+ const blackData = BlackData.getLimits({ plan: row.subscription.plan })
return {
plan: row.subscription.plan,
useBalance: row.subscription.useBalance ?? false,
- rollingUsage: Black.analyzeRollingUsage({
- plan: row.subscription.plan,
+ rollingUsage: Subscription.analyzeRollingUsage({
+ limit: blackData.rollingLimit,
+ window: blackData.rollingWindow,
usage: row.rollingUsage ?? 0,
timeUpdated: row.timeRollingUpdated ?? new Date(),
}),
- weeklyUsage: Black.analyzeWeeklyUsage({
- plan: row.subscription.plan,
+ weeklyUsage: Subscription.analyzeWeeklyUsage({
+ limit: blackData.fixedLimit,
usage: row.fixedUsage ?? 0,
timeUpdated: row.timeFixedUpdated ?? new Date(),
}),
diff --git a/packages/console/app/src/routes/workspace/[id]/usage-section.tsx b/packages/console/app/src/routes/workspace/[id]/usage-section.tsx
index 079a27c3ca..7b030f4afb 100644
--- a/packages/console/app/src/routes/workspace/[id]/usage-section.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/usage-section.tsx
@@ -94,6 +94,7 @@ export function UsageSection() {
{i18n.t("workspace.usage.table.input")} |
{i18n.t("workspace.usage.table.output")} |
{i18n.t("workspace.usage.table.cost")} |
+
{i18n.t("workspace.usage.table.session")} |
@@ -183,6 +184,7 @@ export function UsageSection() {
})}
+ {usage.sessionID?.slice(-8) ?? "-"} |
)
}}
diff --git a/packages/console/app/src/routes/zen/util/handler.ts b/packages/console/app/src/routes/zen/util/handler.ts
index 5f2b51c21e..dc10e1bf93 100644
--- a/packages/console/app/src/routes/zen/util/handler.ts
+++ b/packages/console/app/src/routes/zen/util/handler.ts
@@ -9,7 +9,8 @@ import { Billing } from "@opencode-ai/console-core/billing.js"
import { Actor } from "@opencode-ai/console-core/actor.js"
import { WorkspaceTable } from "@opencode-ai/console-core/schema/workspace.sql.js"
import { ZenData } from "@opencode-ai/console-core/model.js"
-import { Black, BlackData } from "@opencode-ai/console-core/black.js"
+import { Subscription } from "@opencode-ai/console-core/subscription.js"
+import { BlackData } from "@opencode-ai/console-core/black.js"
import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js"
import { ModelTable } from "@opencode-ai/console-core/schema/model.sql.js"
import { ProviderTable } from "@opencode-ai/console-core/schema/provider.sql.js"
@@ -196,7 +197,7 @@ export async function handler(
const costInfo = calculateCost(modelInfo, usageInfo)
await trialLimiter?.track(usageInfo)
await rateLimiter?.track()
- await trackUsage(billingSource, authInfo, modelInfo, providerInfo, usageInfo, costInfo)
+ await trackUsage(sessionId, billingSource, authInfo, modelInfo, providerInfo, usageInfo, costInfo)
await reload(billingSource, authInfo, costInfo)
const responseConverter = createResponseConverter(providerInfo.format, opts.format)
@@ -246,7 +247,7 @@ export async function handler(
const usageInfo = providerInfo.normalizeUsage(usage)
const costInfo = calculateCost(modelInfo, usageInfo)
await trialLimiter?.track(usageInfo)
- await trackUsage(billingSource, authInfo, modelInfo, providerInfo, usageInfo, costInfo)
+ await trackUsage(sessionId, billingSource, authInfo, modelInfo, providerInfo, usageInfo, costInfo)
await reload(billingSource, authInfo, costInfo)
cost = calculateOccuredCost(billingSource, costInfo)
}
@@ -541,8 +542,9 @@ export async function handler(
// Check weekly limit
if (sub.fixedUsage && sub.timeFixedUpdated) {
- const result = Black.analyzeWeeklyUsage({
- plan,
+ const blackData = BlackData.getLimits({ plan })
+ const result = Subscription.analyzeWeeklyUsage({
+ limit: blackData.fixedLimit,
usage: sub.fixedUsage,
timeUpdated: sub.timeFixedUpdated,
})
@@ -555,8 +557,10 @@ export async function handler(
// Check rolling limit
if (sub.rollingUsage && sub.timeRollingUpdated) {
- const result = Black.analyzeRollingUsage({
- plan,
+ const blackData = BlackData.getLimits({ plan })
+ const result = Subscription.analyzeRollingUsage({
+ limit: blackData.rollingLimit,
+ window: blackData.rollingWindow,
usage: sub.rollingUsage,
timeUpdated: sub.timeRollingUpdated,
})
@@ -687,6 +691,7 @@ export async function handler(
}
async function trackUsage(
+ sessionId: string,
billingSource: BillingSource,
authInfo: AuthInfo,
modelInfo: ModelInfo,
@@ -734,6 +739,7 @@ export async function handler(
cacheWrite1hTokens,
cost,
keyID: authInfo.apiKeyId,
+ sessionID: sessionId.substring(0, 30),
enrichment: billingSource === "subscription" ? { plan: "sub" } : undefined,
}),
db
diff --git a/packages/console/core/migrations/0000_fluffy_raza.sql b/packages/console/core/migrations/20250902065410_fluffy_raza/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0000_fluffy_raza.sql
rename to packages/console/core/migrations/20250902065410_fluffy_raza/migration.sql
diff --git a/packages/console/core/migrations/20250902065410_fluffy_raza/snapshot.json b/packages/console/core/migrations/20250902065410_fluffy_raza/snapshot.json
new file mode 100644
index 0000000000..6b26128c66
--- /dev/null
+++ b/packages/console/core/migrations/20250902065410_fluffy_raza/snapshot.json
@@ -0,0 +1,967 @@
+{
+ "version": "6",
+ "id": "aee779c5-db1d-4655-95ec-6451c18455be",
+ "prevIds": ["00000000-0000-0000-0000-000000000000"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0001_serious_whistler.sql b/packages/console/core/migrations/20250903035359_serious_whistler/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0001_serious_whistler.sql
rename to packages/console/core/migrations/20250903035359_serious_whistler/migration.sql
diff --git a/packages/console/core/migrations/20250903035359_serious_whistler/snapshot.json b/packages/console/core/migrations/20250903035359_serious_whistler/snapshot.json
new file mode 100644
index 0000000000..8e0af76b5b
--- /dev/null
+++ b/packages/console/core/migrations/20250903035359_serious_whistler/snapshot.json
@@ -0,0 +1,967 @@
+{
+ "version": "6",
+ "id": "79b7ee25-1c1c-41ff-9bbf-754af257102b",
+ "prevIds": ["aee779c5-db1d-4655-95ec-6451c18455be"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0002_violet_loners.sql b/packages/console/core/migrations/20250911133331_violet_loners/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0002_violet_loners.sql
rename to packages/console/core/migrations/20250911133331_violet_loners/migration.sql
diff --git a/packages/console/core/migrations/20250911133331_violet_loners/snapshot.json b/packages/console/core/migrations/20250911133331_violet_loners/snapshot.json
new file mode 100644
index 0000000000..27f5a5dbbd
--- /dev/null
+++ b/packages/console/core/migrations/20250911133331_violet_loners/snapshot.json
@@ -0,0 +1,981 @@
+{
+ "version": "6",
+ "id": "9f51ef52-31ac-4ace-8b6d-39b35efe9c81",
+ "prevIds": ["79b7ee25-1c1c-41ff-9bbf-754af257102b"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0003_dusty_clint_barton.sql b/packages/console/core/migrations/20250911141957_dusty_clint_barton/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0003_dusty_clint_barton.sql
rename to packages/console/core/migrations/20250911141957_dusty_clint_barton/migration.sql
diff --git a/packages/console/core/migrations/20250911141957_dusty_clint_barton/snapshot.json b/packages/console/core/migrations/20250911141957_dusty_clint_barton/snapshot.json
new file mode 100644
index 0000000000..da412fed41
--- /dev/null
+++ b/packages/console/core/migrations/20250911141957_dusty_clint_barton/snapshot.json
@@ -0,0 +1,1001 @@
+{
+ "version": "6",
+ "id": "26cebd59-f553-441c-a2b2-2f9578a0ad2b",
+ "prevIds": ["9f51ef52-31ac-4ace-8b6d-39b35efe9c81"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0004_first_mockingbird.sql b/packages/console/core/migrations/20250911214917_first_mockingbird/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0004_first_mockingbird.sql
rename to packages/console/core/migrations/20250911214917_first_mockingbird/migration.sql
diff --git a/packages/console/core/migrations/20250911214917_first_mockingbird/snapshot.json b/packages/console/core/migrations/20250911214917_first_mockingbird/snapshot.json
new file mode 100644
index 0000000000..e0c84bb2d3
--- /dev/null
+++ b/packages/console/core/migrations/20250911214917_first_mockingbird/snapshot.json
@@ -0,0 +1,1015 @@
+{
+ "version": "6",
+ "id": "06dc6226-bfbb-4ccc-b4bc-f26070c3bed5",
+ "prevIds": ["26cebd59-f553-441c-a2b2-2f9578a0ad2b"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0005_jazzy_skrulls.sql b/packages/console/core/migrations/20250911231144_jazzy_skrulls/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0005_jazzy_skrulls.sql
rename to packages/console/core/migrations/20250911231144_jazzy_skrulls/migration.sql
diff --git a/packages/console/core/migrations/20250911231144_jazzy_skrulls/snapshot.json b/packages/console/core/migrations/20250911231144_jazzy_skrulls/snapshot.json
new file mode 100644
index 0000000000..57ef218deb
--- /dev/null
+++ b/packages/console/core/migrations/20250911231144_jazzy_skrulls/snapshot.json
@@ -0,0 +1,1015 @@
+{
+ "version": "6",
+ "id": "d13af80e-3c70-4866-8f14-48e7ff6ff0ff",
+ "prevIds": ["06dc6226-bfbb-4ccc-b4bc-f26070c3bed5"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0006_parallel_gauntlet.sql b/packages/console/core/migrations/20250912021148_parallel_gauntlet/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0006_parallel_gauntlet.sql
rename to packages/console/core/migrations/20250912021148_parallel_gauntlet/migration.sql
diff --git a/packages/console/core/migrations/20250912021148_parallel_gauntlet/snapshot.json b/packages/console/core/migrations/20250912021148_parallel_gauntlet/snapshot.json
new file mode 100644
index 0000000000..75472504c3
--- /dev/null
+++ b/packages/console/core/migrations/20250912021148_parallel_gauntlet/snapshot.json
@@ -0,0 +1,1043 @@
+{
+ "version": "6",
+ "id": "b0ad4b11-b607-46c7-8e2d-3b9823cdc5f7",
+ "prevIds": ["d13af80e-3c70-4866-8f14-48e7ff6ff0ff"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0007_familiar_nightshade.sql b/packages/console/core/migrations/20250912161749_familiar_nightshade/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0007_familiar_nightshade.sql
rename to packages/console/core/migrations/20250912161749_familiar_nightshade/migration.sql
diff --git a/packages/console/core/migrations/20250912161749_familiar_nightshade/snapshot.json b/packages/console/core/migrations/20250912161749_familiar_nightshade/snapshot.json
new file mode 100644
index 0000000000..5aa25052ab
--- /dev/null
+++ b/packages/console/core/migrations/20250912161749_familiar_nightshade/snapshot.json
@@ -0,0 +1,1029 @@
+{
+ "version": "6",
+ "id": "91067cc9-d492-47b3-932a-42dcc0920b3c",
+ "prevIds": ["b0ad4b11-b607-46c7-8e2d-3b9823cdc5f7"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0008_eminent_ultimatum.sql b/packages/console/core/migrations/20250914213824_eminent_ultimatum/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0008_eminent_ultimatum.sql
rename to packages/console/core/migrations/20250914213824_eminent_ultimatum/migration.sql
diff --git a/packages/console/core/migrations/20250914213824_eminent_ultimatum/snapshot.json b/packages/console/core/migrations/20250914213824_eminent_ultimatum/snapshot.json
new file mode 100644
index 0000000000..f7606b7862
--- /dev/null
+++ b/packages/console/core/migrations/20250914213824_eminent_ultimatum/snapshot.json
@@ -0,0 +1,1043 @@
+{
+ "version": "6",
+ "id": "3e080fc0-9efd-411f-b764-ed3aa4abcee5",
+ "prevIds": ["91067cc9-d492-47b3-932a-42dcc0920b3c"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0009_redundant_piledriver.sql b/packages/console/core/migrations/20250914222302_redundant_piledriver/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0009_redundant_piledriver.sql
rename to packages/console/core/migrations/20250914222302_redundant_piledriver/migration.sql
diff --git a/packages/console/core/migrations/20250914222302_redundant_piledriver/snapshot.json b/packages/console/core/migrations/20250914222302_redundant_piledriver/snapshot.json
new file mode 100644
index 0000000000..9f4163f61c
--- /dev/null
+++ b/packages/console/core/migrations/20250914222302_redundant_piledriver/snapshot.json
@@ -0,0 +1,1057 @@
+{
+ "version": "6",
+ "id": "b0019e1e-d365-4f67-be3d-a2e69bdddc04",
+ "prevIds": ["3e080fc0-9efd-411f-b764-ed3aa4abcee5"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "error",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0010_needy_sue_storm.sql b/packages/console/core/migrations/20250914232505_needy_sue_storm/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0010_needy_sue_storm.sql
rename to packages/console/core/migrations/20250914232505_needy_sue_storm/migration.sql
diff --git a/packages/console/core/migrations/20250914232505_needy_sue_storm/snapshot.json b/packages/console/core/migrations/20250914232505_needy_sue_storm/snapshot.json
new file mode 100644
index 0000000000..835c27e597
--- /dev/null
+++ b/packages/console/core/migrations/20250914232505_needy_sue_storm/snapshot.json
@@ -0,0 +1,1073 @@
+{
+ "version": "6",
+ "id": "1f08bd5a-436d-4905-a585-87b156847402",
+ "prevIds": ["b0019e1e-d365-4f67-be3d-a2e69bdddc04"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "error",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0011_freezing_phil_sheldon.sql b/packages/console/core/migrations/20250915150801_freezing_phil_sheldon/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0011_freezing_phil_sheldon.sql
rename to packages/console/core/migrations/20250915150801_freezing_phil_sheldon/migration.sql
diff --git a/packages/console/core/migrations/20250915150801_freezing_phil_sheldon/snapshot.json b/packages/console/core/migrations/20250915150801_freezing_phil_sheldon/snapshot.json
new file mode 100644
index 0000000000..e2f48178a8
--- /dev/null
+++ b/packages/console/core/migrations/20250915150801_freezing_phil_sheldon/snapshot.json
@@ -0,0 +1,1087 @@
+{
+ "version": "6",
+ "id": "cd9c94c4-9167-4346-b716-1bd0cff10ffc",
+ "prevIds": ["1f08bd5a-436d-4905-a585-87b156847402"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "last_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_last_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0012_bright_photon.sql b/packages/console/core/migrations/20250915172014_bright_photon/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0012_bright_photon.sql
rename to packages/console/core/migrations/20250915172014_bright_photon/migration.sql
diff --git a/packages/console/core/migrations/20250915172014_bright_photon/snapshot.json b/packages/console/core/migrations/20250915172014_bright_photon/snapshot.json
new file mode 100644
index 0000000000..eae20d54c0
--- /dev/null
+++ b/packages/console/core/migrations/20250915172014_bright_photon/snapshot.json
@@ -0,0 +1,1129 @@
+{
+ "version": "6",
+ "id": "ba801b30-747a-433e-ab43-b407c961a24c",
+ "prevIds": ["cd9c94c4-9167-4346-b716-1bd0cff10ffc"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "last_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_last_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0013_absurd_hobgoblin.sql b/packages/console/core/migrations/20250915172258_absurd_hobgoblin/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0013_absurd_hobgoblin.sql
rename to packages/console/core/migrations/20250915172258_absurd_hobgoblin/migration.sql
diff --git a/packages/console/core/migrations/20250915172258_absurd_hobgoblin/snapshot.json b/packages/console/core/migrations/20250915172258_absurd_hobgoblin/snapshot.json
new file mode 100644
index 0000000000..6c0a9b3836
--- /dev/null
+++ b/packages/console/core/migrations/20250915172258_absurd_hobgoblin/snapshot.json
@@ -0,0 +1,1129 @@
+{
+ "version": "6",
+ "id": "28336c91-553c-4d1d-9875-1ee761e47582",
+ "prevIds": ["ba801b30-747a-433e-ab43-b407c961a24c"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0014_demonic_princess_powerful.sql b/packages/console/core/migrations/20250919135159_demonic_princess_powerful/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0014_demonic_princess_powerful.sql
rename to packages/console/core/migrations/20250919135159_demonic_princess_powerful/migration.sql
diff --git a/packages/console/core/migrations/20250919135159_demonic_princess_powerful/snapshot.json b/packages/console/core/migrations/20250919135159_demonic_princess_powerful/snapshot.json
new file mode 100644
index 0000000000..c94526e91a
--- /dev/null
+++ b/packages/console/core/migrations/20250919135159_demonic_princess_powerful/snapshot.json
@@ -0,0 +1,1143 @@
+{
+ "version": "6",
+ "id": "12189a4e-5083-4b17-b8e3-8279c9a3e61a",
+ "prevIds": ["28336c91-553c-4d1d-9875-1ee761e47582"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "data_share",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0015_cloudy_revanche.sql b/packages/console/core/migrations/20250921042124_cloudy_revanche/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0015_cloudy_revanche.sql
rename to packages/console/core/migrations/20250921042124_cloudy_revanche/migration.sql
diff --git a/packages/console/core/migrations/20250921042124_cloudy_revanche/snapshot.json b/packages/console/core/migrations/20250921042124_cloudy_revanche/snapshot.json
new file mode 100644
index 0000000000..9de034489b
--- /dev/null
+++ b/packages/console/core/migrations/20250921042124_cloudy_revanche/snapshot.json
@@ -0,0 +1,1129 @@
+{
+ "version": "6",
+ "id": "7f3989cb-3e8b-430e-a0f5-f87051d1d824",
+ "prevIds": ["12189a4e-5083-4b17-b8e3-8279c9a3e61a"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0016_cold_la_nuit.sql b/packages/console/core/migrations/20250923213126_cold_la_nuit/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0016_cold_la_nuit.sql
rename to packages/console/core/migrations/20250923213126_cold_la_nuit/migration.sql
diff --git a/packages/console/core/migrations/20250923213126_cold_la_nuit/snapshot.json b/packages/console/core/migrations/20250923213126_cold_la_nuit/snapshot.json
new file mode 100644
index 0000000000..8f513193ed
--- /dev/null
+++ b/packages/console/core/migrations/20250923213126_cold_la_nuit/snapshot.json
@@ -0,0 +1,1143 @@
+{
+ "version": "6",
+ "id": "45b67fb4-77ce-4aa2-b883-1971429c69f5",
+ "prevIds": ["7f3989cb-3e8b-430e-a0f5-f87051d1d824"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0017_woozy_thaddeus_ross.sql b/packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0017_woozy_thaddeus_ross.sql
rename to packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/migration.sql
diff --git a/packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/snapshot.json b/packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/snapshot.json
new file mode 100644
index 0000000000..4a6758c6be
--- /dev/null
+++ b/packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/snapshot.json
@@ -0,0 +1,1157 @@
+{
+ "version": "6",
+ "id": "100a21cf-ff9c-476f-bf7d-100c1824b2b2",
+ "prevIds": ["45b67fb4-77ce-4aa2-b883-1971429c69f5"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0018_nervous_iron_lad.sql b/packages/console/core/migrations/20250928163425_nervous_iron_lad/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0018_nervous_iron_lad.sql
rename to packages/console/core/migrations/20250928163425_nervous_iron_lad/migration.sql
diff --git a/packages/console/core/migrations/20250928163425_nervous_iron_lad/snapshot.json b/packages/console/core/migrations/20250928163425_nervous_iron_lad/snapshot.json
new file mode 100644
index 0000000000..a23bd3c8ef
--- /dev/null
+++ b/packages/console/core/migrations/20250928163425_nervous_iron_lad/snapshot.json
@@ -0,0 +1,1185 @@
+{
+ "version": "6",
+ "id": "e9c91c2d-787d-4234-b98d-1620e4ce80e1",
+ "prevIds": ["100a21cf-ff9c-476f-bf7d-100c1824b2b2"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_joined",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0019_dazzling_cable.sql b/packages/console/core/migrations/20250928235456_dazzling_cable/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0019_dazzling_cable.sql
rename to packages/console/core/migrations/20250928235456_dazzling_cable/migration.sql
diff --git a/packages/console/core/migrations/20250928235456_dazzling_cable/snapshot.json b/packages/console/core/migrations/20250928235456_dazzling_cable/snapshot.json
new file mode 100644
index 0000000000..4f52f4b0b5
--- /dev/null
+++ b/packages/console/core/migrations/20250928235456_dazzling_cable/snapshot.json
@@ -0,0 +1,1185 @@
+{
+ "version": "6",
+ "id": "a2bb7222-561c-45f0-8939-8ef9b8e57bb3",
+ "prevIds": ["e9c91c2d-787d-4234-b98d-1620e4ce80e1"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_joined",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0020_supreme_jack_power.sql b/packages/console/core/migrations/20250929181457_supreme_jack_power/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0020_supreme_jack_power.sql
rename to packages/console/core/migrations/20250929181457_supreme_jack_power/migration.sql
diff --git a/packages/console/core/migrations/20250929181457_supreme_jack_power/snapshot.json b/packages/console/core/migrations/20250929181457_supreme_jack_power/snapshot.json
new file mode 100644
index 0000000000..6808c0fd5b
--- /dev/null
+++ b/packages/console/core/migrations/20250929181457_supreme_jack_power/snapshot.json
@@ -0,0 +1,1171 @@
+{
+ "version": "6",
+ "id": "908437f9-54ed-4c83-b555-614926e326f8",
+ "prevIds": ["a2bb7222-561c-45f0-8939-8ef9b8e57bb3"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0021_flawless_clea.sql b/packages/console/core/migrations/20250929224703_flawless_clea/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0021_flawless_clea.sql
rename to packages/console/core/migrations/20250929224703_flawless_clea/migration.sql
diff --git a/packages/console/core/migrations/20250929224703_flawless_clea/snapshot.json b/packages/console/core/migrations/20250929224703_flawless_clea/snapshot.json
new file mode 100644
index 0000000000..5c2ab1a4b1
--- /dev/null
+++ b/packages/console/core/migrations/20250929224703_flawless_clea/snapshot.json
@@ -0,0 +1,1185 @@
+{
+ "version": "6",
+ "id": "14616ba2-c21e-4787-a289-f2a3eb6de04f",
+ "prevIds": ["908437f9-54ed-4c83-b555-614926e326f8"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0022_nice_dreadnoughts.sql b/packages/console/core/migrations/20251002175032_nice_dreadnoughts/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0022_nice_dreadnoughts.sql
rename to packages/console/core/migrations/20251002175032_nice_dreadnoughts/migration.sql
diff --git a/packages/console/core/migrations/20251002175032_nice_dreadnoughts/snapshot.json b/packages/console/core/migrations/20251002175032_nice_dreadnoughts/snapshot.json
new file mode 100644
index 0000000000..12dd96929f
--- /dev/null
+++ b/packages/console/core/migrations/20251002175032_nice_dreadnoughts/snapshot.json
@@ -0,0 +1,1233 @@
+{
+ "version": "6",
+ "id": "2296e9e4-bee6-485b-a146-6666ac8dc0d0",
+ "prevIds": ["14616ba2-c21e-4787-a289-f2a3eb6de04f"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0023_optimal_paibok.sql b/packages/console/core/migrations/20251002223020_optimal_paibok/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0023_optimal_paibok.sql
rename to packages/console/core/migrations/20251002223020_optimal_paibok/migration.sql
diff --git a/packages/console/core/migrations/20251002223020_optimal_paibok/snapshot.json b/packages/console/core/migrations/20251002223020_optimal_paibok/snapshot.json
new file mode 100644
index 0000000000..21f2b0ed2c
--- /dev/null
+++ b/packages/console/core/migrations/20251002223020_optimal_paibok/snapshot.json
@@ -0,0 +1,1265 @@
+{
+ "version": "6",
+ "id": "6857f409-1b5d-4752-9d65-a82ee70e6ad2",
+ "prevIds": ["2296e9e4-bee6-485b-a146-6666ac8dc0d0"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0024_early_black_crow.sql b/packages/console/core/migrations/20251003202205_early_black_crow/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0024_early_black_crow.sql
rename to packages/console/core/migrations/20251003202205_early_black_crow/migration.sql
diff --git a/packages/console/core/migrations/20251003202205_early_black_crow/snapshot.json b/packages/console/core/migrations/20251003202205_early_black_crow/snapshot.json
new file mode 100644
index 0000000000..638be654c6
--- /dev/null
+++ b/packages/console/core/migrations/20251003202205_early_black_crow/snapshot.json
@@ -0,0 +1,1237 @@
+{
+ "version": "6",
+ "id": "6d546f3e-17b2-4195-bb10-7e6d91774bd7",
+ "prevIds": ["6857f409-1b5d-4752-9d65-a82ee70e6ad2"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0025_legal_joseph.sql b/packages/console/core/migrations/20251003210411_legal_joseph/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0025_legal_joseph.sql
rename to packages/console/core/migrations/20251003210411_legal_joseph/migration.sql
diff --git a/packages/console/core/migrations/20251003210411_legal_joseph/snapshot.json b/packages/console/core/migrations/20251003210411_legal_joseph/snapshot.json
new file mode 100644
index 0000000000..6366356446
--- /dev/null
+++ b/packages/console/core/migrations/20251003210411_legal_joseph/snapshot.json
@@ -0,0 +1,1251 @@
+{
+ "version": "6",
+ "id": "ce444765-0606-4880-970a-2176bc2a78ac",
+ "prevIds": ["6d546f3e-17b2-4195-bb10-7e6d91774bd7"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "name",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "name",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0026_numerous_prodigy.sql b/packages/console/core/migrations/20251004030300_numerous_prodigy/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0026_numerous_prodigy.sql
rename to packages/console/core/migrations/20251004030300_numerous_prodigy/migration.sql
diff --git a/packages/console/core/migrations/20251004030300_numerous_prodigy/snapshot.json b/packages/console/core/migrations/20251004030300_numerous_prodigy/snapshot.json
new file mode 100644
index 0000000000..1588e6b8e3
--- /dev/null
+++ b/packages/console/core/migrations/20251004030300_numerous_prodigy/snapshot.json
@@ -0,0 +1,1231 @@
+{
+ "version": "6",
+ "id": "9e1313c7-ca78-4d2c-b13b-625d9d6fcaa3",
+ "prevIds": ["ce444765-0606-4880-970a-2176bc2a78ac"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "actor",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "old_name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0027_hot_wong.sql b/packages/console/core/migrations/20251004045106_hot_wong/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0027_hot_wong.sql
rename to packages/console/core/migrations/20251004045106_hot_wong/migration.sql
diff --git a/packages/console/core/migrations/20251004045106_hot_wong/snapshot.json b/packages/console/core/migrations/20251004045106_hot_wong/snapshot.json
new file mode 100644
index 0000000000..15467efc38
--- /dev/null
+++ b/packages/console/core/migrations/20251004045106_hot_wong/snapshot.json
@@ -0,0 +1,1203 @@
+{
+ "version": "6",
+ "id": "05e873f6-1556-4bcb-8e19-14971e37610a",
+ "prevIds": ["9e1313c7-ca78-4d2c-b13b-625d9d6fcaa3"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0028_careful_cerise.sql b/packages/console/core/migrations/20251007024345_careful_cerise/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0028_careful_cerise.sql
rename to packages/console/core/migrations/20251007024345_careful_cerise/migration.sql
diff --git a/packages/console/core/migrations/20251007024345_careful_cerise/snapshot.json b/packages/console/core/migrations/20251007024345_careful_cerise/snapshot.json
new file mode 100644
index 0000000000..7dd21cfe14
--- /dev/null
+++ b/packages/console/core/migrations/20251007024345_careful_cerise/snapshot.json
@@ -0,0 +1,1203 @@
+{
+ "version": "6",
+ "id": "a331e38c-c2e3-406d-a1ff-b0af7229cd85",
+ "prevIds": ["05e873f6-1556-4bcb-8e19-14971e37610a"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0029_panoramic_harrier.sql b/packages/console/core/migrations/20251007043715_panoramic_harrier/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0029_panoramic_harrier.sql
rename to packages/console/core/migrations/20251007043715_panoramic_harrier/migration.sql
diff --git a/packages/console/core/migrations/20251007043715_panoramic_harrier/snapshot.json b/packages/console/core/migrations/20251007043715_panoramic_harrier/snapshot.json
new file mode 100644
index 0000000000..610ce90114
--- /dev/null
+++ b/packages/console/core/migrations/20251007043715_panoramic_harrier/snapshot.json
@@ -0,0 +1,1245 @@
+{
+ "version": "6",
+ "id": "33551b4c-fc2e-4753-8d9d-0971f333e65d",
+ "prevIds": ["a331e38c-c2e3-406d-a1ff-b0af7229cd85"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0030_ordinary_ultragirl.sql b/packages/console/core/migrations/20251007230438_ordinary_ultragirl/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0030_ordinary_ultragirl.sql
rename to packages/console/core/migrations/20251007230438_ordinary_ultragirl/migration.sql
diff --git a/packages/console/core/migrations/20251007230438_ordinary_ultragirl/snapshot.json b/packages/console/core/migrations/20251007230438_ordinary_ultragirl/snapshot.json
new file mode 100644
index 0000000000..77205c73d2
--- /dev/null
+++ b/packages/console/core/migrations/20251007230438_ordinary_ultragirl/snapshot.json
@@ -0,0 +1,1359 @@
+{
+ "version": "6",
+ "id": "eae45fcf-dc0f-4756-bc5d-30791f2965a2",
+ "prevIds": ["33551b4c-fc2e-4753-8d9d-0971f333e65d"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0031_outgoing_outlaw_kid.sql b/packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0031_outgoing_outlaw_kid.sql
rename to packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/migration.sql
diff --git a/packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/snapshot.json b/packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/snapshot.json
new file mode 100644
index 0000000000..d91bd7d1aa
--- /dev/null
+++ b/packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/snapshot.json
@@ -0,0 +1,1487 @@
+{
+ "version": "6",
+ "id": "9dceb591-8e08-4991-a49c-1f1741ec1e57",
+ "prevIds": ["eae45fcf-dc0f-4756-bc5d-30791f2965a2"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0032_white_doctor_doom.sql b/packages/console/core/migrations/20251009021849_white_doctor_doom/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0032_white_doctor_doom.sql
rename to packages/console/core/migrations/20251009021849_white_doctor_doom/migration.sql
diff --git a/packages/console/core/migrations/20251009021849_white_doctor_doom/snapshot.json b/packages/console/core/migrations/20251009021849_white_doctor_doom/snapshot.json
new file mode 100644
index 0000000000..6fe9fd5dc0
--- /dev/null
+++ b/packages/console/core/migrations/20251009021849_white_doctor_doom/snapshot.json
@@ -0,0 +1,1501 @@
+{
+ "version": "6",
+ "id": "b2406421-f22d-4153-a2a4-6deafe70ee54",
+ "prevIds": ["9dceb591-8e08-4991-a49c-1f1741ec1e57"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0033_cynical_jack_flag.sql b/packages/console/core/migrations/20251016175624_cynical_jack_flag/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0033_cynical_jack_flag.sql
rename to packages/console/core/migrations/20251016175624_cynical_jack_flag/migration.sql
diff --git a/packages/console/core/migrations/20251016175624_cynical_jack_flag/snapshot.json b/packages/console/core/migrations/20251016175624_cynical_jack_flag/snapshot.json
new file mode 100644
index 0000000000..3ea26248b3
--- /dev/null
+++ b/packages/console/core/migrations/20251016175624_cynical_jack_flag/snapshot.json
@@ -0,0 +1,1515 @@
+{
+ "version": "6",
+ "id": "91ef8fda-ca96-4a3f-af29-dd6ae7136398",
+ "prevIds": ["b2406421-f22d-4153-a2a4-6deafe70ee54"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0034_short_bulldozer.sql b/packages/console/core/migrations/20251016214520_short_bulldozer/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0034_short_bulldozer.sql
rename to packages/console/core/migrations/20251016214520_short_bulldozer/migration.sql
diff --git a/packages/console/core/migrations/20251016214520_short_bulldozer/snapshot.json b/packages/console/core/migrations/20251016214520_short_bulldozer/snapshot.json
new file mode 100644
index 0000000000..c22274da05
--- /dev/null
+++ b/packages/console/core/migrations/20251016214520_short_bulldozer/snapshot.json
@@ -0,0 +1,1637 @@
+{
+ "version": "6",
+ "id": "34706440-26d7-43f5-9b39-815aa912e5ef",
+ "prevIds": ["91ef8fda-ca96-4a3f-af29-dd6ae7136398"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "email",
+ "table": "account",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0035_narrow_blindfold.sql b/packages/console/core/migrations/20251017015733_narrow_blindfold/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0035_narrow_blindfold.sql
rename to packages/console/core/migrations/20251017015733_narrow_blindfold/migration.sql
diff --git a/packages/console/core/migrations/20251017015733_narrow_blindfold/snapshot.json b/packages/console/core/migrations/20251017015733_narrow_blindfold/snapshot.json
new file mode 100644
index 0000000000..0266131452
--- /dev/null
+++ b/packages/console/core/migrations/20251017015733_narrow_blindfold/snapshot.json
@@ -0,0 +1,1623 @@
+{
+ "version": "6",
+ "id": "10169105-4545-4894-838b-004c0a42c584",
+ "prevIds": ["34706440-26d7-43f5-9b39-815aa912e5ef"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0036_slimy_energizer.sql b/packages/console/core/migrations/20251017024232_slimy_energizer/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0036_slimy_energizer.sql
rename to packages/console/core/migrations/20251017024232_slimy_energizer/migration.sql
diff --git a/packages/console/core/migrations/20251017024232_slimy_energizer/snapshot.json b/packages/console/core/migrations/20251017024232_slimy_energizer/snapshot.json
new file mode 100644
index 0000000000..106aa33c6d
--- /dev/null
+++ b/packages/console/core/migrations/20251017024232_slimy_energizer/snapshot.json
@@ -0,0 +1,1635 @@
+{
+ "version": "6",
+ "id": "5470c8b4-296d-47bd-85a7-88cfd3b71434",
+ "prevIds": ["10169105-4545-4894-838b-004c0a42c584"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0037_messy_jackal.sql b/packages/console/core/migrations/20251031163113_messy_jackal/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0037_messy_jackal.sql
rename to packages/console/core/migrations/20251031163113_messy_jackal/migration.sql
diff --git a/packages/console/core/migrations/20251031163113_messy_jackal/snapshot.json b/packages/console/core/migrations/20251031163113_messy_jackal/snapshot.json
new file mode 100644
index 0000000000..27f03383a6
--- /dev/null
+++ b/packages/console/core/migrations/20251031163113_messy_jackal/snapshot.json
@@ -0,0 +1,1663 @@
+{
+ "version": "6",
+ "id": "8b7fa839-a088-408e-84a4-1a07325c0290",
+ "prevIds": ["5470c8b4-296d-47bd-85a7-88cfd3b71434"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0038_famous_magik.sql b/packages/console/core/migrations/20251125223403_famous_magik/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0038_famous_magik.sql
rename to packages/console/core/migrations/20251125223403_famous_magik/migration.sql
diff --git a/packages/console/core/migrations/20251125223403_famous_magik/snapshot.json b/packages/console/core/migrations/20251125223403_famous_magik/snapshot.json
new file mode 100644
index 0000000000..5250b41461
--- /dev/null
+++ b/packages/console/core/migrations/20251125223403_famous_magik/snapshot.json
@@ -0,0 +1,1743 @@
+{
+ "version": "6",
+ "id": "9d5d9885-7ec5-45f6-ac53-45a8e25dede7",
+ "prevIds": ["8b7fa839-a088-408e-84a4-1a07325c0290"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0039_striped_forge.sql b/packages/console/core/migrations/20251228182259_striped_forge/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0039_striped_forge.sql
rename to packages/console/core/migrations/20251228182259_striped_forge/migration.sql
diff --git a/packages/console/core/migrations/20251228182259_striped_forge/snapshot.json b/packages/console/core/migrations/20251228182259_striped_forge/snapshot.json
new file mode 100644
index 0000000000..0a540a4b9f
--- /dev/null
+++ b/packages/console/core/migrations/20251228182259_striped_forge/snapshot.json
@@ -0,0 +1,1867 @@
+{
+ "version": "6",
+ "id": "49a1ac05-78ab-4aae-908e-d4aeeb8196fc",
+ "prevIds": ["9d5d9885-7ec5-45f6-ac53-45a8e25dede7"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0040_broken_gamora.sql b/packages/console/core/migrations/20260105034337_broken_gamora/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0040_broken_gamora.sql
rename to packages/console/core/migrations/20260105034337_broken_gamora/migration.sql
diff --git a/packages/console/core/migrations/20260105034337_broken_gamora/snapshot.json b/packages/console/core/migrations/20260105034337_broken_gamora/snapshot.json
new file mode 100644
index 0000000000..04e088505b
--- /dev/null
+++ b/packages/console/core/migrations/20260105034337_broken_gamora/snapshot.json
@@ -0,0 +1,1887 @@
+{
+ "version": "6",
+ "id": "bf19cd74-71f9-4bdf-b50e-67c2436f3408",
+ "prevIds": ["49a1ac05-78ab-4aae-908e-d4aeeb8196fc"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0041_odd_misty_knight.sql b/packages/console/core/migrations/20260106204919_odd_misty_knight/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0041_odd_misty_knight.sql
rename to packages/console/core/migrations/20260106204919_odd_misty_knight/migration.sql
diff --git a/packages/console/core/migrations/20260106204919_odd_misty_knight/snapshot.json b/packages/console/core/migrations/20260106204919_odd_misty_knight/snapshot.json
new file mode 100644
index 0000000000..17a9730364
--- /dev/null
+++ b/packages/console/core/migrations/20260106204919_odd_misty_knight/snapshot.json
@@ -0,0 +1,1939 @@
+{
+ "version": "6",
+ "id": "9cf10c24-6029-4cb4-866e-ff9b501eaf7e",
+ "prevIds": ["bf19cd74-71f9-4bdf-b50e-67c2436f3408"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0042_flat_nightmare.sql b/packages/console/core/migrations/20260107000117_flat_nightmare/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0042_flat_nightmare.sql
rename to packages/console/core/migrations/20260107000117_flat_nightmare/migration.sql
diff --git a/packages/console/core/migrations/20260107000117_flat_nightmare/snapshot.json b/packages/console/core/migrations/20260107000117_flat_nightmare/snapshot.json
new file mode 100644
index 0000000000..179c712ba7
--- /dev/null
+++ b/packages/console/core/migrations/20260107000117_flat_nightmare/snapshot.json
@@ -0,0 +1,2037 @@
+{
+ "version": "6",
+ "id": "4775571c-ad9c-4104-a202-2374b1963cfe",
+ "prevIds": ["9cf10c24-6029-4cb4-866e-ff9b501eaf7e"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "data",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscribed",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_recent_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_recent_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0043_lame_calypso.sql b/packages/console/core/migrations/20260107022356_lame_calypso/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0043_lame_calypso.sql
rename to packages/console/core/migrations/20260107022356_lame_calypso/migration.sql
diff --git a/packages/console/core/migrations/20260107022356_lame_calypso/snapshot.json b/packages/console/core/migrations/20260107022356_lame_calypso/snapshot.json
new file mode 100644
index 0000000000..27b00b6e00
--- /dev/null
+++ b/packages/console/core/migrations/20260107022356_lame_calypso/snapshot.json
@@ -0,0 +1,2037 @@
+{
+ "version": "6",
+ "id": "3ff862f3-eeb6-4b10-8c78-254de3778ab3",
+ "prevIds": ["4775571c-ad9c-4104-a202-2374b1963cfe"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "data",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscribed",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_interval_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_interval_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0044_tiny_captain_midlands.sql b/packages/console/core/migrations/20260107041522_tiny_captain_midlands/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0044_tiny_captain_midlands.sql
rename to packages/console/core/migrations/20260107041522_tiny_captain_midlands/migration.sql
diff --git a/packages/console/core/migrations/20260107041522_tiny_captain_midlands/snapshot.json b/packages/console/core/migrations/20260107041522_tiny_captain_midlands/snapshot.json
new file mode 100644
index 0000000000..088f95612d
--- /dev/null
+++ b/packages/console/core/migrations/20260107041522_tiny_captain_midlands/snapshot.json
@@ -0,0 +1,2037 @@
+{
+ "version": "6",
+ "id": "70394850-2c28-4012-a3d5-69357e3348b6",
+ "prevIds": ["3ff862f3-eeb6-4b10-8c78-254de3778ab3"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscribed",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_interval_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_interval_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0045_cuddly_diamondback.sql b/packages/console/core/migrations/20260107055817_cuddly_diamondback/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0045_cuddly_diamondback.sql
rename to packages/console/core/migrations/20260107055817_cuddly_diamondback/migration.sql
diff --git a/packages/console/core/migrations/20260107055817_cuddly_diamondback/snapshot.json b/packages/console/core/migrations/20260107055817_cuddly_diamondback/snapshot.json
new file mode 100644
index 0000000000..03fe57605a
--- /dev/null
+++ b/packages/console/core/migrations/20260107055817_cuddly_diamondback/snapshot.json
@@ -0,0 +1,2053 @@
+{
+ "version": "6",
+ "id": "27c1a3eb-b125-46d4-b436-abe5764fe4b7",
+ "prevIds": ["70394850-2c28-4012-a3d5-69357e3348b6"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscribed",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_interval_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_interval_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0046_charming_black_bolt.sql b/packages/console/core/migrations/20260108224422_charming_black_bolt/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0046_charming_black_bolt.sql
rename to packages/console/core/migrations/20260108224422_charming_black_bolt/migration.sql
diff --git a/packages/console/core/migrations/20260108224422_charming_black_bolt/snapshot.json b/packages/console/core/migrations/20260108224422_charming_black_bolt/snapshot.json
new file mode 100644
index 0000000000..90142e70ed
--- /dev/null
+++ b/packages/console/core/migrations/20260108224422_charming_black_bolt/snapshot.json
@@ -0,0 +1,2203 @@
+{
+ "version": "6",
+ "id": "f3725f6d-5f33-4497-b4ba-cf05c46fb873",
+ "prevIds": ["27c1a3eb-b125-46d4-b436-abe5764fe4b7"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscribed",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_interval_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_interval_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "sub_time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0047_huge_omega_red.sql b/packages/console/core/migrations/20260109000245_huge_omega_red/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0047_huge_omega_red.sql
rename to packages/console/core/migrations/20260109000245_huge_omega_red/migration.sql
diff --git a/packages/console/core/migrations/20260109000245_huge_omega_red/snapshot.json b/packages/console/core/migrations/20260109000245_huge_omega_red/snapshot.json
new file mode 100644
index 0000000000..dad3cdbfa6
--- /dev/null
+++ b/packages/console/core/migrations/20260109000245_huge_omega_red/snapshot.json
@@ -0,0 +1,2153 @@
+{
+ "version": "6",
+ "id": "fec4cb15-6f13-465d-a902-b76b026872f4",
+ "prevIds": ["f3725f6d-5f33-4497-b4ba-cf05c46fb873"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0048_mean_frank_castle.sql b/packages/console/core/migrations/20260109001625_mean_frank_castle/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0048_mean_frank_castle.sql
rename to packages/console/core/migrations/20260109001625_mean_frank_castle/migration.sql
diff --git a/packages/console/core/migrations/20260109001625_mean_frank_castle/snapshot.json b/packages/console/core/migrations/20260109001625_mean_frank_castle/snapshot.json
new file mode 100644
index 0000000000..9a43cd2bdf
--- /dev/null
+++ b/packages/console/core/migrations/20260109001625_mean_frank_castle/snapshot.json
@@ -0,0 +1,2153 @@
+{
+ "version": "6",
+ "id": "bb90bb3e-fd08-439a-b92f-5f433807480e",
+ "prevIds": ["fec4cb15-6f13-465d-a902-b76b026872f4"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0049_noisy_domino.sql b/packages/console/core/migrations/20260109014234_noisy_domino/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0049_noisy_domino.sql
rename to packages/console/core/migrations/20260109014234_noisy_domino/migration.sql
diff --git a/packages/console/core/migrations/20260109014234_noisy_domino/snapshot.json b/packages/console/core/migrations/20260109014234_noisy_domino/snapshot.json
new file mode 100644
index 0000000000..0e6084f51e
--- /dev/null
+++ b/packages/console/core/migrations/20260109014234_noisy_domino/snapshot.json
@@ -0,0 +1,2167 @@
+{
+ "version": "6",
+ "id": "2fd0308b-0653-437d-aea3-29428a4de9f1",
+ "prevIds": ["bb90bb3e-fd08-439a-b92f-5f433807480e"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_coupon_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0050_bumpy_mephistopheles.sql b/packages/console/core/migrations/20260109040130_bumpy_mephistopheles/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0050_bumpy_mephistopheles.sql
rename to packages/console/core/migrations/20260109040130_bumpy_mephistopheles/migration.sql
diff --git a/packages/console/core/migrations/20260109040130_bumpy_mephistopheles/snapshot.json b/packages/console/core/migrations/20260109040130_bumpy_mephistopheles/snapshot.json
new file mode 100644
index 0000000000..ebff34d85d
--- /dev/null
+++ b/packages/console/core/migrations/20260109040130_bumpy_mephistopheles/snapshot.json
@@ -0,0 +1,2181 @@
+{
+ "version": "6",
+ "id": "a0d18802-c390-47d4-98f1-d1f83869cf0c",
+ "prevIds": ["2fd0308b-0653-437d-aea3-29428a4de9f1"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_coupon_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0051_jazzy_green_goblin.sql b/packages/console/core/migrations/20260113215232_jazzy_green_goblin/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0051_jazzy_green_goblin.sql
rename to packages/console/core/migrations/20260113215232_jazzy_green_goblin/migration.sql
diff --git a/packages/console/core/migrations/20260113215232_jazzy_green_goblin/snapshot.json b/packages/console/core/migrations/20260113215232_jazzy_green_goblin/snapshot.json
new file mode 100644
index 0000000000..f03e37f2f5
--- /dev/null
+++ b/packages/console/core/migrations/20260113215232_jazzy_green_goblin/snapshot.json
@@ -0,0 +1,2195 @@
+{
+ "version": "6",
+ "id": "14cbf4c8-55f1-4488-956f-56fb5ccb3a5a",
+ "prevIds": ["a0d18802-c390-47d4-98f1-d1f83869cf0c"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_coupon_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_booked",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0052_aromatic_agent_zero.sql b/packages/console/core/migrations/20260113223840_aromatic_agent_zero/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0052_aromatic_agent_zero.sql
rename to packages/console/core/migrations/20260113223840_aromatic_agent_zero/migration.sql
diff --git a/packages/console/core/migrations/20260113223840_aromatic_agent_zero/snapshot.json b/packages/console/core/migrations/20260113223840_aromatic_agent_zero/snapshot.json
new file mode 100644
index 0000000000..000b6f5562
--- /dev/null
+++ b/packages/console/core/migrations/20260113223840_aromatic_agent_zero/snapshot.json
@@ -0,0 +1,2209 @@
+{
+ "version": "6",
+ "id": "00774acd-a1e5-49c0-b296-cacc9506a566",
+ "prevIds": ["14cbf4c8-55f1-4488-956f-56fb5ccb3a5a"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_coupon_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('20','100','200')",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_plan",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_booked",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0053_gigantic_hardball.sql b/packages/console/core/migrations/20260116213606_gigantic_hardball/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0053_gigantic_hardball.sql
rename to packages/console/core/migrations/20260116213606_gigantic_hardball/migration.sql
diff --git a/packages/console/core/migrations/20260116213606_gigantic_hardball/snapshot.json b/packages/console/core/migrations/20260116213606_gigantic_hardball/snapshot.json
new file mode 100644
index 0000000000..d62a4ca582
--- /dev/null
+++ b/packages/console/core/migrations/20260116213606_gigantic_hardball/snapshot.json
@@ -0,0 +1,2223 @@
+{
+ "version": "6",
+ "id": "32a0c40b-a269-4ad1-a5a0-52b1f18932aa",
+ "prevIds": ["00774acd-a1e5-49c0-b296-cacc9506a566"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_coupon_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('20','100','200')",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_plan",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_booked",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0054_numerous_annihilus.sql b/packages/console/core/migrations/20260116224745_numerous_annihilus/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0054_numerous_annihilus.sql
rename to packages/console/core/migrations/20260116224745_numerous_annihilus/migration.sql
diff --git a/packages/console/core/migrations/20260116224745_numerous_annihilus/snapshot.json b/packages/console/core/migrations/20260116224745_numerous_annihilus/snapshot.json
new file mode 100644
index 0000000000..85f6c848a9
--- /dev/null
+++ b/packages/console/core/migrations/20260116224745_numerous_annihilus/snapshot.json
@@ -0,0 +1,2209 @@
+{
+ "version": "6",
+ "id": "a0ade64b-b735-4a70-8d39-ebd84bc9e924",
+ "prevIds": ["32a0c40b-a269-4ad1-a5a0-52b1f18932aa"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('20','100','200')",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_plan",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_booked",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/0055_moaning_karnak.sql b/packages/console/core/migrations/20260122190905_moaning_karnak/migration.sql
similarity index 100%
rename from packages/console/core/migrations/0055_moaning_karnak.sql
rename to packages/console/core/migrations/20260122190905_moaning_karnak/migration.sql
diff --git a/packages/console/core/migrations/20260122190905_moaning_karnak/snapshot.json b/packages/console/core/migrations/20260122190905_moaning_karnak/snapshot.json
new file mode 100644
index 0000000000..cb606b01ae
--- /dev/null
+++ b/packages/console/core/migrations/20260122190905_moaning_karnak/snapshot.json
@@ -0,0 +1,2223 @@
+{
+ "version": "6",
+ "id": "e630f63c-04a8-4b59-bf56-03efcdd1b011",
+ "prevIds": ["a0ade64b-b735-4a70-8d39-ebd84bc9e924"],
+ "dialect": "mysql",
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "account",
+ "entityType": "columns"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "columns"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "table": "benchmark",
+ "entityType": "columns"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('20','100','200')",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_plan",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_booked",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_selected",
+ "table": "billing",
+ "entityType": "columns"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "payment",
+ "entityType": "columns"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "table": "subscription",
+ "entityType": "columns"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "table": "usage",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "table": "ip_rate_limit",
+ "entityType": "columns"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "table": "ip",
+ "entityType": "columns"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "table": "key",
+ "entityType": "columns"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "table": "model",
+ "entityType": "columns"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "table": "provider",
+ "entityType": "columns"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "table": "user",
+ "entityType": "columns"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "table": "workspace",
+ "entityType": "columns"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "table": "auth",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "table": "benchmark",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "table": "billing",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "table": "subscription",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "table": "usage",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "table": "key",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "table": "model",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "table": "provider",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "table": "user",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "table": "workspace",
+ "entityType": "indexes"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/20260222233442_clever_toxin/migration.sql b/packages/console/core/migrations/20260222233442_clever_toxin/migration.sql
new file mode 100644
index 0000000000..03cfe4c033
--- /dev/null
+++ b/packages/console/core/migrations/20260222233442_clever_toxin/migration.sql
@@ -0,0 +1 @@
+ALTER TABLE `usage` ADD `session_id` varchar(30);
\ No newline at end of file
diff --git a/packages/console/core/migrations/20260222233442_clever_toxin/snapshot.json b/packages/console/core/migrations/20260222233442_clever_toxin/snapshot.json
new file mode 100644
index 0000000000..a91dacd60e
--- /dev/null
+++ b/packages/console/core/migrations/20260222233442_clever_toxin/snapshot.json
@@ -0,0 +1,2237 @@
+{
+ "version": "6",
+ "dialect": "mysql",
+ "id": "4bf45b3f-3edd-4db7-94d5-097aa55ca5f7",
+ "prevIds": ["e630f63c-04a8-4b59-bf56-03efcdd1b011"],
+ "ddl": [
+ {
+ "name": "account",
+ "entityType": "tables"
+ },
+ {
+ "name": "auth",
+ "entityType": "tables"
+ },
+ {
+ "name": "benchmark",
+ "entityType": "tables"
+ },
+ {
+ "name": "billing",
+ "entityType": "tables"
+ },
+ {
+ "name": "payment",
+ "entityType": "tables"
+ },
+ {
+ "name": "subscription",
+ "entityType": "tables"
+ },
+ {
+ "name": "usage",
+ "entityType": "tables"
+ },
+ {
+ "name": "ip_rate_limit",
+ "entityType": "tables"
+ },
+ {
+ "name": "ip",
+ "entityType": "tables"
+ },
+ {
+ "name": "key",
+ "entityType": "tables"
+ },
+ {
+ "name": "model",
+ "entityType": "tables"
+ },
+ {
+ "name": "provider",
+ "entityType": "tables"
+ },
+ {
+ "name": "user",
+ "entityType": "tables"
+ },
+ {
+ "name": "workspace",
+ "entityType": "tables"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "account"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "account"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "account"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "account"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "enum('email','github','google')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subject",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "entityType": "columns",
+ "table": "auth"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "agent",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "mediumtext",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "result",
+ "entityType": "columns",
+ "table": "benchmark"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_id",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(32)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_type",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(4)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_method_last4",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "balance",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "boolean",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_trigger",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_amount",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reload_error",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_error",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_reload_locked_till",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(28)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_id",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "enum('20','100','200')",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "subscription_plan",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_booked",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_subscription_selected",
+ "entityType": "columns",
+ "table": "billing"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "customer_id",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "invoice_id",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "payment_id",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "amount",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_refunded",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "entityType": "columns",
+ "table": "payment"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "rolling_usage",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "fixed_usage",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_rolling_updated",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_fixed_updated",
+ "entityType": "columns",
+ "table": "subscription"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "input_tokens",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "output_tokens",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "reasoning_tokens",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_read_tokens",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_5m_tokens",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cache_write_1h_tokens",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "bigint",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "cost",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key_id",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "session_id",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "json",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "enrichment",
+ "entityType": "columns",
+ "table": "usage"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "entityType": "columns",
+ "table": "ip_rate_limit"
+ },
+ {
+ "type": "varchar(10)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "interval",
+ "entityType": "columns",
+ "table": "ip_rate_limit"
+ },
+ {
+ "type": "int",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "count",
+ "entityType": "columns",
+ "table": "ip_rate_limit"
+ },
+ {
+ "type": "varchar(45)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "ip",
+ "entityType": "columns",
+ "table": "ip"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "ip"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "ip"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "ip"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "usage",
+ "entityType": "columns",
+ "table": "ip"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "key",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "user_id",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_used",
+ "entityType": "columns",
+ "table": "key"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "model"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "model"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "model"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "model"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "model"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "model",
+ "entityType": "columns",
+ "table": "model"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "varchar(64)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "provider",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "text",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "credentials",
+ "entityType": "columns",
+ "table": "provider"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "workspace_id",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "account_id",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "email",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_seen",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "color",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "enum('admin','member')",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "role",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "int",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_limit",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "bigint",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "monthly_usage",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_monthly_usage_updated",
+ "entityType": "columns",
+ "table": "user"
+ },
+ {
+ "type": "varchar(30)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "id",
+ "entityType": "columns",
+ "table": "workspace"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "slug",
+ "entityType": "columns",
+ "table": "workspace"
+ },
+ {
+ "type": "varchar(255)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "name",
+ "entityType": "columns",
+ "table": "workspace"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(now())",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_created",
+ "entityType": "columns",
+ "table": "workspace"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": true,
+ "autoIncrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3))",
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_updated",
+ "entityType": "columns",
+ "table": "workspace"
+ },
+ {
+ "type": "timestamp(3)",
+ "notNull": false,
+ "autoIncrement": false,
+ "default": null,
+ "onUpdateNow": false,
+ "onUpdateNowFsp": null,
+ "charSet": null,
+ "collation": null,
+ "generated": null,
+ "name": "time_deleted",
+ "entityType": "columns",
+ "table": "workspace"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "account",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "auth",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "benchmark",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "billing",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "payment",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "subscription",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "usage",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip", "interval"],
+ "name": "PRIMARY",
+ "table": "ip_rate_limit",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["ip"],
+ "name": "PRIMARY",
+ "table": "ip",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "key",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "model",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "provider",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["workspace_id", "id"],
+ "name": "PRIMARY",
+ "table": "user",
+ "entityType": "pks"
+ },
+ {
+ "columns": ["id"],
+ "name": "PRIMARY",
+ "table": "workspace",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ {
+ "value": "provider",
+ "isExpression": false
+ },
+ {
+ "value": "subject",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "provider",
+ "entityType": "indexes",
+ "table": "auth"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "account_id",
+ "entityType": "indexes",
+ "table": "auth"
+ },
+ {
+ "columns": [
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "time_created",
+ "entityType": "indexes",
+ "table": "benchmark"
+ },
+ {
+ "columns": [
+ {
+ "value": "customer_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_customer_id",
+ "entityType": "indexes",
+ "table": "billing"
+ },
+ {
+ "columns": [
+ {
+ "value": "subscription_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_subscription_id",
+ "entityType": "indexes",
+ "table": "billing"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "user_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_user_id",
+ "entityType": "indexes",
+ "table": "subscription"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "time_created",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "usage_time_created",
+ "entityType": "indexes",
+ "table": "usage"
+ },
+ {
+ "columns": [
+ {
+ "value": "key",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_key",
+ "entityType": "indexes",
+ "table": "key"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "model",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "model_workspace_model",
+ "entityType": "indexes",
+ "table": "model"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "provider",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "workspace_provider",
+ "entityType": "indexes",
+ "table": "provider"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_account_id",
+ "entityType": "indexes",
+ "table": "user"
+ },
+ {
+ "columns": [
+ {
+ "value": "workspace_id",
+ "isExpression": false
+ },
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "user_email",
+ "entityType": "indexes",
+ "table": "user"
+ },
+ {
+ "columns": [
+ {
+ "value": "account_id",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_account_id",
+ "entityType": "indexes",
+ "table": "user"
+ },
+ {
+ "columns": [
+ {
+ "value": "email",
+ "isExpression": false
+ }
+ ],
+ "isUnique": false,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "global_email",
+ "entityType": "indexes",
+ "table": "user"
+ },
+ {
+ "columns": [
+ {
+ "value": "slug",
+ "isExpression": false
+ }
+ ],
+ "isUnique": true,
+ "using": null,
+ "algorithm": null,
+ "lock": null,
+ "nameExplicit": true,
+ "name": "slug",
+ "entityType": "indexes",
+ "table": "workspace"
+ }
+ ],
+ "renames": []
+}
diff --git a/packages/console/core/migrations/meta/0000_snapshot.json b/packages/console/core/migrations/meta/0000_snapshot.json
deleted file mode 100644
index 17d3bd7f9d..0000000000
--- a/packages/console/core/migrations/meta/0000_snapshot.json
+++ /dev/null
@@ -1,569 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "aee779c5-db1d-4655-95ec-6451c18455be",
- "prevId": "00000000-0000-0000-0000-000000000000",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0001_snapshot.json b/packages/console/core/migrations/meta/0001_snapshot.json
deleted file mode 100644
index d23d1601d9..0000000000
--- a/packages/console/core/migrations/meta/0001_snapshot.json
+++ /dev/null
@@ -1,569 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "79b7ee25-1c1c-41ff-9bbf-754af257102b",
- "prevId": "aee779c5-db1d-4655-95ec-6451c18455be",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0002_snapshot.json b/packages/console/core/migrations/meta/0002_snapshot.json
deleted file mode 100644
index 45d06926c1..0000000000
--- a/packages/console/core/migrations/meta/0002_snapshot.json
+++ /dev/null
@@ -1,576 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "9f51ef52-31ac-4ace-8b6d-39b35efe9c81",
- "prevId": "79b7ee25-1c1c-41ff-9bbf-754af257102b",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0003_snapshot.json b/packages/console/core/migrations/meta/0003_snapshot.json
deleted file mode 100644
index e832ebb00c..0000000000
--- a/packages/console/core/migrations/meta/0003_snapshot.json
+++ /dev/null
@@ -1,581 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "26cebd59-f553-441c-a2b2-2f9578a0ad2b",
- "prevId": "9f51ef52-31ac-4ace-8b6d-39b35efe9c81",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0004_snapshot.json b/packages/console/core/migrations/meta/0004_snapshot.json
deleted file mode 100644
index 6d2695c488..0000000000
--- a/packages/console/core/migrations/meta/0004_snapshot.json
+++ /dev/null
@@ -1,588 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "06dc6226-bfbb-4ccc-b4bc-f26070c3bed5",
- "prevId": "26cebd59-f553-441c-a2b2-2f9578a0ad2b",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0005_snapshot.json b/packages/console/core/migrations/meta/0005_snapshot.json
deleted file mode 100644
index 12246a6d62..0000000000
--- a/packages/console/core/migrations/meta/0005_snapshot.json
+++ /dev/null
@@ -1,588 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "d13af80e-3c70-4866-8f14-48e7ff6ff0ff",
- "prevId": "06dc6226-bfbb-4ccc-b4bc-f26070c3bed5",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0006_snapshot.json b/packages/console/core/migrations/meta/0006_snapshot.json
deleted file mode 100644
index d726b6f678..0000000000
--- a/packages/console/core/migrations/meta/0006_snapshot.json
+++ /dev/null
@@ -1,602 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "b0ad4b11-b607-46c7-8e2d-3b9823cdc5f7",
- "prevId": "d13af80e-3c70-4866-8f14-48e7ff6ff0ff",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_tokens": {
- "name": "cache_write_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0007_snapshot.json b/packages/console/core/migrations/meta/0007_snapshot.json
deleted file mode 100644
index 122db42cb9..0000000000
--- a/packages/console/core/migrations/meta/0007_snapshot.json
+++ /dev/null
@@ -1,595 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "91067cc9-d492-47b3-932a-42dcc0920b3c",
- "prevId": "b0ad4b11-b607-46c7-8e2d-3b9823cdc5f7",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0008_snapshot.json b/packages/console/core/migrations/meta/0008_snapshot.json
deleted file mode 100644
index 02c4732002..0000000000
--- a/packages/console/core/migrations/meta/0008_snapshot.json
+++ /dev/null
@@ -1,602 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "3e080fc0-9efd-411f-b764-ed3aa4abcee5",
- "prevId": "91067cc9-d492-47b3-932a-42dcc0920b3c",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0009_snapshot.json b/packages/console/core/migrations/meta/0009_snapshot.json
deleted file mode 100644
index a3bd57cae7..0000000000
--- a/packages/console/core/migrations/meta/0009_snapshot.json
+++ /dev/null
@@ -1,609 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "b0019e1e-d365-4f67-be3d-a2e69bdddc04",
- "prevId": "3e080fc0-9efd-411f-b764-ed3aa4abcee5",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "error": {
- "name": "error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0010_snapshot.json b/packages/console/core/migrations/meta/0010_snapshot.json
deleted file mode 100644
index cb55610ae6..0000000000
--- a/packages/console/core/migrations/meta/0010_snapshot.json
+++ /dev/null
@@ -1,615 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "1f08bd5a-436d-4905-a585-87b156847402",
- "prevId": "b0019e1e-d365-4f67-be3d-a2e69bdddc04",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "error": {
- "name": "error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0011_snapshot.json b/packages/console/core/migrations/meta/0011_snapshot.json
deleted file mode 100644
index 7eb6fa71ad..0000000000
--- a/packages/console/core/migrations/meta/0011_snapshot.json
+++ /dev/null
@@ -1,622 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "cd9c94c4-9167-4346-b716-1bd0cff10ffc",
- "prevId": "1f08bd5a-436d-4905-a585-87b156847402",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "last_error": {
- "name": "last_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_last_error": {
- "name": "time_last_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0012_snapshot.json b/packages/console/core/migrations/meta/0012_snapshot.json
deleted file mode 100644
index 4220c988b2..0000000000
--- a/packages/console/core/migrations/meta/0012_snapshot.json
+++ /dev/null
@@ -1,643 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "ba801b30-747a-433e-ab43-b407c961a24c",
- "prevId": "cd9c94c4-9167-4346-b716-1bd0cff10ffc",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "last_error": {
- "name": "last_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_last_error": {
- "name": "time_last_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0013_snapshot.json b/packages/console/core/migrations/meta/0013_snapshot.json
deleted file mode 100644
index ef805ee836..0000000000
--- a/packages/console/core/migrations/meta/0013_snapshot.json
+++ /dev/null
@@ -1,646 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "28336c91-553c-4d1d-9875-1ee761e47582",
- "prevId": "ba801b30-747a-433e-ab43-b407c961a24c",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {
- "\"billing\".\"last_error\"": "\"billing\".\"reload_error\"",
- "\"billing\".\"time_last_error\"": "\"billing\".\"time_reload_error\""
- }
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0014_snapshot.json b/packages/console/core/migrations/meta/0014_snapshot.json
deleted file mode 100644
index b526aeead4..0000000000
--- a/packages/console/core/migrations/meta/0014_snapshot.json
+++ /dev/null
@@ -1,650 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "12189a4e-5083-4b17-b8e3-8279c9a3e61a",
- "prevId": "28336c91-553c-4d1d-9875-1ee761e47582",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "data_share": {
- "name": "data_share",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0015_snapshot.json b/packages/console/core/migrations/meta/0015_snapshot.json
deleted file mode 100644
index 57d893cd80..0000000000
--- a/packages/console/core/migrations/meta/0015_snapshot.json
+++ /dev/null
@@ -1,643 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "7f3989cb-3e8b-430e-a0f5-f87051d1d824",
- "prevId": "12189a4e-5083-4b17-b8e3-8279c9a3e61a",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0016_snapshot.json b/packages/console/core/migrations/meta/0016_snapshot.json
deleted file mode 100644
index eefeb31a75..0000000000
--- a/packages/console/core/migrations/meta/0016_snapshot.json
+++ /dev/null
@@ -1,650 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "45b67fb4-77ce-4aa2-b883-1971429c69f5",
- "prevId": "7f3989cb-3e8b-430e-a0f5-f87051d1d824",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0017_snapshot.json b/packages/console/core/migrations/meta/0017_snapshot.json
deleted file mode 100644
index d7687f9c6c..0000000000
--- a/packages/console/core/migrations/meta/0017_snapshot.json
+++ /dev/null
@@ -1,657 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "100a21cf-ff9c-476f-bf7d-100c1824b2b2",
- "prevId": "45b67fb4-77ce-4aa2-b883-1971429c69f5",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0018_snapshot.json b/packages/console/core/migrations/meta/0018_snapshot.json
deleted file mode 100644
index 3e3c64c734..0000000000
--- a/packages/console/core/migrations/meta/0018_snapshot.json
+++ /dev/null
@@ -1,671 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "e9c91c2d-787d-4234-b98d-1620e4ce80e1",
- "prevId": "100a21cf-ff9c-476f-bf7d-100c1824b2b2",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_joined": {
- "name": "time_joined",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0019_snapshot.json b/packages/console/core/migrations/meta/0019_snapshot.json
deleted file mode 100644
index 9a0d4d2439..0000000000
--- a/packages/console/core/migrations/meta/0019_snapshot.json
+++ /dev/null
@@ -1,671 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "a2bb7222-561c-45f0-8939-8ef9b8e57bb3",
- "prevId": "e9c91c2d-787d-4234-b98d-1620e4ce80e1",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_joined": {
- "name": "time_joined",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0020_snapshot.json b/packages/console/core/migrations/meta/0020_snapshot.json
deleted file mode 100644
index 9defceb5a3..0000000000
--- a/packages/console/core/migrations/meta/0020_snapshot.json
+++ /dev/null
@@ -1,664 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "908437f9-54ed-4c83-b555-614926e326f8",
- "prevId": "a2bb7222-561c-45f0-8939-8ef9b8e57bb3",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0021_snapshot.json b/packages/console/core/migrations/meta/0021_snapshot.json
deleted file mode 100644
index 64d3e9d249..0000000000
--- a/packages/console/core/migrations/meta/0021_snapshot.json
+++ /dev/null
@@ -1,671 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "14616ba2-c21e-4787-a289-f2a3eb6de04f",
- "prevId": "908437f9-54ed-4c83-b555-614926e326f8",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "old_email": {
- "name": "old_email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0022_snapshot.json b/packages/console/core/migrations/meta/0022_snapshot.json
deleted file mode 100644
index 8a1c4e7d8e..0000000000
--- a/packages/console/core/migrations/meta/0022_snapshot.json
+++ /dev/null
@@ -1,690 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "2296e9e4-bee6-485b-a146-6666ac8dc0d0",
- "prevId": "14616ba2-c21e-4787-a289-f2a3eb6de04f",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "old_account_id": {
- "name": "old_account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "old_email": {
- "name": "old_email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0023_snapshot.json b/packages/console/core/migrations/meta/0023_snapshot.json
deleted file mode 100644
index 4f6f66283a..0000000000
--- a/packages/console/core/migrations/meta/0023_snapshot.json
+++ /dev/null
@@ -1,700 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "6857f409-1b5d-4752-9d65-a82ee70e6ad2",
- "prevId": "2296e9e4-bee6-485b-a146-6666ac8dc0d0",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "old_account_id": {
- "name": "old_account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "old_email": {
- "name": "old_email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0024_snapshot.json b/packages/console/core/migrations/meta/0024_snapshot.json
deleted file mode 100644
index 1ef25970a3..0000000000
--- a/packages/console/core/migrations/meta/0024_snapshot.json
+++ /dev/null
@@ -1,686 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "6d546f3e-17b2-4195-bb10-7e6d91774bd7",
- "prevId": "6857f409-1b5d-4752-9d65-a82ee70e6ad2",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0025_snapshot.json b/packages/console/core/migrations/meta/0025_snapshot.json
deleted file mode 100644
index 6746a6e8c6..0000000000
--- a/packages/console/core/migrations/meta/0025_snapshot.json
+++ /dev/null
@@ -1,693 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "ce444765-0606-4880-970a-2176bc2a78ac",
- "prevId": "6d546f3e-17b2-4195-bb10-7e6d91774bd7",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- },
- "name": {
- "name": "name",
- "columns": ["workspace_id", "name"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0026_snapshot.json b/packages/console/core/migrations/meta/0026_snapshot.json
deleted file mode 100644
index d3c7dc496f..0000000000
--- a/packages/console/core/migrations/meta/0026_snapshot.json
+++ /dev/null
@@ -1,688 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "9e1313c7-ca78-4d2c-b13b-625d9d6fcaa3",
- "prevId": "ce444765-0606-4880-970a-2176bc2a78ac",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "actor": {
- "name": "actor",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "old_name": {
- "name": "old_name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0027_snapshot.json b/packages/console/core/migrations/meta/0027_snapshot.json
deleted file mode 100644
index 408766f717..0000000000
--- a/packages/console/core/migrations/meta/0027_snapshot.json
+++ /dev/null
@@ -1,674 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "05e873f6-1556-4bcb-8e19-14971e37610a",
- "prevId": "9e1313c7-ca78-4d2c-b13b-625d9d6fcaa3",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0028_snapshot.json b/packages/console/core/migrations/meta/0028_snapshot.json
deleted file mode 100644
index 827cb53c5e..0000000000
--- a/packages/console/core/migrations/meta/0028_snapshot.json
+++ /dev/null
@@ -1,674 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "a331e38c-c2e3-406d-a1ff-b0af7229cd85",
- "prevId": "05e873f6-1556-4bcb-8e19-14971e37610a",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0029_snapshot.json b/packages/console/core/migrations/meta/0029_snapshot.json
deleted file mode 100644
index d235697cc2..0000000000
--- a/packages/console/core/migrations/meta/0029_snapshot.json
+++ /dev/null
@@ -1,695 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "33551b4c-fc2e-4753-8d9d-0971f333e65d",
- "prevId": "a331e38c-c2e3-406d-a1ff-b0af7229cd85",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0030_snapshot.json b/packages/console/core/migrations/meta/0030_snapshot.json
deleted file mode 100644
index 66978dfa5f..0000000000
--- a/packages/console/core/migrations/meta/0030_snapshot.json
+++ /dev/null
@@ -1,760 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "eae45fcf-dc0f-4756-bc5d-30791f2965a2",
- "prevId": "33551b4c-fc2e-4753-8d9d-0971f333e65d",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0031_snapshot.json b/packages/console/core/migrations/meta/0031_snapshot.json
deleted file mode 100644
index c471659250..0000000000
--- a/packages/console/core/migrations/meta/0031_snapshot.json
+++ /dev/null
@@ -1,832 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "9dceb591-8e08-4991-a49c-1f1741ec1e57",
- "prevId": "eae45fcf-dc0f-4756-bc5d-30791f2965a2",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0032_snapshot.json b/packages/console/core/migrations/meta/0032_snapshot.json
deleted file mode 100644
index 51e84a1d3a..0000000000
--- a/packages/console/core/migrations/meta/0032_snapshot.json
+++ /dev/null
@@ -1,839 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "b2406421-f22d-4153-a2a4-6deafe70ee54",
- "prevId": "9dceb591-8e08-4991-a49c-1f1741ec1e57",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0033_snapshot.json b/packages/console/core/migrations/meta/0033_snapshot.json
deleted file mode 100644
index 76d4720e89..0000000000
--- a/packages/console/core/migrations/meta/0033_snapshot.json
+++ /dev/null
@@ -1,846 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "91ef8fda-ca96-4a3f-af29-dd6ae7136398",
- "prevId": "b2406421-f22d-4153-a2a4-6deafe70ee54",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0034_snapshot.json b/packages/console/core/migrations/meta/0034_snapshot.json
deleted file mode 100644
index e9c999be71..0000000000
--- a/packages/console/core/migrations/meta/0034_snapshot.json
+++ /dev/null
@@ -1,913 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "34706440-26d7-43f5-9b39-815aa912e5ef",
- "prevId": "91ef8fda-ca96-4a3f-af29-dd6ae7136398",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "email": {
- "name": "email",
- "columns": ["email"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0035_snapshot.json b/packages/console/core/migrations/meta/0035_snapshot.json
deleted file mode 100644
index 815d120ea0..0000000000
--- a/packages/console/core/migrations/meta/0035_snapshot.json
+++ /dev/null
@@ -1,905 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "10169105-4545-4894-838b-004c0a42c584",
- "prevId": "34706440-26d7-43f5-9b39-815aa912e5ef",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0036_snapshot.json b/packages/console/core/migrations/meta/0036_snapshot.json
deleted file mode 100644
index 926b143ebe..0000000000
--- a/packages/console/core/migrations/meta/0036_snapshot.json
+++ /dev/null
@@ -1,915 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "5470c8b4-296d-47bd-85a7-88cfd3b71434",
- "prevId": "10169105-4545-4894-838b-004c0a42c584",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0037_snapshot.json b/packages/console/core/migrations/meta/0037_snapshot.json
deleted file mode 100644
index 8a80ea5221..0000000000
--- a/packages/console/core/migrations/meta/0037_snapshot.json
+++ /dev/null
@@ -1,929 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "8b7fa839-a088-408e-84a4-1a07325c0290",
- "prevId": "5470c8b4-296d-47bd-85a7-88cfd3b71434",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0038_snapshot.json b/packages/console/core/migrations/meta/0038_snapshot.json
deleted file mode 100644
index b0a59c4978..0000000000
--- a/packages/console/core/migrations/meta/0038_snapshot.json
+++ /dev/null
@@ -1,981 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "9d5d9885-7ec5-45f6-ac53-45a8e25dede7",
- "prevId": "8b7fa839-a088-408e-84a4-1a07325c0290",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0039_snapshot.json b/packages/console/core/migrations/meta/0039_snapshot.json
deleted file mode 100644
index ba34f1ac49..0000000000
--- a/packages/console/core/migrations/meta/0039_snapshot.json
+++ /dev/null
@@ -1,1053 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "49a1ac05-78ab-4aae-908e-d4aeeb8196fc",
- "prevId": "9d5d9885-7ec5-45f6-ac53-45a8e25dede7",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0040_snapshot.json b/packages/console/core/migrations/meta/0040_snapshot.json
deleted file mode 100644
index 77012fd0ff..0000000000
--- a/packages/console/core/migrations/meta/0040_snapshot.json
+++ /dev/null
@@ -1,1059 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "bf19cd74-71f9-4bdf-b50e-67c2436f3408",
- "prevId": "49a1ac05-78ab-4aae-908e-d4aeeb8196fc",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0041_snapshot.json b/packages/console/core/migrations/meta/0041_snapshot.json
deleted file mode 100644
index 583b55925b..0000000000
--- a/packages/console/core/migrations/meta/0041_snapshot.json
+++ /dev/null
@@ -1,1095 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "9cf10c24-6029-4cb4-866e-ff9b501eaf7e",
- "prevId": "bf19cd74-71f9-4bdf-b50e-67c2436f3408",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0042_snapshot.json b/packages/console/core/migrations/meta/0042_snapshot.json
deleted file mode 100644
index e0f731e397..0000000000
--- a/packages/console/core/migrations/meta/0042_snapshot.json
+++ /dev/null
@@ -1,1144 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "4775571c-ad9c-4104-a202-2374b1963cfe",
- "prevId": "9cf10c24-6029-4cb4-866e-ff9b501eaf7e",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "data": {
- "name": "data",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscribed": {
- "name": "time_subscribed",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_recent_usage": {
- "name": "sub_recent_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_monthly_usage": {
- "name": "sub_monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_recent_usage_updated": {
- "name": "sub_time_recent_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_monthly_usage_updated": {
- "name": "sub_time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0043_snapshot.json b/packages/console/core/migrations/meta/0043_snapshot.json
deleted file mode 100644
index ef9caa74e6..0000000000
--- a/packages/console/core/migrations/meta/0043_snapshot.json
+++ /dev/null
@@ -1,1147 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "3ff862f3-eeb6-4b10-8c78-254de3778ab3",
- "prevId": "4775571c-ad9c-4104-a202-2374b1963cfe",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "data": {
- "name": "data",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscribed": {
- "name": "time_subscribed",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_interval_usage": {
- "name": "sub_interval_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_monthly_usage": {
- "name": "sub_monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_interval_usage_updated": {
- "name": "sub_time_interval_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_monthly_usage_updated": {
- "name": "sub_time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {
- "\"user\".\"sub_recent_usage\"": "\"user\".\"sub_interval_usage\"",
- "\"user\".\"sub_time_recent_usage_updated\"": "\"user\".\"sub_time_interval_usage_updated\""
- }
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0044_snapshot.json b/packages/console/core/migrations/meta/0044_snapshot.json
deleted file mode 100644
index cde7fabf22..0000000000
--- a/packages/console/core/migrations/meta/0044_snapshot.json
+++ /dev/null
@@ -1,1146 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "70394850-2c28-4012-a3d5-69357e3348b6",
- "prevId": "3ff862f3-eeb6-4b10-8c78-254de3778ab3",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscribed": {
- "name": "time_subscribed",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_interval_usage": {
- "name": "sub_interval_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_monthly_usage": {
- "name": "sub_monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_interval_usage_updated": {
- "name": "sub_time_interval_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_monthly_usage_updated": {
- "name": "sub_time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {
- "\"usage\".\"data\"": "\"usage\".\"enrichment\""
- }
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0045_snapshot.json b/packages/console/core/migrations/meta/0045_snapshot.json
deleted file mode 100644
index 6ab9760c68..0000000000
--- a/packages/console/core/migrations/meta/0045_snapshot.json
+++ /dev/null
@@ -1,1149 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "27c1a3eb-b125-46d4-b436-abe5764fe4b7",
- "prevId": "70394850-2c28-4012-a3d5-69357e3348b6",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscribed": {
- "name": "time_subscribed",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_interval_usage": {
- "name": "sub_interval_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_monthly_usage": {
- "name": "sub_monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_interval_usage_updated": {
- "name": "sub_time_interval_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_monthly_usage_updated": {
- "name": "sub_time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0046_snapshot.json b/packages/console/core/migrations/meta/0046_snapshot.json
deleted file mode 100644
index 46ff73e263..0000000000
--- a/packages/console/core/migrations/meta/0046_snapshot.json
+++ /dev/null
@@ -1,1236 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "f3725f6d-5f33-4497-b4ba-cf05c46fb873",
- "prevId": "27c1a3eb-b125-46d4-b436-abe5764fe4b7",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscribed": {
- "name": "time_subscribed",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_interval_usage": {
- "name": "sub_interval_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_monthly_usage": {
- "name": "sub_monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_interval_usage_updated": {
- "name": "sub_time_interval_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "sub_time_monthly_usage_updated": {
- "name": "sub_time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0047_snapshot.json b/packages/console/core/migrations/meta/0047_snapshot.json
deleted file mode 100644
index f8002bd8bb..0000000000
--- a/packages/console/core/migrations/meta/0047_snapshot.json
+++ /dev/null
@@ -1,1207 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "fec4cb15-6f13-465d-a902-b76b026872f4",
- "prevId": "f3725f6d-5f33-4497-b4ba-cf05c46fb873",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0048_snapshot.json b/packages/console/core/migrations/meta/0048_snapshot.json
deleted file mode 100644
index e0593749b3..0000000000
--- a/packages/console/core/migrations/meta/0048_snapshot.json
+++ /dev/null
@@ -1,1207 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "bb90bb3e-fd08-439a-b92f-5f433807480e",
- "prevId": "fec4cb15-6f13-465d-a902-b76b026872f4",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0049_snapshot.json b/packages/console/core/migrations/meta/0049_snapshot.json
deleted file mode 100644
index 58679382e5..0000000000
--- a/packages/console/core/migrations/meta/0049_snapshot.json
+++ /dev/null
@@ -1,1214 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "2fd0308b-0653-437d-aea3-29428a4de9f1",
- "prevId": "bb90bb3e-fd08-439a-b92f-5f433807480e",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_coupon_id": {
- "name": "subscription_coupon_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0050_snapshot.json b/packages/console/core/migrations/meta/0050_snapshot.json
deleted file mode 100644
index 75289bc262..0000000000
--- a/packages/console/core/migrations/meta/0050_snapshot.json
+++ /dev/null
@@ -1,1221 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "a0d18802-c390-47d4-98f1-d1f83869cf0c",
- "prevId": "2fd0308b-0653-437d-aea3-29428a4de9f1",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_coupon_id": {
- "name": "subscription_coupon_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0051_snapshot.json b/packages/console/core/migrations/meta/0051_snapshot.json
deleted file mode 100644
index 0f90479162..0000000000
--- a/packages/console/core/migrations/meta/0051_snapshot.json
+++ /dev/null
@@ -1,1228 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "14cbf4c8-55f1-4488-956f-56fb5ccb3a5a",
- "prevId": "a0d18802-c390-47d4-98f1-d1f83869cf0c",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_coupon_id": {
- "name": "subscription_coupon_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscription_booked": {
- "name": "time_subscription_booked",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0052_snapshot.json b/packages/console/core/migrations/meta/0052_snapshot.json
deleted file mode 100644
index 339e153eba..0000000000
--- a/packages/console/core/migrations/meta/0052_snapshot.json
+++ /dev/null
@@ -1,1235 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "00774acd-a1e5-49c0-b296-cacc9506a566",
- "prevId": "14cbf4c8-55f1-4488-956f-56fb5ccb3a5a",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_coupon_id": {
- "name": "subscription_coupon_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_plan": {
- "name": "subscription_plan",
- "type": "enum('20','100','200')",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscription_booked": {
- "name": "time_subscription_booked",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0053_snapshot.json b/packages/console/core/migrations/meta/0053_snapshot.json
deleted file mode 100644
index 75a2cb7c92..0000000000
--- a/packages/console/core/migrations/meta/0053_snapshot.json
+++ /dev/null
@@ -1,1242 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "32a0c40b-a269-4ad1-a5a0-52b1f18932aa",
- "prevId": "00774acd-a1e5-49c0-b296-cacc9506a566",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription": {
- "name": "subscription",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_coupon_id": {
- "name": "subscription_coupon_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_plan": {
- "name": "subscription_plan",
- "type": "enum('20','100','200')",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscription_booked": {
- "name": "time_subscription_booked",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0054_snapshot.json b/packages/console/core/migrations/meta/0054_snapshot.json
deleted file mode 100644
index a1e3851d85..0000000000
--- a/packages/console/core/migrations/meta/0054_snapshot.json
+++ /dev/null
@@ -1,1235 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "a0ade64b-b735-4a70-8d39-ebd84bc9e924",
- "prevId": "32a0c40b-a269-4ad1-a5a0-52b1f18932aa",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription": {
- "name": "subscription",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_plan": {
- "name": "subscription_plan",
- "type": "enum('20','100','200')",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscription_booked": {
- "name": "time_subscription_booked",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/0055_snapshot.json b/packages/console/core/migrations/meta/0055_snapshot.json
deleted file mode 100644
index 82293d8666..0000000000
--- a/packages/console/core/migrations/meta/0055_snapshot.json
+++ /dev/null
@@ -1,1242 +0,0 @@
-{
- "version": "5",
- "dialect": "mysql",
- "id": "e630f63c-04a8-4b59-bf56-03efcdd1b011",
- "prevId": "a0ade64b-b735-4a70-8d39-ebd84bc9e924",
- "tables": {
- "account": {
- "name": "account",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "account_id_pk": {
- "name": "account_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "auth": {
- "name": "auth",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "enum('email','github','google')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "subject": {
- "name": "subject",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "provider": {
- "name": "provider",
- "columns": ["provider", "subject"],
- "isUnique": true
- },
- "account_id": {
- "name": "account_id",
- "columns": ["account_id"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "auth_id_pk": {
- "name": "auth_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "benchmark": {
- "name": "benchmark",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "agent": {
- "name": "agent",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "result": {
- "name": "result",
- "type": "mediumtext",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "time_created": {
- "name": "time_created",
- "columns": ["time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "benchmark_id_pk": {
- "name": "benchmark_id_pk",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "billing": {
- "name": "billing",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_id": {
- "name": "payment_method_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_type": {
- "name": "payment_method_type",
- "type": "varchar(32)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_method_last4": {
- "name": "payment_method_last4",
- "type": "varchar(4)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "balance": {
- "name": "balance",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload": {
- "name": "reload",
- "type": "boolean",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_trigger": {
- "name": "reload_trigger",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_amount": {
- "name": "reload_amount",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "reload_error": {
- "name": "reload_error",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_error": {
- "name": "time_reload_error",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_reload_locked_till": {
- "name": "time_reload_locked_till",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription": {
- "name": "subscription",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_id": {
- "name": "subscription_id",
- "type": "varchar(28)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "subscription_plan": {
- "name": "subscription_plan",
- "type": "enum('20','100','200')",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscription_booked": {
- "name": "time_subscription_booked",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_subscription_selected": {
- "name": "time_subscription_selected",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_customer_id": {
- "name": "global_customer_id",
- "columns": ["customer_id"],
- "isUnique": true
- },
- "global_subscription_id": {
- "name": "global_subscription_id",
- "columns": ["subscription_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "billing_workspace_id_id_pk": {
- "name": "billing_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "payment": {
- "name": "payment",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "customer_id": {
- "name": "customer_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "invoice_id": {
- "name": "invoice_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "payment_id": {
- "name": "payment_id",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "amount": {
- "name": "amount",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_refunded": {
- "name": "time_refunded",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "payment_workspace_id_id_pk": {
- "name": "payment_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "subscription": {
- "name": "subscription",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "rolling_usage": {
- "name": "rolling_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "fixed_usage": {
- "name": "fixed_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_rolling_updated": {
- "name": "time_rolling_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_fixed_updated": {
- "name": "time_fixed_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_user_id": {
- "name": "workspace_user_id",
- "columns": ["workspace_id", "user_id"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "subscription_workspace_id_id_pk": {
- "name": "subscription_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "usage": {
- "name": "usage",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "input_tokens": {
- "name": "input_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "output_tokens": {
- "name": "output_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "reasoning_tokens": {
- "name": "reasoning_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_read_tokens": {
- "name": "cache_read_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_5m_tokens": {
- "name": "cache_write_5m_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cache_write_1h_tokens": {
- "name": "cache_write_1h_tokens",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "cost": {
- "name": "cost",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key_id": {
- "name": "key_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "enrichment": {
- "name": "enrichment",
- "type": "json",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "usage_time_created": {
- "name": "usage_time_created",
- "columns": ["workspace_id", "time_created"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "usage_workspace_id_id_pk": {
- "name": "usage_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip_rate_limit": {
- "name": "ip_rate_limit",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "interval": {
- "name": "interval",
- "type": "varchar(10)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "count": {
- "name": "count",
- "type": "int",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_rate_limit_ip_interval_pk": {
- "name": "ip_rate_limit_ip_interval_pk",
- "columns": ["ip", "interval"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "ip": {
- "name": "ip",
- "columns": {
- "ip": {
- "name": "ip",
- "type": "varchar(45)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "usage": {
- "name": "usage",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "ip_ip_pk": {
- "name": "ip_ip_pk",
- "columns": ["ip"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "key": {
- "name": "key",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "key": {
- "name": "key",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "user_id": {
- "name": "user_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_used": {
- "name": "time_used",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "global_key": {
- "name": "global_key",
- "columns": ["key"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "key_workspace_id_id_pk": {
- "name": "key_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "model": {
- "name": "model",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "model": {
- "name": "model",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "model_workspace_model": {
- "name": "model_workspace_model",
- "columns": ["workspace_id", "model"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "model_workspace_id_id_pk": {
- "name": "model_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "provider": {
- "name": "provider",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "provider": {
- "name": "provider",
- "type": "varchar(64)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "credentials": {
- "name": "credentials",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- }
- },
- "indexes": {
- "workspace_provider": {
- "name": "workspace_provider",
- "columns": ["workspace_id", "provider"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "provider_workspace_id_id_pk": {
- "name": "provider_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "user": {
- "name": "user",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "workspace_id": {
- "name": "workspace_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "account_id": {
- "name": "account_id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "email": {
- "name": "email",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_seen": {
- "name": "time_seen",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "color": {
- "name": "color",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "role": {
- "name": "role",
- "type": "enum('admin','member')",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "monthly_limit": {
- "name": "monthly_limit",
- "type": "int",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "monthly_usage": {
- "name": "monthly_usage",
- "type": "bigint",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "time_monthly_usage_updated": {
- "name": "time_monthly_usage_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "user_account_id": {
- "name": "user_account_id",
- "columns": ["workspace_id", "account_id"],
- "isUnique": true
- },
- "user_email": {
- "name": "user_email",
- "columns": ["workspace_id", "email"],
- "isUnique": true
- },
- "global_account_id": {
- "name": "global_account_id",
- "columns": ["account_id"],
- "isUnique": false
- },
- "global_email": {
- "name": "global_email",
- "columns": ["email"],
- "isUnique": false
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "user_workspace_id_id_pk": {
- "name": "user_workspace_id_id_pk",
- "columns": ["workspace_id", "id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- },
- "workspace": {
- "name": "workspace",
- "columns": {
- "id": {
- "name": "id",
- "type": "varchar(30)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "slug": {
- "name": "slug",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- },
- "name": {
- "name": "name",
- "type": "varchar(255)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false
- },
- "time_created": {
- "name": "time_created",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "(now())"
- },
- "time_updated": {
- "name": "time_updated",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": true,
- "autoincrement": false,
- "default": "CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3)"
- },
- "time_deleted": {
- "name": "time_deleted",
- "type": "timestamp(3)",
- "primaryKey": false,
- "notNull": false,
- "autoincrement": false
- }
- },
- "indexes": {
- "slug": {
- "name": "slug",
- "columns": ["slug"],
- "isUnique": true
- }
- },
- "foreignKeys": {},
- "compositePrimaryKeys": {
- "workspace_id": {
- "name": "workspace_id",
- "columns": ["id"]
- }
- },
- "uniqueConstraints": {},
- "checkConstraint": {}
- }
- },
- "views": {},
- "_meta": {
- "schemas": {},
- "tables": {},
- "columns": {}
- },
- "internal": {
- "tables": {},
- "indexes": {}
- }
-}
diff --git a/packages/console/core/migrations/meta/_journal.json b/packages/console/core/migrations/meta/_journal.json
deleted file mode 100644
index f807eab668..0000000000
--- a/packages/console/core/migrations/meta/_journal.json
+++ /dev/null
@@ -1,398 +0,0 @@
-{
- "version": "7",
- "dialect": "mysql",
- "entries": [
- {
- "idx": 0,
- "version": "5",
- "when": 1756796050935,
- "tag": "0000_fluffy_raza",
- "breakpoints": true
- },
- {
- "idx": 1,
- "version": "5",
- "when": 1756871639102,
- "tag": "0001_serious_whistler",
- "breakpoints": true
- },
- {
- "idx": 2,
- "version": "5",
- "when": 1757597611832,
- "tag": "0002_violet_loners",
- "breakpoints": true
- },
- {
- "idx": 3,
- "version": "5",
- "when": 1757600397194,
- "tag": "0003_dusty_clint_barton",
- "breakpoints": true
- },
- {
- "idx": 4,
- "version": "5",
- "when": 1757627357232,
- "tag": "0004_first_mockingbird",
- "breakpoints": true
- },
- {
- "idx": 5,
- "version": "5",
- "when": 1757632304856,
- "tag": "0005_jazzy_skrulls",
- "breakpoints": true
- },
- {
- "idx": 6,
- "version": "5",
- "when": 1757643108507,
- "tag": "0006_parallel_gauntlet",
- "breakpoints": true
- },
- {
- "idx": 7,
- "version": "5",
- "when": 1757693869142,
- "tag": "0007_familiar_nightshade",
- "breakpoints": true
- },
- {
- "idx": 8,
- "version": "5",
- "when": 1757885904718,
- "tag": "0008_eminent_ultimatum",
- "breakpoints": true
- },
- {
- "idx": 9,
- "version": "5",
- "when": 1757888582598,
- "tag": "0009_redundant_piledriver",
- "breakpoints": true
- },
- {
- "idx": 10,
- "version": "5",
- "when": 1757892305788,
- "tag": "0010_needy_sue_storm",
- "breakpoints": true
- },
- {
- "idx": 11,
- "version": "5",
- "when": 1757948881012,
- "tag": "0011_freezing_phil_sheldon",
- "breakpoints": true
- },
- {
- "idx": 12,
- "version": "5",
- "when": 1757956814524,
- "tag": "0012_bright_photon",
- "breakpoints": true
- },
- {
- "idx": 13,
- "version": "5",
- "when": 1757956978089,
- "tag": "0013_absurd_hobgoblin",
- "breakpoints": true
- },
- {
- "idx": 14,
- "version": "5",
- "when": 1758289919722,
- "tag": "0014_demonic_princess_powerful",
- "breakpoints": true
- },
- {
- "idx": 15,
- "version": "5",
- "when": 1758428484500,
- "tag": "0015_cloudy_revanche",
- "breakpoints": true
- },
- {
- "idx": 16,
- "version": "5",
- "when": 1758663086739,
- "tag": "0016_cold_la_nuit",
- "breakpoints": true
- },
- {
- "idx": 17,
- "version": "5",
- "when": 1758755183232,
- "tag": "0017_woozy_thaddeus_ross",
- "breakpoints": true
- },
- {
- "idx": 18,
- "version": "5",
- "when": 1759077265040,
- "tag": "0018_nervous_iron_lad",
- "breakpoints": true
- },
- {
- "idx": 19,
- "version": "5",
- "when": 1759103696975,
- "tag": "0019_dazzling_cable",
- "breakpoints": true
- },
- {
- "idx": 20,
- "version": "5",
- "when": 1759169697658,
- "tag": "0020_supreme_jack_power",
- "breakpoints": true
- },
- {
- "idx": 21,
- "version": "5",
- "when": 1759186023755,
- "tag": "0021_flawless_clea",
- "breakpoints": true
- },
- {
- "idx": 22,
- "version": "5",
- "when": 1759427432588,
- "tag": "0022_nice_dreadnoughts",
- "breakpoints": true
- },
- {
- "idx": 23,
- "version": "5",
- "when": 1759444220653,
- "tag": "0023_optimal_paibok",
- "breakpoints": true
- },
- {
- "idx": 24,
- "version": "5",
- "when": 1759522925614,
- "tag": "0024_early_black_crow",
- "breakpoints": true
- },
- {
- "idx": 25,
- "version": "5",
- "when": 1759525451885,
- "tag": "0025_legal_joseph",
- "breakpoints": true
- },
- {
- "idx": 26,
- "version": "5",
- "when": 1759546980316,
- "tag": "0026_numerous_prodigy",
- "breakpoints": true
- },
- {
- "idx": 27,
- "version": "5",
- "when": 1759553466608,
- "tag": "0027_hot_wong",
- "breakpoints": true
- },
- {
- "idx": 28,
- "version": "5",
- "when": 1759805025276,
- "tag": "0028_careful_cerise",
- "breakpoints": true
- },
- {
- "idx": 29,
- "version": "5",
- "when": 1759811835558,
- "tag": "0029_panoramic_harrier",
- "breakpoints": true
- },
- {
- "idx": 30,
- "version": "5",
- "when": 1759878278492,
- "tag": "0030_ordinary_ultragirl",
- "breakpoints": true
- },
- {
- "idx": 31,
- "version": "5",
- "when": 1759940238478,
- "tag": "0031_outgoing_outlaw_kid",
- "breakpoints": true
- },
- {
- "idx": 32,
- "version": "5",
- "when": 1759976329502,
- "tag": "0032_white_doctor_doom",
- "breakpoints": true
- },
- {
- "idx": 33,
- "version": "5",
- "when": 1760637384217,
- "tag": "0033_cynical_jack_flag",
- "breakpoints": true
- },
- {
- "idx": 34,
- "version": "5",
- "when": 1760651120251,
- "tag": "0034_short_bulldozer",
- "breakpoints": true
- },
- {
- "idx": 35,
- "version": "5",
- "when": 1760666253896,
- "tag": "0035_narrow_blindfold",
- "breakpoints": true
- },
- {
- "idx": 36,
- "version": "5",
- "when": 1760668952329,
- "tag": "0036_slimy_energizer",
- "breakpoints": true
- },
- {
- "idx": 37,
- "version": "5",
- "when": 1761928273807,
- "tag": "0037_messy_jackal",
- "breakpoints": true
- },
- {
- "idx": 38,
- "version": "5",
- "when": 1764110043942,
- "tag": "0038_famous_magik",
- "breakpoints": true
- },
- {
- "idx": 39,
- "version": "5",
- "when": 1766946179892,
- "tag": "0039_striped_forge",
- "breakpoints": true
- },
- {
- "idx": 40,
- "version": "5",
- "when": 1767584617316,
- "tag": "0040_broken_gamora",
- "breakpoints": true
- },
- {
- "idx": 41,
- "version": "5",
- "when": 1767732559197,
- "tag": "0041_odd_misty_knight",
- "breakpoints": true
- },
- {
- "idx": 42,
- "version": "5",
- "when": 1767744077346,
- "tag": "0042_flat_nightmare",
- "breakpoints": true
- },
- {
- "idx": 43,
- "version": "5",
- "when": 1767752636118,
- "tag": "0043_lame_calypso",
- "breakpoints": true
- },
- {
- "idx": 44,
- "version": "5",
- "when": 1767759322451,
- "tag": "0044_tiny_captain_midlands",
- "breakpoints": true
- },
- {
- "idx": 45,
- "version": "5",
- "when": 1767765497502,
- "tag": "0045_cuddly_diamondback",
- "breakpoints": true
- },
- {
- "idx": 46,
- "version": "5",
- "when": 1767912262458,
- "tag": "0046_charming_black_bolt",
- "breakpoints": true
- },
- {
- "idx": 47,
- "version": "5",
- "when": 1767916965243,
- "tag": "0047_huge_omega_red",
- "breakpoints": true
- },
- {
- "idx": 48,
- "version": "5",
- "when": 1767917785224,
- "tag": "0048_mean_frank_castle",
- "breakpoints": true
- },
- {
- "idx": 49,
- "version": "5",
- "when": 1767922954153,
- "tag": "0049_noisy_domino",
- "breakpoints": true
- },
- {
- "idx": 50,
- "version": "5",
- "when": 1767931290031,
- "tag": "0050_bumpy_mephistopheles",
- "breakpoints": true
- },
- {
- "idx": 51,
- "version": "5",
- "when": 1768341152722,
- "tag": "0051_jazzy_green_goblin",
- "breakpoints": true
- },
- {
- "idx": 52,
- "version": "5",
- "when": 1768343920467,
- "tag": "0052_aromatic_agent_zero",
- "breakpoints": true
- },
- {
- "idx": 53,
- "version": "5",
- "when": 1768599366758,
- "tag": "0053_gigantic_hardball",
- "breakpoints": true
- },
- {
- "idx": 54,
- "version": "5",
- "when": 1768603665356,
- "tag": "0054_numerous_annihilus",
- "breakpoints": true
- },
- {
- "idx": 55,
- "version": "5",
- "when": 1769108945841,
- "tag": "0055_moaning_karnak",
- "breakpoints": true
- }
- ]
-}
diff --git a/packages/console/core/package.json b/packages/console/core/package.json
index a99f1ec323..aac79d6690 100644
--- a/packages/console/core/package.json
+++ b/packages/console/core/package.json
@@ -37,6 +37,9 @@
"update-black": "script/update-black.ts",
"promote-black-to-dev": "script/promote-black.ts dev",
"promote-black-to-prod": "script/promote-black.ts production",
+ "update-lite": "script/update-lite.ts",
+ "promote-lite-to-dev": "script/promote-lite.ts dev",
+ "promote-lite-to-prod": "script/promote-lite.ts production",
"typecheck": "tsgo --noEmit"
},
"devDependencies": {
diff --git a/packages/console/core/script/promote-lite.ts b/packages/console/core/script/promote-lite.ts
new file mode 100755
index 0000000000..8fd58c8059
--- /dev/null
+++ b/packages/console/core/script/promote-lite.ts
@@ -0,0 +1,22 @@
+#!/usr/bin/env bun
+
+import { $ } from "bun"
+import path from "path"
+import { LiteData } from "../src/lite"
+
+const stage = process.argv[2]
+if (!stage) throw new Error("Stage is required")
+
+const root = path.resolve(process.cwd(), "..", "..", "..")
+
+// read the secret
+const ret = await $`bun sst secret list`.cwd(root).text()
+const lines = ret.split("\n")
+const value = lines.find((line) => line.startsWith("ZEN_LITE_LIMITS"))?.split("=")[1]
+if (!value) throw new Error("ZEN_LITE_LIMITS not found")
+
+// validate value
+LiteData.validate(JSON.parse(value))
+
+// update the secret
+await $`bun sst secret set ZEN_LITE_LIMITS ${value} --stage ${stage}`
diff --git a/packages/console/core/script/update-lite.ts b/packages/console/core/script/update-lite.ts
new file mode 100755
index 0000000000..2f3e668357
--- /dev/null
+++ b/packages/console/core/script/update-lite.ts
@@ -0,0 +1,28 @@
+#!/usr/bin/env bun
+
+import { $ } from "bun"
+import path from "path"
+import os from "os"
+import { LiteData } from "../src/lite"
+
+const root = path.resolve(process.cwd(), "..", "..", "..")
+const secrets = await $`bun sst secret list`.cwd(root).text()
+
+// read value
+const lines = secrets.split("\n")
+const oldValue = lines.find((line) => line.startsWith("ZEN_LITE_LIMITS"))?.split("=")[1] ?? "{}"
+if (!oldValue) throw new Error("ZEN_LITE_LIMITS not found")
+
+// store the prettified json to a temp file
+const filename = `lite-${Date.now()}.json`
+const tempFile = Bun.file(path.join(os.tmpdir(), filename))
+await tempFile.write(JSON.stringify(JSON.parse(oldValue), null, 2))
+console.log("tempFile", tempFile.name)
+
+// open temp file in vim and read the file on close
+await $`vim ${tempFile.name}`
+const newValue = JSON.stringify(JSON.parse(await tempFile.text()))
+LiteData.validate(JSON.parse(newValue))
+
+// update the secret
+await $`bun sst secret set ZEN_LITE_LIMITS ${newValue}`
diff --git a/packages/console/core/src/black.ts b/packages/console/core/src/black.ts
index 5f8db62738..b4cc270646 100644
--- a/packages/console/core/src/black.ts
+++ b/packages/console/core/src/black.ts
@@ -1,8 +1,6 @@
import { z } from "zod"
import { fn } from "./util/fn"
import { Resource } from "@opencode-ai/console-resource"
-import { centsToMicroCents } from "./util/price"
-import { getWeekBounds } from "./util/date"
import { SubscriptionPlan } from "./schema/billing.sql"
export namespace BlackData {
@@ -60,75 +58,3 @@ export namespace BlackData {
},
)
}
-
-export namespace Black {
- export const analyzeRollingUsage = fn(
- z.object({
- plan: z.enum(SubscriptionPlan),
- usage: z.number().int(),
- timeUpdated: z.date(),
- }),
- ({ plan, usage, timeUpdated }) => {
- const now = new Date()
- const black = BlackData.getLimits({ plan })
- const rollingWindowMs = black.rollingWindow * 3600 * 1000
- const rollingLimitInMicroCents = centsToMicroCents(black.rollingLimit * 100)
- const windowStart = new Date(now.getTime() - rollingWindowMs)
- if (timeUpdated < windowStart) {
- return {
- status: "ok" as const,
- resetInSec: black.rollingWindow * 3600,
- usagePercent: 0,
- }
- }
-
- const windowEnd = new Date(timeUpdated.getTime() + rollingWindowMs)
- if (usage < rollingLimitInMicroCents) {
- return {
- status: "ok" as const,
- resetInSec: Math.ceil((windowEnd.getTime() - now.getTime()) / 1000),
- usagePercent: Math.ceil(Math.min(100, (usage / rollingLimitInMicroCents) * 100)),
- }
- }
- return {
- status: "rate-limited" as const,
- resetInSec: Math.ceil((windowEnd.getTime() - now.getTime()) / 1000),
- usagePercent: 100,
- }
- },
- )
-
- export const analyzeWeeklyUsage = fn(
- z.object({
- plan: z.enum(SubscriptionPlan),
- usage: z.number().int(),
- timeUpdated: z.date(),
- }),
- ({ plan, usage, timeUpdated }) => {
- const black = BlackData.getLimits({ plan })
- const now = new Date()
- const week = getWeekBounds(now)
- const fixedLimitInMicroCents = centsToMicroCents(black.fixedLimit * 100)
- if (timeUpdated < week.start) {
- return {
- status: "ok" as const,
- resetInSec: Math.ceil((week.end.getTime() - now.getTime()) / 1000),
- usagePercent: 0,
- }
- }
- if (usage < fixedLimitInMicroCents) {
- return {
- status: "ok" as const,
- resetInSec: Math.ceil((week.end.getTime() - now.getTime()) / 1000),
- usagePercent: Math.ceil(Math.min(100, (usage / fixedLimitInMicroCents) * 100)),
- }
- }
-
- return {
- status: "rate-limited" as const,
- resetInSec: Math.ceil((week.end.getTime() - now.getTime()) / 1000),
- usagePercent: 100,
- }
- },
- )
-}
diff --git a/packages/console/core/src/lite.ts b/packages/console/core/src/lite.ts
new file mode 100644
index 0000000000..d6679208d8
--- /dev/null
+++ b/packages/console/core/src/lite.ts
@@ -0,0 +1,28 @@
+import { z } from "zod"
+import { fn } from "./util/fn"
+import { Resource } from "@opencode-ai/console-resource"
+
+export namespace LiteData {
+ const Schema = z.object({
+ fixedLimit: z.number().int(),
+ rollingLimit: z.number().int(),
+ rollingWindow: z.number().int(),
+ })
+
+ export const validate = fn(Schema, (input) => {
+ return input
+ })
+
+ export const getLimits = fn(z.void(), () => {
+ const json = JSON.parse(Resource.ZEN_LITE_LIMITS.value)
+ return Schema.parse(json)
+ })
+
+ export const planToPriceID = fn(z.void(), () => {
+ return Resource.ZEN_LITE_PRICE.price
+ })
+
+ export const priceIDToPlan = fn(z.void(), () => {
+ return "lite"
+ })
+}
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts
index ba8f892806..6d96fc7eb8 100644
--- a/packages/console/core/src/schema/billing.sql.ts
+++ b/packages/console/core/src/schema/billing.sql.ts
@@ -67,7 +67,7 @@ export const PaymentTable = mysqlTable(
timeRefunded: utc("time_refunded"),
enrichment: json("enrichment").$type<
| {
- type: "subscription"
+ type: "subscription" | "lite"
couponID?: string
}
| {
@@ -93,8 +93,9 @@ export const UsageTable = mysqlTable(
cacheWrite1hTokens: int("cache_write_1h_tokens"),
cost: bigint("cost", { mode: "number" }).notNull(),
keyID: ulid("key_id"),
+ sessionID: varchar("session_id", { length: 30 }),
enrichment: json("enrichment").$type<{
- plan: "sub"
+ plan: "sub" | "byok" | "lite"
}>(),
},
(table) => [...workspaceIndexes(table), index("usage_time_created").on(table.workspaceID, table.timeCreated)],
diff --git a/packages/console/core/src/subscription.ts b/packages/console/core/src/subscription.ts
new file mode 100644
index 0000000000..ca3b170422
--- /dev/null
+++ b/packages/console/core/src/subscription.ts
@@ -0,0 +1,75 @@
+import { z } from "zod"
+import { fn } from "./util/fn"
+import { centsToMicroCents } from "./util/price"
+import { getWeekBounds } from "./util/date"
+
+export namespace Subscription {
+ export const analyzeRollingUsage = fn(
+ z.object({
+ limit: z.number().int(),
+ window: z.number().int(),
+ usage: z.number().int(),
+ timeUpdated: z.date(),
+ }),
+ ({ limit, window, usage, timeUpdated }) => {
+ const now = new Date()
+ const rollingWindowMs = window * 3600 * 1000
+ const rollingLimitInMicroCents = centsToMicroCents(limit * 100)
+ const windowStart = new Date(now.getTime() - rollingWindowMs)
+ if (timeUpdated < windowStart) {
+ return {
+ status: "ok" as const,
+ resetInSec: window * 3600,
+ usagePercent: 0,
+ }
+ }
+
+ const windowEnd = new Date(timeUpdated.getTime() + rollingWindowMs)
+ if (usage < rollingLimitInMicroCents) {
+ return {
+ status: "ok" as const,
+ resetInSec: Math.ceil((windowEnd.getTime() - now.getTime()) / 1000),
+ usagePercent: Math.ceil(Math.min(100, (usage / rollingLimitInMicroCents) * 100)),
+ }
+ }
+ return {
+ status: "rate-limited" as const,
+ resetInSec: Math.ceil((windowEnd.getTime() - now.getTime()) / 1000),
+ usagePercent: 100,
+ }
+ },
+ )
+
+ export const analyzeWeeklyUsage = fn(
+ z.object({
+ limit: z.number().int(),
+ usage: z.number().int(),
+ timeUpdated: z.date(),
+ }),
+ ({ limit, usage, timeUpdated }) => {
+ const now = new Date()
+ const week = getWeekBounds(now)
+ const fixedLimitInMicroCents = centsToMicroCents(limit * 100)
+ if (timeUpdated < week.start) {
+ return {
+ status: "ok" as const,
+ resetInSec: Math.ceil((week.end.getTime() - now.getTime()) / 1000),
+ usagePercent: 0,
+ }
+ }
+ if (usage < fixedLimitInMicroCents) {
+ return {
+ status: "ok" as const,
+ resetInSec: Math.ceil((week.end.getTime() - now.getTime()) / 1000),
+ usagePercent: Math.ceil(Math.min(100, (usage / fixedLimitInMicroCents) * 100)),
+ }
+ }
+
+ return {
+ status: "rate-limited" as const,
+ resetInSec: Math.ceil((week.end.getTime() - now.getTime()) / 1000),
+ usagePercent: 100,
+ }
+ },
+ )
+}
diff --git a/packages/console/core/sst-env.d.ts b/packages/console/core/sst-env.d.ts
index 73f83d1676..edff904e01 100644
--- a/packages/console/core/sst-env.d.ts
+++ b/packages/console/core/sst-env.d.ts
@@ -130,6 +130,15 @@ declare module "sst" {
"product": string
"type": "sst.sst.Linkable"
}
+ "ZEN_LITE_LIMITS": {
+ "type": "sst.sst.Secret"
+ "value": string
+ }
+ "ZEN_LITE_PRICE": {
+ "price": string
+ "product": string
+ "type": "sst.sst.Linkable"
+ }
"ZEN_MODELS1": {
"type": "sst.sst.Secret"
"value": string
diff --git a/packages/console/function/sst-env.d.ts b/packages/console/function/sst-env.d.ts
index 73f83d1676..edff904e01 100644
--- a/packages/console/function/sst-env.d.ts
+++ b/packages/console/function/sst-env.d.ts
@@ -130,6 +130,15 @@ declare module "sst" {
"product": string
"type": "sst.sst.Linkable"
}
+ "ZEN_LITE_LIMITS": {
+ "type": "sst.sst.Secret"
+ "value": string
+ }
+ "ZEN_LITE_PRICE": {
+ "price": string
+ "product": string
+ "type": "sst.sst.Linkable"
+ }
"ZEN_MODELS1": {
"type": "sst.sst.Secret"
"value": string
diff --git a/packages/console/resource/sst-env.d.ts b/packages/console/resource/sst-env.d.ts
index 73f83d1676..edff904e01 100644
--- a/packages/console/resource/sst-env.d.ts
+++ b/packages/console/resource/sst-env.d.ts
@@ -130,6 +130,15 @@ declare module "sst" {
"product": string
"type": "sst.sst.Linkable"
}
+ "ZEN_LITE_LIMITS": {
+ "type": "sst.sst.Secret"
+ "value": string
+ }
+ "ZEN_LITE_PRICE": {
+ "price": string
+ "product": string
+ "type": "sst.sst.Linkable"
+ }
"ZEN_MODELS1": {
"type": "sst.sst.Secret"
"value": string
diff --git a/packages/enterprise/sst-env.d.ts b/packages/enterprise/sst-env.d.ts
index 73f83d1676..edff904e01 100644
--- a/packages/enterprise/sst-env.d.ts
+++ b/packages/enterprise/sst-env.d.ts
@@ -130,6 +130,15 @@ declare module "sst" {
"product": string
"type": "sst.sst.Linkable"
}
+ "ZEN_LITE_LIMITS": {
+ "type": "sst.sst.Secret"
+ "value": string
+ }
+ "ZEN_LITE_PRICE": {
+ "price": string
+ "product": string
+ "type": "sst.sst.Linkable"
+ }
"ZEN_MODELS1": {
"type": "sst.sst.Secret"
"value": string
diff --git a/packages/function/sst-env.d.ts b/packages/function/sst-env.d.ts
index 73f83d1676..edff904e01 100644
--- a/packages/function/sst-env.d.ts
+++ b/packages/function/sst-env.d.ts
@@ -130,6 +130,15 @@ declare module "sst" {
"product": string
"type": "sst.sst.Linkable"
}
+ "ZEN_LITE_LIMITS": {
+ "type": "sst.sst.Secret"
+ "value": string
+ }
+ "ZEN_LITE_PRICE": {
+ "price": string
+ "product": string
+ "type": "sst.sst.Linkable"
+ }
"ZEN_MODELS1": {
"type": "sst.sst.Secret"
"value": string
diff --git a/packages/opencode/package.json b/packages/opencode/package.json
index f891273737..d19376adf3 100644
--- a/packages/opencode/package.json
+++ b/packages/opencode/package.json
@@ -89,8 +89,8 @@
"@opencode-ai/sdk": "workspace:*",
"@opencode-ai/util": "workspace:*",
"@openrouter/ai-sdk-provider": "1.5.4",
- "@opentui/core": "0.1.79",
- "@opentui/solid": "0.1.79",
+ "@opentui/core": "0.1.81",
+ "@opentui/solid": "0.1.81",
"@parcel/watcher": "2.5.1",
"@pierre/diffs": "catalog:",
"@solid-primitives/event-bus": "1.1.2",
diff --git a/packages/opencode/src/file/watcher.ts b/packages/opencode/src/file/watcher.ts
index c4a4747777..626a746c83 100644
--- a/packages/opencode/src/file/watcher.ts
+++ b/packages/opencode/src/file/watcher.ts
@@ -46,7 +46,6 @@ export namespace FileWatcher {
const state = Instance.state(
async () => {
- if (Instance.project.vcs !== "git") return {}
log.info("init")
const cfg = await Config.get()
const backend = (() => {
@@ -88,26 +87,28 @@ export namespace FileWatcher {
if (sub) subs.push(sub)
}
- const vcsDir = await $`git rev-parse --git-dir`
- .quiet()
- .nothrow()
- .cwd(Instance.worktree)
- .text()
- .then((x) => path.resolve(Instance.worktree, x.trim()))
- .catch(() => undefined)
- if (vcsDir && !cfgIgnores.includes(".git") && !cfgIgnores.includes(vcsDir)) {
- const gitDirContents = await readdir(vcsDir).catch(() => [])
- const ignoreList = gitDirContents.filter((entry) => entry !== "HEAD")
- const pending = w.subscribe(vcsDir, subscribe, {
- ignore: ignoreList,
- backend,
- })
- const sub = await withTimeout(pending, SUBSCRIBE_TIMEOUT_MS).catch((err) => {
- log.error("failed to subscribe to vcsDir", { error: err })
- pending.then((s) => s.unsubscribe()).catch(() => {})
- return undefined
- })
- if (sub) subs.push(sub)
+ if (Instance.project.vcs === "git") {
+ const vcsDir = await $`git rev-parse --git-dir`
+ .quiet()
+ .nothrow()
+ .cwd(Instance.worktree)
+ .text()
+ .then((x) => path.resolve(Instance.worktree, x.trim()))
+ .catch(() => undefined)
+ if (vcsDir && !cfgIgnores.includes(".git") && !cfgIgnores.includes(vcsDir)) {
+ const gitDirContents = await readdir(vcsDir).catch(() => [])
+ const ignoreList = gitDirContents.filter((entry) => entry !== "HEAD")
+ const pending = w.subscribe(vcsDir, subscribe, {
+ ignore: ignoreList,
+ backend,
+ })
+ const sub = await withTimeout(pending, SUBSCRIBE_TIMEOUT_MS).catch((err) => {
+ log.error("failed to subscribe to vcsDir", { error: err })
+ pending.then((s) => s.unsubscribe()).catch(() => {})
+ return undefined
+ })
+ if (sub) subs.push(sub)
+ }
}
return { subs }
diff --git a/packages/opencode/src/patch/index.ts b/packages/opencode/src/patch/index.ts
index 0efeff544f..b87ad55528 100644
--- a/packages/opencode/src/patch/index.ts
+++ b/packages/opencode/src/patch/index.ts
@@ -79,23 +79,23 @@ export namespace Patch {
const line = lines[startIdx]
if (line.startsWith("*** Add File:")) {
- const filePath = line.split(":", 2)[1]?.trim()
+ const filePath = line.slice("*** Add File:".length).trim()
return filePath ? { filePath, nextIdx: startIdx + 1 } : null
}
if (line.startsWith("*** Delete File:")) {
- const filePath = line.split(":", 2)[1]?.trim()
+ const filePath = line.slice("*** Delete File:".length).trim()
return filePath ? { filePath, nextIdx: startIdx + 1 } : null
}
if (line.startsWith("*** Update File:")) {
- const filePath = line.split(":", 2)[1]?.trim()
+ const filePath = line.slice("*** Update File:".length).trim()
let movePath: string | undefined
let nextIdx = startIdx + 1
// Check for move directive
if (nextIdx < lines.length && lines[nextIdx].startsWith("*** Move to:")) {
- movePath = lines[nextIdx].split(":", 2)[1]?.trim()
+ movePath = lines[nextIdx].slice("*** Move to:".length).trim()
nextIdx++
}
diff --git a/packages/opencode/src/project/project.ts b/packages/opencode/src/project/project.ts
index e49d968613..adbe2b9fb1 100644
--- a/packages/opencode/src/project/project.ts
+++ b/packages/opencode/src/project/project.ts
@@ -17,6 +17,19 @@ import { Glob } from "../util/glob"
export namespace Project {
const log = Log.create({ service: "project" })
+
+ function gitpath(cwd: string, name: string) {
+ if (!name) return cwd
+ // git output includes trailing newlines; keep path whitespace intact.
+ name = name.replace(/[\r\n]+$/, "")
+ if (!name) return cwd
+
+ name = Filesystem.windowsPath(name)
+
+ if (path.isAbsolute(name)) return path.normalize(name)
+ return path.resolve(cwd, name)
+ }
+
export const Info = z
.object({
id: z.string(),
@@ -141,7 +154,7 @@ export namespace Project {
const top = await git(["rev-parse", "--show-toplevel"], {
cwd: sandbox,
})
- .then(async (result) => path.resolve(sandbox, (await result.text()).trim()))
+ .then(async (result) => gitpath(sandbox, await result.text()))
.catch(() => undefined)
if (!top) {
@@ -159,9 +172,9 @@ export namespace Project {
cwd: sandbox,
})
.then(async (result) => {
- const dirname = path.dirname((await result.text()).trim())
- if (dirname === ".") return sandbox
- return dirname
+ const common = gitpath(sandbox, await result.text())
+ // Avoid going to parent of sandbox when git-common-dir is empty.
+ return common === sandbox ? sandbox : path.dirname(common)
})
.catch(() => undefined)
diff --git a/packages/opencode/src/snapshot/index.ts b/packages/opencode/src/snapshot/index.ts
index 83cc467e42..833999e761 100644
--- a/packages/opencode/src/snapshot/index.ts
+++ b/packages/opencode/src/snapshot/index.ts
@@ -105,7 +105,7 @@ export namespace Snapshot {
.split("\n")
.map((x) => x.trim())
.filter(Boolean)
- .map((x) => path.join(Instance.worktree, x)),
+ .map((x) => path.join(Instance.worktree, x).replaceAll("\\", "/")),
}
}
diff --git a/packages/opencode/src/tool/apply_patch.ts b/packages/opencode/src/tool/apply_patch.ts
index 1344467c71..06293b6eba 100644
--- a/packages/opencode/src/tool/apply_patch.ts
+++ b/packages/opencode/src/tool/apply_patch.ts
@@ -161,7 +161,7 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
// Build per-file metadata for UI rendering (used for both permission and result)
const files = fileChanges.map((change) => ({
filePath: change.filePath,
- relativePath: path.relative(Instance.worktree, change.movePath ?? change.filePath),
+ relativePath: path.relative(Instance.worktree, change.movePath ?? change.filePath).replaceAll("\\", "/"),
type: change.type,
diff: change.diff,
before: change.oldContent,
@@ -172,7 +172,7 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
}))
// Check permissions if needed
- const relativePaths = fileChanges.map((c) => path.relative(Instance.worktree, c.filePath))
+ const relativePaths = fileChanges.map((c) => path.relative(Instance.worktree, c.filePath).replaceAll("\\", "/"))
await ctx.ask({
permission: "edit",
patterns: relativePaths,
@@ -242,13 +242,13 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
// Generate output summary
const summaryLines = fileChanges.map((change) => {
if (change.type === "add") {
- return `A ${path.relative(Instance.worktree, change.filePath)}`
+ return `A ${path.relative(Instance.worktree, change.filePath).replaceAll("\\", "/")}`
}
if (change.type === "delete") {
- return `D ${path.relative(Instance.worktree, change.filePath)}`
+ return `D ${path.relative(Instance.worktree, change.filePath).replaceAll("\\", "/")}`
}
const target = change.movePath ?? change.filePath
- return `M ${path.relative(Instance.worktree, target)}`
+ return `M ${path.relative(Instance.worktree, target).replaceAll("\\", "/")}`
})
let output = `Success. Updated the following files:\n${summaryLines.join("\n")}`
@@ -264,7 +264,7 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
const limited = errors.slice(0, MAX_DIAGNOSTICS_PER_FILE)
const suffix =
errors.length > MAX_DIAGNOSTICS_PER_FILE ? `\n... and ${errors.length - MAX_DIAGNOSTICS_PER_FILE} more` : ""
- output += `\n\nLSP errors detected in ${path.relative(Instance.worktree, target)}, please fix:\n\n${limited.map(LSP.Diagnostic.pretty).join("\n")}${suffix}\n`
+ output += `\n\nLSP errors detected in ${path.relative(Instance.worktree, target).replaceAll("\\", "/")}, please fix:\n\n${limited.map(LSP.Diagnostic.pretty).join("\n")}${suffix}\n`
}
}
diff --git a/packages/opencode/src/tool/bash.ts b/packages/opencode/src/tool/bash.ts
index ee2279bbfb..0751f789b7 100644
--- a/packages/opencode/src/tool/bash.ts
+++ b/packages/opencode/src/tool/bash.ts
@@ -124,11 +124,8 @@ export const BashTool = Tool.define("bash", async () => {
.then((x) => x.trim())
log.info("resolved path", { arg, resolved })
if (resolved) {
- // Git Bash on Windows returns Unix-style paths like /c/Users/...
const normalized =
- process.platform === "win32" && resolved.match(/^\/[a-z]\//)
- ? resolved.replace(/^\/([a-z])\//, (_, drive) => `${drive.toUpperCase()}:\\`).replace(/\//g, "\\")
- : resolved
+ process.platform === "win32" ? Filesystem.windowsPath(resolved).replace(/\//g, "\\") : resolved
if (!Instance.containsPath(normalized)) {
const dir = (await Filesystem.isDir(normalized)) ? normalized : path.dirname(normalized)
directories.add(dir)
@@ -145,7 +142,11 @@ export const BashTool = Tool.define("bash", async () => {
}
if (directories.size > 0) {
- const globs = Array.from(directories).map((dir) => path.join(dir, "*"))
+ const globs = Array.from(directories).map((dir) => {
+ // Preserve POSIX-looking paths with /s, even on Windows
+ if (dir.startsWith("/")) return `${dir.replace(/[\\/]+$/, "")}/*`
+ return path.join(dir, "*")
+ })
await ctx.ask({
permission: "external_directory",
patterns: globs,
diff --git a/packages/opencode/src/tool/external-directory.ts b/packages/opencode/src/tool/external-directory.ts
index 1d3958fc46..5d8885b2ad 100644
--- a/packages/opencode/src/tool/external-directory.ts
+++ b/packages/opencode/src/tool/external-directory.ts
@@ -18,7 +18,7 @@ export async function assertExternalDirectory(ctx: Tool.Context, target?: string
const kind = options?.kind ?? "file"
const parentDir = kind === "directory" ? target : path.dirname(target)
- const glob = path.join(parentDir, "*")
+ const glob = path.join(parentDir, "*").replaceAll("\\", "/")
await ctx.ask({
permission: "external_directory",
diff --git a/packages/opencode/src/util/filesystem.ts b/packages/opencode/src/util/filesystem.ts
index 3a1e8b8ec1..a87aaeb986 100644
--- a/packages/opencode/src/util/filesystem.ts
+++ b/packages/opencode/src/util/filesystem.ts
@@ -113,6 +113,18 @@ export namespace Filesystem {
}
}
+ export function windowsPath(p: string): string {
+ if (process.platform !== "win32") return p
+ return (
+ p
+ // Git Bash for Windows paths are typically //...
+ .replace(/^\/([a-zA-Z])\//, (_, drive) => `${drive.toUpperCase()}:/`)
+ // Cygwin git paths are typically /cygdrive//...
+ .replace(/^\/cygdrive\/([a-zA-Z])\//, (_, drive) => `${drive.toUpperCase()}:/`)
+ // WSL paths are typically /mnt//...
+ .replace(/^\/mnt\/([a-zA-Z])\//, (_, drive) => `${drive.toUpperCase()}:/`)
+ )
+ }
export function overlaps(a: string, b: string) {
const relA = relative(a, b)
const relB = relative(b, a)
diff --git a/packages/opencode/src/util/wildcard.ts b/packages/opencode/src/util/wildcard.ts
index 4a6eba96ff..f54b6c85fd 100644
--- a/packages/opencode/src/util/wildcard.ts
+++ b/packages/opencode/src/util/wildcard.ts
@@ -2,6 +2,8 @@ import { sortBy, pipe } from "remeda"
export namespace Wildcard {
export function match(str: string, pattern: string) {
+ if (str) str = str.replaceAll("\\", "/")
+ if (pattern) pattern = pattern.replaceAll("\\", "/")
let escaped = pattern
.replace(/[.+^${}()|[\]\\]/g, "\\$&") // escape special regex chars
.replace(/\*/g, ".*") // * becomes .*
@@ -13,7 +15,8 @@ export namespace Wildcard {
escaped = escaped.slice(0, -3) + "( .*)?"
}
- return new RegExp("^" + escaped + "$", "s").test(str)
+ const flags = process.platform === "win32" ? "si" : "s"
+ return new RegExp("^" + escaped + "$", flags).test(str)
}
export function all(input: string, patterns: Record) {
diff --git a/packages/opencode/test/skill/skill.test.ts b/packages/opencode/test/skill/skill.test.ts
index c310256c5e..2264723a09 100644
--- a/packages/opencode/test/skill/skill.test.ts
+++ b/packages/opencode/test/skill/skill.test.ts
@@ -50,7 +50,7 @@ Instructions here.
const testSkill = skills.find((s) => s.name === "test-skill")
expect(testSkill).toBeDefined()
expect(testSkill!.description).toBe("A test skill for verification.")
- expect(testSkill!.location).toContain("skill/test-skill/SKILL.md")
+ expect(testSkill!.location).toContain(path.join("skill", "test-skill", "SKILL.md"))
},
})
})
@@ -180,7 +180,7 @@ description: A skill in the .claude/skills directory.
expect(skills.length).toBe(1)
const claudeSkill = skills.find((s) => s.name === "claude-skill")
expect(claudeSkill).toBeDefined()
- expect(claudeSkill!.location).toContain(".claude/skills/claude-skill/SKILL.md")
+ expect(claudeSkill!.location).toContain(path.join(".claude", "skills", "claude-skill", "SKILL.md"))
},
})
})
@@ -200,7 +200,7 @@ test("discovers global skills from ~/.claude/skills/ directory", async () => {
expect(skills.length).toBe(1)
expect(skills[0].name).toBe("global-test-skill")
expect(skills[0].description).toBe("A global skill from ~/.claude/skills for testing.")
- expect(skills[0].location).toContain(".claude/skills/global-test-skill/SKILL.md")
+ expect(skills[0].location).toContain(path.join(".claude", "skills", "global-test-skill", "SKILL.md"))
},
})
} finally {
@@ -245,7 +245,7 @@ description: A skill in the .agents/skills directory.
expect(skills.length).toBe(1)
const agentSkill = skills.find((s) => s.name === "agent-skill")
expect(agentSkill).toBeDefined()
- expect(agentSkill!.location).toContain(".agents/skills/agent-skill/SKILL.md")
+ expect(agentSkill!.location).toContain(path.join(".agents", "skills", "agent-skill", "SKILL.md"))
},
})
})
@@ -279,7 +279,7 @@ This skill is loaded from the global home directory.
expect(skills.length).toBe(1)
expect(skills[0].name).toBe("global-agent-skill")
expect(skills[0].description).toBe("A global skill from ~/.agents/skills for testing.")
- expect(skills[0].location).toContain(".agents/skills/global-agent-skill/SKILL.md")
+ expect(skills[0].location).toContain(path.join(".agents", "skills", "global-agent-skill", "SKILL.md"))
},
})
} finally {
diff --git a/packages/opencode/test/tool/apply_patch.test.ts b/packages/opencode/test/tool/apply_patch.test.ts
index a08e235885..f81723fee0 100644
--- a/packages/opencode/test/tool/apply_patch.test.ts
+++ b/packages/opencode/test/tool/apply_patch.test.ts
@@ -93,6 +93,13 @@ describe("tool.apply_patch freeform", () => {
expect(result.title).toContain("Success. Updated the following files")
expect(result.output).toContain("Success. Updated the following files")
+ // Strict formatting assertions for slashes
+ expect(result.output).toMatch(/A nested\/new\.txt/)
+ expect(result.output).toMatch(/D delete\.txt/)
+ expect(result.output).toMatch(/M modify\.txt/)
+ if (process.platform === "win32") {
+ expect(result.output).not.toContain("\\")
+ }
expect(result.metadata.diff).toContain("Index:")
expect(calls.length).toBe(1)
diff --git a/packages/opencode/test/tool/bash.test.ts b/packages/opencode/test/tool/bash.test.ts
index 3bd923b604..db05f8f623 100644
--- a/packages/opencode/test/tool/bash.test.ts
+++ b/packages/opencode/test/tool/bash.test.ts
@@ -203,8 +203,8 @@ describe("tool.bash permissions", () => {
await bash.execute(
{
- command: "rm tmpfile",
- description: "Remove tmpfile",
+ command: `rm -rf ${path.join(tmp.path, "nested")}`,
+ description: "remove nested dir",
},
testCtx,
)
diff --git a/packages/opencode/test/tool/read.test.ts b/packages/opencode/test/tool/read.test.ts
index f9e8a355ac..5064c36c50 100644
--- a/packages/opencode/test/tool/read.test.ts
+++ b/packages/opencode/test/tool/read.test.ts
@@ -75,7 +75,7 @@ describe("tool.read external_directory permission", () => {
await read.execute({ filePath: path.join(outerTmp.path, "secret.txt") }, testCtx)
const extDirReq = requests.find((r) => r.permission === "external_directory")
expect(extDirReq).toBeDefined()
- expect(extDirReq!.patterns.some((p) => p.includes(outerTmp.path))).toBe(true)
+ expect(extDirReq!.patterns.some((p) => p.includes(outerTmp.path.replaceAll("\\", "/")))).toBe(true)
},
})
})
@@ -101,7 +101,7 @@ describe("tool.read external_directory permission", () => {
await read.execute({ filePath: path.join(outerTmp.path, "external") }, testCtx)
const extDirReq = requests.find((r) => r.permission === "external_directory")
expect(extDirReq).toBeDefined()
- expect(extDirReq!.patterns).toContain(path.join(outerTmp.path, "external", "*"))
+ expect(extDirReq!.patterns).toContain(path.join(outerTmp.path, "external", "*").replaceAll("\\", "/"))
},
})
})
diff --git a/packages/opencode/test/util/filesystem.test.ts b/packages/opencode/test/util/filesystem.test.ts
index 0f54479373..a6255db88f 100644
--- a/packages/opencode/test/util/filesystem.test.ts
+++ b/packages/opencode/test/util/filesystem.test.ts
@@ -286,6 +286,40 @@ describe("filesystem", () => {
})
})
+ describe("windowsPath()", () => {
+ test("converts Git Bash paths", () => {
+ if (process.platform === "win32") {
+ expect(Filesystem.windowsPath("/c/Users/test")).toBe("C:/Users/test")
+ expect(Filesystem.windowsPath("/d/dev/project")).toBe("D:/dev/project")
+ } else {
+ expect(Filesystem.windowsPath("/c/Users/test")).toBe("/c/Users/test")
+ }
+ })
+
+ test("converts Cygwin paths", () => {
+ if (process.platform === "win32") {
+ expect(Filesystem.windowsPath("/cygdrive/c/Users/test")).toBe("C:/Users/test")
+ expect(Filesystem.windowsPath("/cygdrive/x/dev/project")).toBe("X:/dev/project")
+ } else {
+ expect(Filesystem.windowsPath("/cygdrive/c/Users/test")).toBe("/cygdrive/c/Users/test")
+ }
+ })
+
+ test("converts WSL paths", () => {
+ if (process.platform === "win32") {
+ expect(Filesystem.windowsPath("/mnt/c/Users/test")).toBe("C:/Users/test")
+ expect(Filesystem.windowsPath("/mnt/z/dev/project")).toBe("Z:/dev/project")
+ } else {
+ expect(Filesystem.windowsPath("/mnt/c/Users/test")).toBe("/mnt/c/Users/test")
+ }
+ })
+
+ test("ignores normal Windows paths", () => {
+ expect(Filesystem.windowsPath("C:/Users/test")).toBe("C:/Users/test")
+ expect(Filesystem.windowsPath("D:\\dev\\project")).toBe("D:\\dev\\project")
+ })
+ })
+
describe("writeStream()", () => {
test("writes from Web ReadableStream", async () => {
await using tmp = await tmpdir()
diff --git a/packages/opencode/test/util/wildcard.test.ts b/packages/opencode/test/util/wildcard.test.ts
index 9cd0e9b945..56e753d12a 100644
--- a/packages/opencode/test/util/wildcard.test.ts
+++ b/packages/opencode/test/util/wildcard.test.ts
@@ -73,3 +73,18 @@ test("allStructured handles sed flags", () => {
expect(Wildcard.allStructured({ head: "sed", tail: ["-n", "1p", "file"] }, rules)).toBe("allow")
expect(Wildcard.allStructured({ head: "sed", tail: ["-i", "-n", "/./p", "myfile.txt"] }, rules)).toBe("ask")
})
+
+test("match normalizes slashes for cross-platform globbing", () => {
+ expect(Wildcard.match("C:\\Windows\\System32\\*", "C:/Windows/System32/*")).toBe(true)
+ expect(Wildcard.match("C:/Windows/System32/drivers", "C:\\Windows\\System32\\*")).toBe(true)
+})
+
+test("match handles case-insensitivity on Windows", () => {
+ if (process.platform === "win32") {
+ expect(Wildcard.match("C:\\windows\\system32\\hosts", "C:/Windows/System32/*")).toBe(true)
+ expect(Wildcard.match("c:/windows/system32/hosts", "C:\\Windows\\System32\\*")).toBe(true)
+ } else {
+ // Unix paths are case-sensitive
+ expect(Wildcard.match("/users/test/file", "/Users/test/*")).toBe(false)
+ }
+})
diff --git a/packages/ui/src/components/message-part.css b/packages/ui/src/components/message-part.css
index 07a718141a..ce76d8e188 100644
--- a/packages/ui/src/components/message-part.css
+++ b/packages/ui/src/components/message-part.css
@@ -332,14 +332,6 @@
}
}
-[data-slot="collapsible-content"]:has([data-component="edit-content"]),
-[data-slot="collapsible-content"]:has([data-component="write-content"]) {
- border: 1px solid var(--border-weak-base);
- border-radius: 6px;
- background: transparent;
- overflow: hidden;
-}
-
[data-component="bash-output"] {
width: 100%;
border: 1px solid var(--border-weak-base);
@@ -399,11 +391,6 @@
}
}
-[data-slot="collapsible-content"]:has([data-component="edit-content"]) [data-component="edit-content"],
-[data-slot="collapsible-content"]:has([data-component="write-content"]) [data-component="write-content"] {
- border-top: none;
-}
-
[data-component="edit-trigger"],
[data-component="write-trigger"] {
display: flex;
@@ -492,9 +479,8 @@
[data-component="edit-content"] {
border-radius: inherit;
border-top: 1px solid var(--border-weaker-base);
- max-height: 420px;
overflow-x: hidden;
- overflow-y: auto;
+ overflow-y: visible;
scrollbar-width: none;
-ms-overflow-style: none;
@@ -512,9 +498,8 @@
[data-component="write-content"] {
border-radius: inherit;
border-top: 1px solid var(--border-weaker-base);
- max-height: 240px;
overflow-x: hidden;
- overflow-y: auto;
+ overflow-y: visible;
[data-component="code"] {
padding-bottom: 0 !important;
@@ -1212,11 +1197,18 @@
}
}
+[data-component="edit-tool"],
+[data-component="write-tool"],
[data-component="apply-patch-tool"] {
> [data-component="collapsible"].tool-collapsible {
gap: 0px;
}
+ > [data-component="collapsible"] > [data-slot="collapsible-content"] {
+ border: none;
+ background: transparent;
+ }
+
> [data-component="collapsible"] > [data-slot="collapsible-trigger"][aria-expanded="true"] {
position: sticky;
top: var(--sticky-accordion-top, 0px);
@@ -1298,7 +1290,7 @@
[data-component="apply-patch-file-diff"] {
border-radius: inherit;
overflow-x: hidden;
- overflow-y: auto;
+ overflow-y: visible;
scrollbar-width: none;
-ms-overflow-style: none;
diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx
index 828ddbe87d..adba42ce93 100644
--- a/packages/ui/src/components/message-part.tsx
+++ b/packages/ui/src/components/message-part.tsx
@@ -276,12 +276,24 @@ function renderable(part: PartType, showReasoningSummaries = true) {
return !!PART_MAPPING[part.type]
}
+function toolDefaultOpen(tool: string, shell = false, edit = false) {
+ if (tool === "bash") return shell
+ if (tool === "edit" || tool === "write" || tool === "apply_patch") return edit
+}
+
+function partDefaultOpen(part: PartType, shell = false, edit = false) {
+ if (part.type !== "tool") return
+ return toolDefaultOpen(part.tool, shell, edit)
+}
+
export function AssistantParts(props: {
messages: AssistantMessage[]
showAssistantCopyPartID?: string | null
turnDurationMs?: number
working?: boolean
showReasoningSummaries?: boolean
+ shellToolDefaultOpen?: boolean
+ editToolDefaultOpen?: boolean
}) {
const data = useData()
const emptyParts: PartType[] = []
@@ -372,6 +384,7 @@ export function AssistantParts(props: {
message={entry().message}
showAssistantCopyPartID={props.showAssistantCopyPartID}
turnDurationMs={props.turnDurationMs}
+ defaultOpen={partDefaultOpen(entry().part, props.shellToolDefaultOpen, props.editToolDefaultOpen)}
/>
)}
@@ -900,6 +913,42 @@ export const ToolRegistry = {
render: getTool,
}
+function ToolFileAccordion(props: { path: string; actions?: JSX.Element; children: JSX.Element }) {
+ const value = createMemo(() => props.path || "tool-file")
+
+ return (
+
+
+
+
+
+
+
+
+
+ {`\u202A${getDirectory(props.path)}\u202C`}
+
+ {getFilename(props.path)}
+
+
+
+ {props.actions}
+
+
+
+
+
+ {props.children}
+
+
+ )
+}
+
PART_MAPPING["tool"] = function ToolPartDisplay(props) {
const data = useData()
const i18n = useI18n()
@@ -1479,57 +1528,67 @@ ToolRegistry.register({
const i18n = useI18n()
const diffComponent = useDiffComponent()
const diagnostics = createMemo(() => getDiagnostics(props.metadata.diagnostics, props.input.filePath))
+ const path = createMemo(() => props.metadata?.filediff?.file || props.input.filePath || "")
const filename = () => getFilename(props.input.filePath ?? "")
const pending = () => props.status === "pending" || props.status === "running"
return (
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {filename()}
-
-
- {filename()}
+
+
+
+ {getDirectory(props.input.filePath!)}
+
+
+
+
+
+
-
-
- {getDirectory(props.input.filePath!)}
-
-
-
-
-
-
-
-
- }
- >
-
-
-
-
-
-
-
+ }
+ >
+
+ {(diff) => }
+ }
+ >
+
+
+
+
+
+
+
+
)
},
})
@@ -1540,51 +1599,56 @@ ToolRegistry.register({
const i18n = useI18n()
const codeComponent = useCodeComponent()
const diagnostics = createMemo(() => getDiagnostics(props.metadata.diagnostics, props.input.filePath))
+ const path = createMemo(() => props.input.filePath || "")
const filename = () => getFilename(props.input.filePath ?? "")
const pending = () => props.status === "pending" || props.status === "running"
return (
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {filename()}
-
-
- {filename()}
+
+
+
+ {getDirectory(props.input.filePath!)}
+
-
-
- {getDirectory(props.input.filePath!)}
-
-
+ {/* */}
- {/* */}
-
- }
- >
-
-
-
-
-
-
-
+ }
+ >
+
+
+
+
+
+
+
+
+
+
)
},
})
@@ -1731,45 +1795,73 @@ ToolRegistry.register({
}
>
{(file) => (
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {getFilename(file().relativePath)}
-
-
- {getFilename(file().relativePath)}
+
+
+
+ {getDirectory(file().relativePath)}
+
+
+
+
+
+
-
-
- {getDirectory(file().relativePath)}
-
-
-
-
-
-
+ }
+ >
+
+
+
+ {i18n.t("ui.patch.action.created")}
+
+
+
+
+ {i18n.t("ui.patch.action.deleted")}
+
+
+
+
+ {i18n.t("ui.patch.action.moved")}
+
+
+
+
+
+
+ }
+ >
+
+
-
- }
- >
-
-
-
-
+
+
+
)}
)
diff --git a/packages/ui/src/components/session-turn.tsx b/packages/ui/src/components/session-turn.tsx
index 8e8a3f3875..0eceb754c8 100644
--- a/packages/ui/src/components/session-turn.tsx
+++ b/packages/ui/src/components/session-turn.tsx
@@ -140,6 +140,8 @@ export function SessionTurn(
messageID: string
lastUserMessageID?: string
showReasoningSummaries?: boolean
+ shellToolDefaultOpen?: boolean
+ editToolDefaultOpen?: boolean
onUserInteracted?: () => void
classes?: {
root?: string
@@ -369,6 +371,8 @@ export function SessionTurn(
turnDurationMs={turnDurationMs()}
working={working()}
showReasoningSummaries={showReasoningSummaries()}
+ shellToolDefaultOpen={props.shellToolDefaultOpen}
+ editToolDefaultOpen={props.editToolDefaultOpen}
/>
diff --git a/sst-env.d.ts b/sst-env.d.ts
index 6b3ec54dee..fb7a7dc420 100644
--- a/sst-env.d.ts
+++ b/sst-env.d.ts
@@ -156,6 +156,15 @@ declare module "sst" {
"product": string
"type": "sst.sst.Linkable"
}
+ "ZEN_LITE_LIMITS": {
+ "type": "sst.sst.Secret"
+ "value": string
+ }
+ "ZEN_LITE_PRICE": {
+ "price": string
+ "product": string
+ "type": "sst.sst.Linkable"
+ }
"ZEN_MODELS1": {
"type": "sst.sst.Secret"
"value": string