Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- packages/console/core/migrations/20250902065410_fluffy_raza/migration.sqlAdded+89
- packages/console/core/migrations/20250902065410_fluffy_raza/snapshot.jsonAdded+967
- packages/console/core/migrations/20250903035359_serious_whistler/migration.sqlAdded+2
- packages/console/core/migrations/20250903035359_serious_whistler/snapshot.jsonAdded+967
- packages/console/core/migrations/20250911141957_dusty_clint_barton/migration.sqlAdded+1
- packages/console/core/migrations/20250911141957_dusty_clint_barton/snapshot.jsonAdded+1001
- packages/console/core/migrations/20250911231144_jazzy_skrulls/migration.sqlAdded+1
- packages/console/core/migrations/20250911231144_jazzy_skrulls/snapshot.jsonAdded+1015
- packages/console/core/migrations/20250912021148_parallel_gauntlet/migration.sqlAdded+2
- packages/console/core/migrations/20250912021148_parallel_gauntlet/snapshot.jsonAdded+1043
- packages/console/core/migrations/20250912161749_familiar_nightshade/migration.sqlAdded+1
- packages/console/core/migrations/20250912161749_familiar_nightshade/snapshot.jsonAdded+1029
- packages/console/core/migrations/20250914222302_redundant_piledriver/migration.sqlAdded+1
- packages/console/core/migrations/20250914222302_redundant_piledriver/snapshot.jsonAdded+1057
- packages/console/core/migrations/20250915150801_freezing_phil_sheldon/migration.sqlAdded+3
- packages/console/core/migrations/20250915150801_freezing_phil_sheldon/snapshot.jsonAdded+1087
- packages/console/core/migrations/20250915172258_absurd_hobgoblin/migration.sqlAdded+2
- packages/console/core/migrations/20250915172258_absurd_hobgoblin/snapshot.jsonAdded+1129
- packages/console/core/migrations/20250919135159_demonic_princess_powerful/migration.sqlAdded+1
- packages/console/core/migrations/20250919135159_demonic_princess_powerful/snapshot.jsonAdded+1143
- packages/console/core/migrations/20250921042124_cloudy_revanche/migration.sqlAdded+1
- packages/console/core/migrations/20250921042124_cloudy_revanche/snapshot.jsonAdded+1129
- packages/console/core/migrations/20250923213126_cold_la_nuit/migration.sqlAdded+1
- packages/console/core/migrations/20250923213126_cold_la_nuit/snapshot.jsonAdded+1143
- packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/migration.sqlAdded+1
- packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/snapshot.jsonAdded+1157
- packages/console/core/migrations/20250928235456_dazzling_cable/migration.sqlAdded+1
- packages/console/core/migrations/20250928235456_dazzling_cable/snapshot.jsonAdded+1185
- packages/console/core/migrations/20251002175032_nice_dreadnoughts/migration.sqlAdded+3
- packages/console/core/migrations/20251002175032_nice_dreadnoughts/snapshot.jsonAdded+1233
- packages/console/core/migrations/20251003202205_early_black_crow/migration.sqlAdded+2
- packages/console/core/migrations/20251003202205_early_black_crow/snapshot.jsonAdded+1237
- packages/console/core/migrations/20251003210411_legal_joseph/migration.sqlAdded+1
- packages/console/core/migrations/20251003210411_legal_joseph/snapshot.jsonAdded+1251
- packages/console/core/migrations/20251004030300_numerous_prodigy/migration.sqlAdded+1
- packages/console/core/migrations/20251004030300_numerous_prodigy/snapshot.jsonAdded+1231
- packages/console/core/migrations/20251007024345_careful_cerise/migration.sqlAdded+1
- packages/console/core/migrations/20251007024345_careful_cerise/snapshot.jsonAdded+1203
- packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/migration.sqlAdded+11
- packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/snapshot.jsonAdded+1487
- packages/console/core/migrations/20251017015733_narrow_blindfold/migration.sqlAdded+3
- packages/console/core/migrations/20251017015733_narrow_blindfold/snapshot.jsonAdded+1623
- packages/console/core/migrations/20251017024232_slimy_energizer/migration.sqlAdded+2
- packages/console/core/migrations/20251017024232_slimy_energizer/snapshot.jsonAdded+1635
- packages/console/core/migrations/20251031163113_messy_jackal/migration.sqlAdded+2
- packages/console/core/migrations/20251031163113_messy_jackal/snapshot.jsonAdded+1663
- packages/console/core/migrations/20251125223403_famous_magik/migration.sqlAdded+8
- packages/console/core/migrations/20251125223403_famous_magik/snapshot.jsonAdded+1743
- packages/console/core/migrations/20260107041522_tiny_captain_midlands/migration.sqlAdded+1
- packages/console/core/migrations/20260107041522_tiny_captain_midlands/snapshot.jsonAdded+2037
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889CREATE TABLE `account` ( `id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `email` varchar(255) NOT NULL, CONSTRAINT `email` UNIQUE(`email`));--> statement-breakpointCREATE TABLE `billing` ( `id` varchar(30) NOT NULL, `workspace_id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `customer_id` varchar(255), `payment_method_id` varchar(255), `payment_method_last4` varchar(4), `balance` bigint NOT NULL, `reload` boolean, CONSTRAINT `billing_workspace_id_id_pk` PRIMARY KEY(`workspace_id`,`id`));--> statement-breakpointCREATE TABLE `payment` ( `id` varchar(30) NOT NULL, `workspace_id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `customer_id` varchar(255), `payment_id` varchar(255), `amount` bigint NOT NULL, CONSTRAINT `payment_workspace_id_id_pk` PRIMARY KEY(`workspace_id`,`id`));--> statement-breakpointCREATE TABLE `usage` ( `id` varchar(30) NOT NULL, `workspace_id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `model` varchar(255) NOT NULL, `input_tokens` int NOT NULL, `output_tokens` int NOT NULL, `reasoning_tokens` int, `cache_read_tokens` int, `cache_write_tokens` int, `cost` bigint NOT NULL, CONSTRAINT `usage_workspace_id_id_pk` PRIMARY KEY(`workspace_id`,`id`));--> statement-breakpointCREATE TABLE `key` ( `id` varchar(30) NOT NULL, `workspace_id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `user_id` text NOT NULL, `name` varchar(255) NOT NULL, `key` varchar(255) NOT NULL, `time_used` timestamp(3), CONSTRAINT `key_workspace_id_id_pk` PRIMARY KEY(`workspace_id`,`id`), CONSTRAINT `global_key` UNIQUE(`key`));--> statement-breakpointCREATE TABLE `user` ( `id` varchar(30) NOT NULL, `workspace_id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `email` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `time_seen` timestamp(3), `color` int, CONSTRAINT `user_workspace_id_id_pk` PRIMARY KEY(`workspace_id`,`id`), CONSTRAINT `user_email` UNIQUE(`workspace_id`,`email`));--> statement-breakpointCREATE TABLE `workspace` ( `id` varchar(30) NOT NULL, `slug` varchar(255), `name` varchar(255), `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), CONSTRAINT `workspace_id` PRIMARY KEY(`id`), CONSTRAINT `slug` UNIQUE(`slug`));123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967{ "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": []}12ALTER TABLE `key` ADD `actor` json;--> statement-breakpointALTER TABLE `key` DROP COLUMN `user_id`;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967{ "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": []}1ALTER TABLE `key` ADD CONSTRAINT `name` UNIQUE(`workspace_id`,`name`);12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001{ "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": []}1ALTER TABLE `usage` MODIFY COLUMN `provider` varchar(255) NOT NULL;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015{ "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": []}12ALTER TABLE `usage` ADD `cache_write_5m_tokens` int;--> statement-breakpointALTER TABLE `usage` ADD `cache_write_1h_tokens` int;12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043{ "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": []}1ALTER TABLE `usage` DROP COLUMN `cache_write_tokens`;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029{ "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": []}1ALTER TABLE `payment` ADD `error` varchar(255);1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057{ "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": []}123ALTER TABLE `billing` ADD `last_error` varchar(255);--> statement-breakpointALTER TABLE `billing` ADD `time_last_error` timestamp(3);--> statement-breakpointALTER TABLE `payment` DROP COLUMN `error`;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087{ "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": []}12ALTER TABLE `billing` RENAME COLUMN `last_error` TO `reload_error`;--> statement-breakpointALTER TABLE `billing` RENAME COLUMN `time_last_error` TO `time_reload_error`;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129{ "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": []}1ALTER TABLE `workspace` ADD `data_share` boolean;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143{ "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": []}1ALTER TABLE `workspace` DROP COLUMN `data_share`;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129{ "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": []}1ALTER TABLE `payment` ADD `time_refunded` timestamp(3);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143{ "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": []}1ALTER TABLE `payment` ADD `invoice_id` varchar(255);12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157{ "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": []}1ALTER TABLE `user` MODIFY COLUMN `role` enum('admin','member') NOT NULL;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185{ "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": []}123ALTER TABLE `user` ADD `account_id` varchar(30);--> statement-breakpointALTER TABLE `user` ADD `old_account_id` varchar(30);--> statement-breakpointALTER TABLE `user` ADD CONSTRAINT `user_account_id` UNIQUE(`workspace_id`,`account_id`);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233{ "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": []}12ALTER TABLE `user` DROP COLUMN `old_account_id`;--> statement-breakpointALTER TABLE `user` DROP COLUMN `old_email`;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237{ "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": []}1ALTER TABLE `key` ADD `user_id` varchar(30);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251{ "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": []}1ALTER TABLE `key` DROP INDEX `name`;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231{ "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": []}1ALTER TABLE `workspace` MODIFY COLUMN `name` varchar(255) NOT NULL;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203{ "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": []}1234567891011CREATE TABLE `provider` ( `id` varchar(30) NOT NULL, `workspace_id` varchar(30) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `provider` varchar(64) NOT NULL, `credentials` text NOT NULL, CONSTRAINT `provider_workspace_id_id_pk` PRIMARY KEY(`workspace_id`,`id`), CONSTRAINT `workspace_provider` UNIQUE(`workspace_id`,`provider`));12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487{ "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": []}123ALTER TABLE `account` DROP INDEX `email`;--> statement-breakpointCREATE INDEX `account_id` ON `auth` (`account_id`);--> statement-breakpointALTER TABLE `account` DROP COLUMN `email`;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623{ "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": []}12ALTER TABLE `account` ADD PRIMARY KEY(`id`);--> statement-breakpointALTER TABLE `auth` ADD PRIMARY KEY(`id`);123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635{ "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": []}12ALTER TABLE `billing` ADD `reload_trigger` int;--> statement-breakpointALTER TABLE `billing` ADD `reload_amount` int;1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663{ "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": []}12345678CREATE TABLE `ip` ( `ip` varchar(45) NOT NULL, `time_created` timestamp(3) NOT NULL DEFAULT (now()), `time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `time_deleted` timestamp(3), `usage` int, CONSTRAINT `ip_ip_pk` PRIMARY KEY(`ip`));123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743{ "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": []}1ALTER TABLE `usage` RENAME COLUMN `data` TO `enrichment`;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037{ "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": []}packages/console/core/migrations/20250902065410_fluffy_raza/migration.sqlAdded+89
packages/console/core/migrations/20250902065410_fluffy_raza/snapshot.jsonAdded+967
packages/console/core/migrations/20250903035359_serious_whistler/migration.sqlAdded+2
packages/console/core/migrations/20250903035359_serious_whistler/snapshot.jsonAdded+967
packages/console/core/migrations/20250911141957_dusty_clint_barton/migration.sqlAdded+1
packages/console/core/migrations/20250911141957_dusty_clint_barton/snapshot.jsonAdded+1001
packages/console/core/migrations/20250911231144_jazzy_skrulls/migration.sqlAdded+1
packages/console/core/migrations/20250911231144_jazzy_skrulls/snapshot.jsonAdded+1015
packages/console/core/migrations/20250912021148_parallel_gauntlet/migration.sqlAdded+2
packages/console/core/migrations/20250912021148_parallel_gauntlet/snapshot.jsonAdded+1043
packages/console/core/migrations/20250912161749_familiar_nightshade/migration.sqlAdded+1
packages/console/core/migrations/20250912161749_familiar_nightshade/snapshot.jsonAdded+1029
packages/console/core/migrations/20250914222302_redundant_piledriver/migration.sqlAdded+1
packages/console/core/migrations/20250914222302_redundant_piledriver/snapshot.jsonAdded+1057
packages/console/core/migrations/20250915150801_freezing_phil_sheldon/migration.sqlAdded+3
packages/console/core/migrations/20250915150801_freezing_phil_sheldon/snapshot.jsonAdded+1087
packages/console/core/migrations/20250915172258_absurd_hobgoblin/migration.sqlAdded+2
packages/console/core/migrations/20250915172258_absurd_hobgoblin/snapshot.jsonAdded+1129
packages/console/core/migrations/20250919135159_demonic_princess_powerful/migration.sqlAdded+1
packages/console/core/migrations/20250919135159_demonic_princess_powerful/snapshot.jsonAdded+1143
packages/console/core/migrations/20250921042124_cloudy_revanche/migration.sqlAdded+1
packages/console/core/migrations/20250921042124_cloudy_revanche/snapshot.jsonAdded+1129
packages/console/core/migrations/20250923213126_cold_la_nuit/migration.sqlAdded+1
packages/console/core/migrations/20250923213126_cold_la_nuit/snapshot.jsonAdded+1143
packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/migration.sqlAdded+1
packages/console/core/migrations/20250924230623_woozy_thaddeus_ross/snapshot.jsonAdded+1157
packages/console/core/migrations/20250928235456_dazzling_cable/migration.sqlAdded+1
packages/console/core/migrations/20250928235456_dazzling_cable/snapshot.jsonAdded+1185
packages/console/core/migrations/20251002175032_nice_dreadnoughts/migration.sqlAdded+3
packages/console/core/migrations/20251002175032_nice_dreadnoughts/snapshot.jsonAdded+1233
packages/console/core/migrations/20251003202205_early_black_crow/migration.sqlAdded+2
packages/console/core/migrations/20251003202205_early_black_crow/snapshot.jsonAdded+1237
packages/console/core/migrations/20251003210411_legal_joseph/migration.sqlAdded+1
packages/console/core/migrations/20251003210411_legal_joseph/snapshot.jsonAdded+1251
packages/console/core/migrations/20251004030300_numerous_prodigy/migration.sqlAdded+1
packages/console/core/migrations/20251004030300_numerous_prodigy/snapshot.jsonAdded+1231
packages/console/core/migrations/20251007024345_careful_cerise/migration.sqlAdded+1
packages/console/core/migrations/20251007024345_careful_cerise/snapshot.jsonAdded+1203
packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/migration.sqlAdded+11
packages/console/core/migrations/20251008161718_outgoing_outlaw_kid/snapshot.jsonAdded+1487
packages/console/core/migrations/20251017015733_narrow_blindfold/migration.sqlAdded+3
packages/console/core/migrations/20251017015733_narrow_blindfold/snapshot.jsonAdded+1623
packages/console/core/migrations/20251017024232_slimy_energizer/migration.sqlAdded+2
packages/console/core/migrations/20251017024232_slimy_energizer/snapshot.jsonAdded+1635
packages/console/core/migrations/20251031163113_messy_jackal/migration.sqlAdded+2
packages/console/core/migrations/20251031163113_messy_jackal/snapshot.jsonAdded+1663
packages/console/core/migrations/20251125223403_famous_magik/migration.sqlAdded+8
packages/console/core/migrations/20251125223403_famous_magik/snapshot.jsonAdded+1743
packages/console/core/migrations/20260107041522_tiny_captain_midlands/migration.sqlAdded+1
packages/console/core/migrations/20260107041522_tiny_captain_midlands/snapshot.jsonAdded+2037