From 55eb03165e0dd33af52793c85b03a0d24752e0a0 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Tue, 20 Jan 2026 11:36:52 -0700 Subject: [PATCH] Fixed migrations --- ...ss_king_cobra.sql => 0000_lazy_rictor.sql} | 64 +- drizzle/0001_lazy_roughhouse.sql | 6 - drizzle/0002_chilly_cyclops.sql | 16 - drizzle/0003_amusing_wendigo.sql | 3 - drizzle/0004_happy_namorita.sql | 22 - drizzle/0005_fair_skreet.sql | 5 - drizzle/0006_good_malcolm_colcord.sql | 2 - drizzle/meta/0000_snapshot.json | 455 ++++-- drizzle/meta/0001_snapshot.json | 1029 ------------- drizzle/meta/0002_snapshot.json | 1150 -------------- drizzle/meta/0003_snapshot.json | 1174 -------------- drizzle/meta/0004_snapshot.json | 1315 ---------------- drizzle/meta/0005_snapshot.json | 1353 ----------------- drizzle/meta/0006_snapshot.json | 1266 --------------- drizzle/meta/_journal.json | 46 +- 15 files changed, 421 insertions(+), 7485 deletions(-) rename drizzle/{0000_motionless_king_cobra.sql => 0000_lazy_rictor.sql} (63%) delete mode 100644 drizzle/0001_lazy_roughhouse.sql delete mode 100644 drizzle/0002_chilly_cyclops.sql delete mode 100644 drizzle/0003_amusing_wendigo.sql delete mode 100644 drizzle/0004_happy_namorita.sql delete mode 100644 drizzle/0005_fair_skreet.sql delete mode 100644 drizzle/0006_good_malcolm_colcord.sql delete mode 100644 drizzle/meta/0001_snapshot.json delete mode 100644 drizzle/meta/0002_snapshot.json delete mode 100644 drizzle/meta/0003_snapshot.json delete mode 100644 drizzle/meta/0004_snapshot.json delete mode 100644 drizzle/meta/0005_snapshot.json delete mode 100644 drizzle/meta/0006_snapshot.json diff --git a/drizzle/0000_motionless_king_cobra.sql b/drizzle/0000_lazy_rictor.sql similarity index 63% rename from drizzle/0000_motionless_king_cobra.sql rename to drizzle/0000_lazy_rictor.sql index d0add5a..6b49fda 100644 --- a/drizzle/0000_motionless_king_cobra.sql +++ b/drizzle/0000_lazy_rictor.sql @@ -10,24 +10,23 @@ CREATE TABLE `api_tokens` ( ); --> statement-breakpoint CREATE UNIQUE INDEX `api_tokens_token_unique` ON `api_tokens` (`token`);--> statement-breakpoint -CREATE TABLE `categories` ( - `id` text PRIMARY KEY NOT NULL, - `organization_id` text NOT NULL, - `name` text NOT NULL, - `color` text, - `created_at` integer, - FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint +CREATE INDEX `api_tokens_user_id_idx` ON `api_tokens` (`user_id`);--> statement-breakpoint CREATE TABLE `clients` ( `id` text PRIMARY KEY NOT NULL, `organization_id` text NOT NULL, `name` text NOT NULL, `email` text, + `phone` text, + `street` text, + `city` text, + `state` text, + `zip` text, + `country` text, `created_at` integer, FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `clients_organization_id_idx` ON `clients` (`organization_id`);--> statement-breakpoint CREATE TABLE `invoice_items` ( `id` text PRIMARY KEY NOT NULL, `invoice_id` text NOT NULL, @@ -38,6 +37,7 @@ CREATE TABLE `invoice_items` ( FOREIGN KEY (`invoice_id`) REFERENCES `invoices`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `invoice_items_invoice_id_idx` ON `invoice_items` (`invoice_id`);--> statement-breakpoint CREATE TABLE `invoices` ( `id` text PRIMARY KEY NOT NULL, `organization_id` text NOT NULL, @@ -50,6 +50,9 @@ CREATE TABLE `invoices` ( `notes` text, `currency` text DEFAULT 'USD' NOT NULL, `subtotal` integer DEFAULT 0 NOT NULL, + `discount_value` real DEFAULT 0, + `discount_type` text DEFAULT 'percentage', + `discount_amount` integer DEFAULT 0, `tax_rate` real DEFAULT 0, `tax_amount` integer DEFAULT 0 NOT NULL, `total` integer DEFAULT 0 NOT NULL, @@ -58,6 +61,8 @@ CREATE TABLE `invoices` ( FOREIGN KEY (`client_id`) REFERENCES `clients`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `invoices_organization_id_idx` ON `invoices` (`organization_id`);--> statement-breakpoint +CREATE INDEX `invoices_client_id_idx` ON `invoices` (`client_id`);--> statement-breakpoint CREATE TABLE `members` ( `user_id` text NOT NULL, `organization_id` text NOT NULL, @@ -68,6 +73,8 @@ CREATE TABLE `members` ( FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `members_user_id_idx` ON `members` (`user_id`);--> statement-breakpoint +CREATE INDEX `members_organization_id_idx` ON `members` (`organization_id`);--> statement-breakpoint CREATE TABLE `organizations` ( `id` text PRIMARY KEY NOT NULL, `name` text NOT NULL, @@ -77,9 +84,33 @@ CREATE TABLE `organizations` ( `state` text, `zip` text, `country` text, + `default_tax_rate` real DEFAULT 0, + `default_currency` text DEFAULT 'USD', `created_at` integer ); --> statement-breakpoint +CREATE TABLE `passkey_challenges` ( + `id` text PRIMARY KEY NOT NULL, + `challenge` text NOT NULL, + `user_id` text, + `expires_at` integer NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `passkey_challenges_challenge_unique` ON `passkey_challenges` (`challenge`);--> statement-breakpoint +CREATE TABLE `passkeys` ( + `id` text PRIMARY KEY NOT NULL, + `user_id` text NOT NULL, + `public_key` text NOT NULL, + `counter` integer NOT NULL, + `device_type` text NOT NULL, + `backed_up` integer NOT NULL, + `transports` text, + `last_used_at` integer, + `created_at` integer, + FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE INDEX `passkeys_user_id_idx` ON `passkeys` (`user_id`);--> statement-breakpoint CREATE TABLE `sessions` ( `id` text PRIMARY KEY NOT NULL, `user_id` text NOT NULL, @@ -87,6 +118,7 @@ CREATE TABLE `sessions` ( FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `sessions_user_id_idx` ON `sessions` (`user_id`);--> statement-breakpoint CREATE TABLE `site_settings` ( `id` text PRIMARY KEY NOT NULL, `key` text NOT NULL, @@ -100,27 +132,33 @@ CREATE TABLE `tags` ( `organization_id` text NOT NULL, `name` text NOT NULL, `color` text, + `rate` integer DEFAULT 0, `created_at` integer, FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `tags_organization_id_idx` ON `tags` (`organization_id`);--> statement-breakpoint CREATE TABLE `time_entries` ( `id` text PRIMARY KEY NOT NULL, `user_id` text NOT NULL, `organization_id` text NOT NULL, `client_id` text NOT NULL, - `category_id` text NOT NULL, `start_time` integer NOT NULL, `end_time` integer, `description` text, + `invoice_id` text, `is_manual` integer DEFAULT false, `created_at` integer, FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action, FOREIGN KEY (`organization_id`) REFERENCES `organizations`(`id`) ON UPDATE no action ON DELETE no action, - FOREIGN KEY (`client_id`) REFERENCES `clients`(`id`) ON UPDATE no action ON DELETE no action, - FOREIGN KEY (`category_id`) REFERENCES `categories`(`id`) ON UPDATE no action ON DELETE no action + FOREIGN KEY (`client_id`) REFERENCES `clients`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `time_entries_user_id_idx` ON `time_entries` (`user_id`);--> statement-breakpoint +CREATE INDEX `time_entries_organization_id_idx` ON `time_entries` (`organization_id`);--> statement-breakpoint +CREATE INDEX `time_entries_client_id_idx` ON `time_entries` (`client_id`);--> statement-breakpoint +CREATE INDEX `time_entries_start_time_idx` ON `time_entries` (`start_time`);--> statement-breakpoint +CREATE INDEX `time_entries_invoice_id_idx` ON `time_entries` (`invoice_id`);--> statement-breakpoint CREATE TABLE `time_entry_tags` ( `time_entry_id` text NOT NULL, `tag_id` text NOT NULL, @@ -129,6 +167,8 @@ CREATE TABLE `time_entry_tags` ( FOREIGN KEY (`tag_id`) REFERENCES `tags`(`id`) ON UPDATE no action ON DELETE no action ); --> statement-breakpoint +CREATE INDEX `time_entry_tags_time_entry_id_idx` ON `time_entry_tags` (`time_entry_id`);--> statement-breakpoint +CREATE INDEX `time_entry_tags_tag_id_idx` ON `time_entry_tags` (`tag_id`);--> statement-breakpoint CREATE TABLE `users` ( `id` text PRIMARY KEY NOT NULL, `email` text NOT NULL, diff --git a/drizzle/0001_lazy_roughhouse.sql b/drizzle/0001_lazy_roughhouse.sql deleted file mode 100644 index 4f8b860..0000000 --- a/drizzle/0001_lazy_roughhouse.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `clients` ADD `phone` text;--> statement-breakpoint -ALTER TABLE `clients` ADD `street` text;--> statement-breakpoint -ALTER TABLE `clients` ADD `city` text;--> statement-breakpoint -ALTER TABLE `clients` ADD `state` text;--> statement-breakpoint -ALTER TABLE `clients` ADD `zip` text;--> statement-breakpoint -ALTER TABLE `clients` ADD `country` text; \ No newline at end of file diff --git a/drizzle/0002_chilly_cyclops.sql b/drizzle/0002_chilly_cyclops.sql deleted file mode 100644 index f940fc1..0000000 --- a/drizzle/0002_chilly_cyclops.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE INDEX `api_tokens_user_id_idx` ON `api_tokens` (`user_id`);--> statement-breakpoint -CREATE INDEX `categories_organization_id_idx` ON `categories` (`organization_id`);--> statement-breakpoint -CREATE INDEX `clients_organization_id_idx` ON `clients` (`organization_id`);--> statement-breakpoint -CREATE INDEX `invoice_items_invoice_id_idx` ON `invoice_items` (`invoice_id`);--> statement-breakpoint -CREATE INDEX `invoices_organization_id_idx` ON `invoices` (`organization_id`);--> statement-breakpoint -CREATE INDEX `invoices_client_id_idx` ON `invoices` (`client_id`);--> statement-breakpoint -CREATE INDEX `members_user_id_idx` ON `members` (`user_id`);--> statement-breakpoint -CREATE INDEX `members_organization_id_idx` ON `members` (`organization_id`);--> statement-breakpoint -CREATE INDEX `sessions_user_id_idx` ON `sessions` (`user_id`);--> statement-breakpoint -CREATE INDEX `tags_organization_id_idx` ON `tags` (`organization_id`);--> statement-breakpoint -CREATE INDEX `time_entries_user_id_idx` ON `time_entries` (`user_id`);--> statement-breakpoint -CREATE INDEX `time_entries_organization_id_idx` ON `time_entries` (`organization_id`);--> statement-breakpoint -CREATE INDEX `time_entries_client_id_idx` ON `time_entries` (`client_id`);--> statement-breakpoint -CREATE INDEX `time_entries_start_time_idx` ON `time_entries` (`start_time`);--> statement-breakpoint -CREATE INDEX `time_entry_tags_time_entry_id_idx` ON `time_entry_tags` (`time_entry_id`);--> statement-breakpoint -CREATE INDEX `time_entry_tags_tag_id_idx` ON `time_entry_tags` (`tag_id`); \ No newline at end of file diff --git a/drizzle/0003_amusing_wendigo.sql b/drizzle/0003_amusing_wendigo.sql deleted file mode 100644 index 6f67284..0000000 --- a/drizzle/0003_amusing_wendigo.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `invoices` ADD `discount_value` real DEFAULT 0;--> statement-breakpoint -ALTER TABLE `invoices` ADD `discount_type` text DEFAULT 'percentage';--> statement-breakpoint -ALTER TABLE `invoices` ADD `discount_amount` integer DEFAULT 0; \ No newline at end of file diff --git a/drizzle/0004_happy_namorita.sql b/drizzle/0004_happy_namorita.sql deleted file mode 100644 index 1b58b2e..0000000 --- a/drizzle/0004_happy_namorita.sql +++ /dev/null @@ -1,22 +0,0 @@ -CREATE TABLE `passkey_challenges` ( - `id` text PRIMARY KEY NOT NULL, - `challenge` text NOT NULL, - `user_id` text, - `expires_at` integer NOT NULL -); ---> statement-breakpoint -CREATE UNIQUE INDEX `passkey_challenges_challenge_unique` ON `passkey_challenges` (`challenge`);--> statement-breakpoint -CREATE TABLE `passkeys` ( - `id` text PRIMARY KEY NOT NULL, - `user_id` text NOT NULL, - `public_key` text NOT NULL, - `counter` integer NOT NULL, - `device_type` text NOT NULL, - `backed_up` integer NOT NULL, - `transports` text, - `last_used_at` integer, - `created_at` integer, - FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -CREATE INDEX `passkeys_user_id_idx` ON `passkeys` (`user_id`); \ No newline at end of file diff --git a/drizzle/0005_fair_skreet.sql b/drizzle/0005_fair_skreet.sql deleted file mode 100644 index 447ee09..0000000 --- a/drizzle/0005_fair_skreet.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `organizations` ADD `default_tax_rate` real DEFAULT 0;--> statement-breakpoint -ALTER TABLE `organizations` ADD `default_currency` text DEFAULT 'USD';--> statement-breakpoint -ALTER TABLE `tags` ADD `rate` integer DEFAULT 0;--> statement-breakpoint -ALTER TABLE `time_entries` ADD `invoice_id` text;--> statement-breakpoint -CREATE INDEX `time_entries_invoice_id_idx` ON `time_entries` (`invoice_id`); \ No newline at end of file diff --git a/drizzle/0006_good_malcolm_colcord.sql b/drizzle/0006_good_malcolm_colcord.sql deleted file mode 100644 index affb1dc..0000000 --- a/drizzle/0006_good_malcolm_colcord.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE `categories`;--> statement-breakpoint -ALTER TABLE `time_entries` DROP COLUMN `category_id`; \ No newline at end of file diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index f625b51..d1e8432 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,7 +1,7 @@ { "version": "6", "dialect": "sqlite", - "id": "e1e0fee4-786a-4f9f-9ebe-659aae0a55be", + "id": "8343b003-264b-444a-9782-07d736dd3407", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "api_tokens": { @@ -65,6 +65,13 @@ "token" ], "isUnique": true + }, + "api_tokens_user_id_idx": { + "name": "api_tokens_user_id_idx", + "columns": [ + "user_id" + ], + "isUnique": false } }, "foreignKeys": { @@ -86,65 +93,6 @@ "uniqueConstraints": {}, "checkConstraints": {} }, - "categories": { - "name": "categories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "categories_organization_id_organizations_id_fk": { - "name": "categories_organization_id_organizations_id_fk", - "tableFrom": "categories", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, "clients": { "name": "clients", "columns": { @@ -176,6 +124,48 @@ "notNull": false, "autoincrement": false }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "street": { + "name": "street", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "city": { + "name": "city", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "zip": { + "name": "zip", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "country": { + "name": "country", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, "created_at": { "name": "created_at", "type": "integer", @@ -184,7 +174,15 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "clients_organization_id_idx": { + "name": "clients_organization_id_idx", + "columns": [ + "organization_id" + ], + "isUnique": false + } + }, "foreignKeys": { "clients_organization_id_organizations_id_fk": { "name": "clients_organization_id_organizations_id_fk", @@ -253,7 +251,15 @@ "default": 0 } }, - "indexes": {}, + "indexes": { + "invoice_items_invoice_id_idx": { + "name": "invoice_items_invoice_id_idx", + "columns": [ + "invoice_id" + ], + "isUnique": false + } + }, "foreignKeys": { "invoice_items_invoice_id_invoices_id_fk": { "name": "invoice_items_invoice_id_invoices_id_fk", @@ -357,6 +363,30 @@ "autoincrement": false, "default": 0 }, + "discount_value": { + "name": "discount_value", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "discount_type": { + "name": "discount_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'percentage'" + }, + "discount_amount": { + "name": "discount_amount", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, "tax_rate": { "name": "tax_rate", "type": "real", @@ -389,7 +419,22 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "invoices_organization_id_idx": { + "name": "invoices_organization_id_idx", + "columns": [ + "organization_id" + ], + "isUnique": false + }, + "invoices_client_id_idx": { + "name": "invoices_client_id_idx", + "columns": [ + "client_id" + ], + "isUnique": false + } + }, "foreignKeys": { "invoices_organization_id_organizations_id_fk": { "name": "invoices_organization_id_organizations_id_fk", @@ -455,7 +500,22 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "members_user_id_idx": { + "name": "members_user_id_idx", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "members_organization_id_idx": { + "name": "members_organization_id_idx", + "columns": [ + "organization_id" + ], + "isUnique": false + } + }, "foreignKeys": { "members_user_id_users_id_fk": { "name": "members_user_id_users_id_fk", @@ -555,6 +615,22 @@ "notNull": false, "autoincrement": false }, + "default_tax_rate": { + "name": "default_tax_rate", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "default_currency": { + "name": "default_currency", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'USD'" + }, "created_at": { "name": "created_at", "type": "integer", @@ -569,6 +645,147 @@ "uniqueConstraints": {}, "checkConstraints": {} }, + "passkey_challenges": { + "name": "passkey_challenges", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "challenge": { + "name": "challenge", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "expires_at": { + "name": "expires_at", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "passkey_challenges_challenge_unique": { + "name": "passkey_challenges_challenge_unique", + "columns": [ + "challenge" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "passkeys": { + "name": "passkeys", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "counter": { + "name": "counter", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "backed_up": { + "name": "backed_up", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "transports": { + "name": "transports", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "passkeys_user_id_idx": { + "name": "passkeys_user_id_idx", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "passkeys_user_id_users_id_fk": { + "name": "passkeys_user_id_users_id_fk", + "tableFrom": "passkeys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, "sessions": { "name": "sessions", "columns": { @@ -594,7 +811,15 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "sessions_user_id_idx": { + "name": "sessions_user_id_idx", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, "foreignKeys": { "sessions_user_id_users_id_fk": { "name": "sessions_user_id_users_id_fk", @@ -691,6 +916,14 @@ "notNull": false, "autoincrement": false }, + "rate": { + "name": "rate", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, "created_at": { "name": "created_at", "type": "integer", @@ -699,7 +932,15 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "tags_organization_id_idx": { + "name": "tags_organization_id_idx", + "columns": [ + "organization_id" + ], + "isUnique": false + } + }, "foreignKeys": { "tags_organization_id_organizations_id_fk": { "name": "tags_organization_id_organizations_id_fk", @@ -750,13 +991,6 @@ "notNull": true, "autoincrement": false }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, "start_time": { "name": "start_time", "type": "integer", @@ -778,6 +1012,13 @@ "notNull": false, "autoincrement": false }, + "invoice_id": { + "name": "invoice_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, "is_manual": { "name": "is_manual", "type": "integer", @@ -794,7 +1035,43 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "time_entries_user_id_idx": { + "name": "time_entries_user_id_idx", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "time_entries_organization_id_idx": { + "name": "time_entries_organization_id_idx", + "columns": [ + "organization_id" + ], + "isUnique": false + }, + "time_entries_client_id_idx": { + "name": "time_entries_client_id_idx", + "columns": [ + "client_id" + ], + "isUnique": false + }, + "time_entries_start_time_idx": { + "name": "time_entries_start_time_idx", + "columns": [ + "start_time" + ], + "isUnique": false + }, + "time_entries_invoice_id_idx": { + "name": "time_entries_invoice_id_idx", + "columns": [ + "invoice_id" + ], + "isUnique": false + } + }, "foreignKeys": { "time_entries_user_id_users_id_fk": { "name": "time_entries_user_id_users_id_fk", @@ -834,19 +1111,6 @@ ], "onDelete": "no action", "onUpdate": "no action" - }, - "time_entries_category_id_categories_id_fk": { - "name": "time_entries_category_id_categories_id_fk", - "tableFrom": "time_entries", - "tableTo": "categories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" } }, "compositePrimaryKeys": {}, @@ -871,7 +1135,22 @@ "autoincrement": false } }, - "indexes": {}, + "indexes": { + "time_entry_tags_time_entry_id_idx": { + "name": "time_entry_tags_time_entry_id_idx", + "columns": [ + "time_entry_id" + ], + "isUnique": false + }, + "time_entry_tags_tag_id_idx": { + "name": "time_entry_tags_tag_id_idx", + "columns": [ + "tag_id" + ], + "isUnique": false + } + }, "foreignKeys": { "time_entry_tags_time_entry_id_time_entries_id_fk": { "name": "time_entry_tags_time_entry_id_time_entries_id_fk", diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json deleted file mode 100644 index 13d1b24..0000000 --- a/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,1029 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "5483c77e-e742-4fbd-8494-d6f9c6c9e28a", - "prevId": "e1e0fee4-786a-4f9f-9ebe-659aae0a55be", - "tables": { - "api_tokens": { - "name": "api_tokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'*'" - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "api_tokens_token_unique": { - "name": "api_tokens_token_unique", - "columns": [ - "token" - ], - "isUnique": true - } - }, - "foreignKeys": { - "api_tokens_user_id_users_id_fk": { - "name": "api_tokens_user_id_users_id_fk", - "tableFrom": "api_tokens", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "categories": { - "name": "categories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "categories_organization_id_organizations_id_fk": { - "name": "categories_organization_id_organizations_id_fk", - "tableFrom": "categories", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "clients": { - "name": "clients", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "phone": { - "name": "phone", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "clients_organization_id_organizations_id_fk": { - "name": "clients_organization_id_organizations_id_fk", - "tableFrom": "clients", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoice_items": { - "name": "invoice_items", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "quantity": { - "name": "quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "unit_price": { - "name": "unit_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "amount": { - "name": "amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "invoice_items_invoice_id_invoices_id_fk": { - "name": "invoice_items_invoice_id_invoices_id_fk", - "tableFrom": "invoice_items", - "tableTo": "invoices", - "columnsFrom": [ - "invoice_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoices": { - "name": "invoices", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "number": { - "name": "number", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'invoice'" - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'draft'" - }, - "issue_date": { - "name": "issue_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "due_date": { - "name": "due_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "notes": { - "name": "notes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "currency": { - "name": "currency", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'USD'" - }, - "subtotal": { - "name": "subtotal", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "tax_rate": { - "name": "tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_amount": { - "name": "tax_amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "total": { - "name": "total", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "invoices_organization_id_organizations_id_fk": { - "name": "invoices_organization_id_organizations_id_fk", - "tableFrom": "invoices", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "invoices_client_id_clients_id_fk": { - "name": "invoices_client_id_clients_id_fk", - "tableFrom": "invoices", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "members": { - "name": "members", - "columns": { - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'member'" - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "members_user_id_users_id_fk": { - "name": "members_user_id_users_id_fk", - "tableFrom": "members", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "members_organization_id_organizations_id_fk": { - "name": "members_organization_id_organizations_id_fk", - "tableFrom": "members", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "members_user_id_organization_id_pk": { - "columns": [ - "user_id", - "organization_id" - ], - "name": "members_user_id_organization_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "organizations": { - "name": "organizations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "logo_url": { - "name": "logo_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "sessions": { - "name": "sessions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "site_settings": { - "name": "site_settings", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "site_settings_key_unique": { - "name": "site_settings_key_unique", - "columns": [ - "key" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tags": { - "name": "tags", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "tags_organization_id_organizations_id_fk": { - "name": "tags_organization_id_organizations_id_fk", - "tableFrom": "tags", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entries": { - "name": "time_entries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "start_time": { - "name": "start_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "end_time": { - "name": "end_time", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_manual": { - "name": "is_manual", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "time_entries_user_id_users_id_fk": { - "name": "time_entries_user_id_users_id_fk", - "tableFrom": "time_entries", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_organization_id_organizations_id_fk": { - "name": "time_entries_organization_id_organizations_id_fk", - "tableFrom": "time_entries", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_client_id_clients_id_fk": { - "name": "time_entries_client_id_clients_id_fk", - "tableFrom": "time_entries", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_category_id_categories_id_fk": { - "name": "time_entries_category_id_categories_id_fk", - "tableFrom": "time_entries", - "tableTo": "categories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entry_tags": { - "name": "time_entry_tags", - "columns": { - "time_entry_id": { - "name": "time_entry_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tag_id": { - "name": "tag_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "time_entry_tags_time_entry_id_time_entries_id_fk": { - "name": "time_entry_tags_time_entry_id_time_entries_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "time_entries", - "columnsFrom": [ - "time_entry_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entry_tags_tag_id_tags_id_fk": { - "name": "time_entry_tags_tag_id_tags_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "tags", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "time_entry_tags_time_entry_id_tag_id_pk": { - "columns": [ - "time_entry_id", - "tag_id" - ], - "name": "time_entry_tags_time_entry_id_tag_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_site_admin": { - "name": "is_site_admin", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json deleted file mode 100644 index de220dd..0000000 --- a/drizzle/meta/0002_snapshot.json +++ /dev/null @@ -1,1150 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "14e8eaed-b6e1-40d2-8ad7-3d76a21248b4", - "prevId": "5483c77e-e742-4fbd-8494-d6f9c6c9e28a", - "tables": { - "api_tokens": { - "name": "api_tokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'*'" - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "api_tokens_token_unique": { - "name": "api_tokens_token_unique", - "columns": [ - "token" - ], - "isUnique": true - }, - "api_tokens_user_id_idx": { - "name": "api_tokens_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "api_tokens_user_id_users_id_fk": { - "name": "api_tokens_user_id_users_id_fk", - "tableFrom": "api_tokens", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "categories": { - "name": "categories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "categories_organization_id_idx": { - "name": "categories_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "categories_organization_id_organizations_id_fk": { - "name": "categories_organization_id_organizations_id_fk", - "tableFrom": "categories", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "clients": { - "name": "clients", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "phone": { - "name": "phone", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "clients_organization_id_idx": { - "name": "clients_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "clients_organization_id_organizations_id_fk": { - "name": "clients_organization_id_organizations_id_fk", - "tableFrom": "clients", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoice_items": { - "name": "invoice_items", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "quantity": { - "name": "quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "unit_price": { - "name": "unit_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "amount": { - "name": "amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - } - }, - "indexes": { - "invoice_items_invoice_id_idx": { - "name": "invoice_items_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoice_items_invoice_id_invoices_id_fk": { - "name": "invoice_items_invoice_id_invoices_id_fk", - "tableFrom": "invoice_items", - "tableTo": "invoices", - "columnsFrom": [ - "invoice_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoices": { - "name": "invoices", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "number": { - "name": "number", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'invoice'" - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'draft'" - }, - "issue_date": { - "name": "issue_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "due_date": { - "name": "due_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "notes": { - "name": "notes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "currency": { - "name": "currency", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'USD'" - }, - "subtotal": { - "name": "subtotal", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "tax_rate": { - "name": "tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_amount": { - "name": "tax_amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "total": { - "name": "total", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "invoices_organization_id_idx": { - "name": "invoices_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "invoices_client_id_idx": { - "name": "invoices_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoices_organization_id_organizations_id_fk": { - "name": "invoices_organization_id_organizations_id_fk", - "tableFrom": "invoices", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "invoices_client_id_clients_id_fk": { - "name": "invoices_client_id_clients_id_fk", - "tableFrom": "invoices", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "members": { - "name": "members", - "columns": { - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'member'" - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "members_user_id_idx": { - "name": "members_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "members_organization_id_idx": { - "name": "members_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "members_user_id_users_id_fk": { - "name": "members_user_id_users_id_fk", - "tableFrom": "members", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "members_organization_id_organizations_id_fk": { - "name": "members_organization_id_organizations_id_fk", - "tableFrom": "members", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "members_user_id_organization_id_pk": { - "columns": [ - "user_id", - "organization_id" - ], - "name": "members_user_id_organization_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "organizations": { - "name": "organizations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "logo_url": { - "name": "logo_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "sessions": { - "name": "sessions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "sessions_user_id_idx": { - "name": "sessions_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "site_settings": { - "name": "site_settings", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "site_settings_key_unique": { - "name": "site_settings_key_unique", - "columns": [ - "key" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tags": { - "name": "tags", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "tags_organization_id_idx": { - "name": "tags_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "tags_organization_id_organizations_id_fk": { - "name": "tags_organization_id_organizations_id_fk", - "tableFrom": "tags", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entries": { - "name": "time_entries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "start_time": { - "name": "start_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "end_time": { - "name": "end_time", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_manual": { - "name": "is_manual", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "time_entries_user_id_idx": { - "name": "time_entries_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "time_entries_organization_id_idx": { - "name": "time_entries_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "time_entries_client_id_idx": { - "name": "time_entries_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - }, - "time_entries_start_time_idx": { - "name": "time_entries_start_time_idx", - "columns": [ - "start_time" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entries_user_id_users_id_fk": { - "name": "time_entries_user_id_users_id_fk", - "tableFrom": "time_entries", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_organization_id_organizations_id_fk": { - "name": "time_entries_organization_id_organizations_id_fk", - "tableFrom": "time_entries", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_client_id_clients_id_fk": { - "name": "time_entries_client_id_clients_id_fk", - "tableFrom": "time_entries", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_category_id_categories_id_fk": { - "name": "time_entries_category_id_categories_id_fk", - "tableFrom": "time_entries", - "tableTo": "categories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entry_tags": { - "name": "time_entry_tags", - "columns": { - "time_entry_id": { - "name": "time_entry_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tag_id": { - "name": "tag_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "time_entry_tags_time_entry_id_idx": { - "name": "time_entry_tags_time_entry_id_idx", - "columns": [ - "time_entry_id" - ], - "isUnique": false - }, - "time_entry_tags_tag_id_idx": { - "name": "time_entry_tags_tag_id_idx", - "columns": [ - "tag_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entry_tags_time_entry_id_time_entries_id_fk": { - "name": "time_entry_tags_time_entry_id_time_entries_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "time_entries", - "columnsFrom": [ - "time_entry_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entry_tags_tag_id_tags_id_fk": { - "name": "time_entry_tags_tag_id_tags_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "tags", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "time_entry_tags_time_entry_id_tag_id_pk": { - "columns": [ - "time_entry_id", - "tag_id" - ], - "name": "time_entry_tags_time_entry_id_tag_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_site_admin": { - "name": "is_site_admin", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0003_snapshot.json b/drizzle/meta/0003_snapshot.json deleted file mode 100644 index a2fcddf..0000000 --- a/drizzle/meta/0003_snapshot.json +++ /dev/null @@ -1,1174 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "92a7d856-84d8-4db4-8a12-b9365941c401", - "prevId": "14e8eaed-b6e1-40d2-8ad7-3d76a21248b4", - "tables": { - "api_tokens": { - "name": "api_tokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'*'" - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "api_tokens_token_unique": { - "name": "api_tokens_token_unique", - "columns": [ - "token" - ], - "isUnique": true - }, - "api_tokens_user_id_idx": { - "name": "api_tokens_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "api_tokens_user_id_users_id_fk": { - "name": "api_tokens_user_id_users_id_fk", - "tableFrom": "api_tokens", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "categories": { - "name": "categories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "categories_organization_id_idx": { - "name": "categories_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "categories_organization_id_organizations_id_fk": { - "name": "categories_organization_id_organizations_id_fk", - "tableFrom": "categories", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "clients": { - "name": "clients", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "phone": { - "name": "phone", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "clients_organization_id_idx": { - "name": "clients_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "clients_organization_id_organizations_id_fk": { - "name": "clients_organization_id_organizations_id_fk", - "tableFrom": "clients", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoice_items": { - "name": "invoice_items", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "quantity": { - "name": "quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "unit_price": { - "name": "unit_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "amount": { - "name": "amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - } - }, - "indexes": { - "invoice_items_invoice_id_idx": { - "name": "invoice_items_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoice_items_invoice_id_invoices_id_fk": { - "name": "invoice_items_invoice_id_invoices_id_fk", - "tableFrom": "invoice_items", - "tableTo": "invoices", - "columnsFrom": [ - "invoice_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoices": { - "name": "invoices", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "number": { - "name": "number", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'invoice'" - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'draft'" - }, - "issue_date": { - "name": "issue_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "due_date": { - "name": "due_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "notes": { - "name": "notes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "currency": { - "name": "currency", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'USD'" - }, - "subtotal": { - "name": "subtotal", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "discount_value": { - "name": "discount_value", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "discount_type": { - "name": "discount_type", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'percentage'" - }, - "discount_amount": { - "name": "discount_amount", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_rate": { - "name": "tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_amount": { - "name": "tax_amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "total": { - "name": "total", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "invoices_organization_id_idx": { - "name": "invoices_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "invoices_client_id_idx": { - "name": "invoices_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoices_organization_id_organizations_id_fk": { - "name": "invoices_organization_id_organizations_id_fk", - "tableFrom": "invoices", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "invoices_client_id_clients_id_fk": { - "name": "invoices_client_id_clients_id_fk", - "tableFrom": "invoices", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "members": { - "name": "members", - "columns": { - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'member'" - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "members_user_id_idx": { - "name": "members_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "members_organization_id_idx": { - "name": "members_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "members_user_id_users_id_fk": { - "name": "members_user_id_users_id_fk", - "tableFrom": "members", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "members_organization_id_organizations_id_fk": { - "name": "members_organization_id_organizations_id_fk", - "tableFrom": "members", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "members_user_id_organization_id_pk": { - "columns": [ - "user_id", - "organization_id" - ], - "name": "members_user_id_organization_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "organizations": { - "name": "organizations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "logo_url": { - "name": "logo_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "sessions": { - "name": "sessions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "sessions_user_id_idx": { - "name": "sessions_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "site_settings": { - "name": "site_settings", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "site_settings_key_unique": { - "name": "site_settings_key_unique", - "columns": [ - "key" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tags": { - "name": "tags", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "tags_organization_id_idx": { - "name": "tags_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "tags_organization_id_organizations_id_fk": { - "name": "tags_organization_id_organizations_id_fk", - "tableFrom": "tags", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entries": { - "name": "time_entries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "start_time": { - "name": "start_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "end_time": { - "name": "end_time", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_manual": { - "name": "is_manual", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "time_entries_user_id_idx": { - "name": "time_entries_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "time_entries_organization_id_idx": { - "name": "time_entries_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "time_entries_client_id_idx": { - "name": "time_entries_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - }, - "time_entries_start_time_idx": { - "name": "time_entries_start_time_idx", - "columns": [ - "start_time" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entries_user_id_users_id_fk": { - "name": "time_entries_user_id_users_id_fk", - "tableFrom": "time_entries", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_organization_id_organizations_id_fk": { - "name": "time_entries_organization_id_organizations_id_fk", - "tableFrom": "time_entries", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_client_id_clients_id_fk": { - "name": "time_entries_client_id_clients_id_fk", - "tableFrom": "time_entries", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_category_id_categories_id_fk": { - "name": "time_entries_category_id_categories_id_fk", - "tableFrom": "time_entries", - "tableTo": "categories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entry_tags": { - "name": "time_entry_tags", - "columns": { - "time_entry_id": { - "name": "time_entry_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tag_id": { - "name": "tag_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "time_entry_tags_time_entry_id_idx": { - "name": "time_entry_tags_time_entry_id_idx", - "columns": [ - "time_entry_id" - ], - "isUnique": false - }, - "time_entry_tags_tag_id_idx": { - "name": "time_entry_tags_tag_id_idx", - "columns": [ - "tag_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entry_tags_time_entry_id_time_entries_id_fk": { - "name": "time_entry_tags_time_entry_id_time_entries_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "time_entries", - "columnsFrom": [ - "time_entry_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entry_tags_tag_id_tags_id_fk": { - "name": "time_entry_tags_tag_id_tags_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "tags", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "time_entry_tags_time_entry_id_tag_id_pk": { - "columns": [ - "time_entry_id", - "tag_id" - ], - "name": "time_entry_tags_time_entry_id_tag_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_site_admin": { - "name": "is_site_admin", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0004_snapshot.json b/drizzle/meta/0004_snapshot.json deleted file mode 100644 index a3591b7..0000000 --- a/drizzle/meta/0004_snapshot.json +++ /dev/null @@ -1,1315 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "434e419c-a025-443d-95e1-6d1e22de2418", - "prevId": "92a7d856-84d8-4db4-8a12-b9365941c401", - "tables": { - "api_tokens": { - "name": "api_tokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'*'" - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "api_tokens_token_unique": { - "name": "api_tokens_token_unique", - "columns": [ - "token" - ], - "isUnique": true - }, - "api_tokens_user_id_idx": { - "name": "api_tokens_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "api_tokens_user_id_users_id_fk": { - "name": "api_tokens_user_id_users_id_fk", - "tableFrom": "api_tokens", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "categories": { - "name": "categories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "categories_organization_id_idx": { - "name": "categories_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "categories_organization_id_organizations_id_fk": { - "name": "categories_organization_id_organizations_id_fk", - "tableFrom": "categories", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "clients": { - "name": "clients", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "phone": { - "name": "phone", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "clients_organization_id_idx": { - "name": "clients_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "clients_organization_id_organizations_id_fk": { - "name": "clients_organization_id_organizations_id_fk", - "tableFrom": "clients", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoice_items": { - "name": "invoice_items", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "quantity": { - "name": "quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "unit_price": { - "name": "unit_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "amount": { - "name": "amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - } - }, - "indexes": { - "invoice_items_invoice_id_idx": { - "name": "invoice_items_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoice_items_invoice_id_invoices_id_fk": { - "name": "invoice_items_invoice_id_invoices_id_fk", - "tableFrom": "invoice_items", - "tableTo": "invoices", - "columnsFrom": [ - "invoice_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoices": { - "name": "invoices", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "number": { - "name": "number", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'invoice'" - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'draft'" - }, - "issue_date": { - "name": "issue_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "due_date": { - "name": "due_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "notes": { - "name": "notes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "currency": { - "name": "currency", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'USD'" - }, - "subtotal": { - "name": "subtotal", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "discount_value": { - "name": "discount_value", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "discount_type": { - "name": "discount_type", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'percentage'" - }, - "discount_amount": { - "name": "discount_amount", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_rate": { - "name": "tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_amount": { - "name": "tax_amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "total": { - "name": "total", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "invoices_organization_id_idx": { - "name": "invoices_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "invoices_client_id_idx": { - "name": "invoices_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoices_organization_id_organizations_id_fk": { - "name": "invoices_organization_id_organizations_id_fk", - "tableFrom": "invoices", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "invoices_client_id_clients_id_fk": { - "name": "invoices_client_id_clients_id_fk", - "tableFrom": "invoices", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "members": { - "name": "members", - "columns": { - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'member'" - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "members_user_id_idx": { - "name": "members_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "members_organization_id_idx": { - "name": "members_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "members_user_id_users_id_fk": { - "name": "members_user_id_users_id_fk", - "tableFrom": "members", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "members_organization_id_organizations_id_fk": { - "name": "members_organization_id_organizations_id_fk", - "tableFrom": "members", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "members_user_id_organization_id_pk": { - "columns": [ - "user_id", - "organization_id" - ], - "name": "members_user_id_organization_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "organizations": { - "name": "organizations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "logo_url": { - "name": "logo_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passkey_challenges": { - "name": "passkey_challenges", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "challenge": { - "name": "challenge", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "passkey_challenges_challenge_unique": { - "name": "passkey_challenges_challenge_unique", - "columns": [ - "challenge" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passkeys": { - "name": "passkeys", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "counter": { - "name": "counter", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device_type": { - "name": "device_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "backed_up": { - "name": "backed_up", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "transports": { - "name": "transports", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "passkeys_user_id_idx": { - "name": "passkeys_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "passkeys_user_id_users_id_fk": { - "name": "passkeys_user_id_users_id_fk", - "tableFrom": "passkeys", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "sessions": { - "name": "sessions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "sessions_user_id_idx": { - "name": "sessions_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "site_settings": { - "name": "site_settings", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "site_settings_key_unique": { - "name": "site_settings_key_unique", - "columns": [ - "key" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tags": { - "name": "tags", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "tags_organization_id_idx": { - "name": "tags_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "tags_organization_id_organizations_id_fk": { - "name": "tags_organization_id_organizations_id_fk", - "tableFrom": "tags", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entries": { - "name": "time_entries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "start_time": { - "name": "start_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "end_time": { - "name": "end_time", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_manual": { - "name": "is_manual", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "time_entries_user_id_idx": { - "name": "time_entries_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "time_entries_organization_id_idx": { - "name": "time_entries_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "time_entries_client_id_idx": { - "name": "time_entries_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - }, - "time_entries_start_time_idx": { - "name": "time_entries_start_time_idx", - "columns": [ - "start_time" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entries_user_id_users_id_fk": { - "name": "time_entries_user_id_users_id_fk", - "tableFrom": "time_entries", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_organization_id_organizations_id_fk": { - "name": "time_entries_organization_id_organizations_id_fk", - "tableFrom": "time_entries", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_client_id_clients_id_fk": { - "name": "time_entries_client_id_clients_id_fk", - "tableFrom": "time_entries", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_category_id_categories_id_fk": { - "name": "time_entries_category_id_categories_id_fk", - "tableFrom": "time_entries", - "tableTo": "categories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entry_tags": { - "name": "time_entry_tags", - "columns": { - "time_entry_id": { - "name": "time_entry_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tag_id": { - "name": "tag_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "time_entry_tags_time_entry_id_idx": { - "name": "time_entry_tags_time_entry_id_idx", - "columns": [ - "time_entry_id" - ], - "isUnique": false - }, - "time_entry_tags_tag_id_idx": { - "name": "time_entry_tags_tag_id_idx", - "columns": [ - "tag_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entry_tags_time_entry_id_time_entries_id_fk": { - "name": "time_entry_tags_time_entry_id_time_entries_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "time_entries", - "columnsFrom": [ - "time_entry_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entry_tags_tag_id_tags_id_fk": { - "name": "time_entry_tags_tag_id_tags_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "tags", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "time_entry_tags_time_entry_id_tag_id_pk": { - "columns": [ - "time_entry_id", - "tag_id" - ], - "name": "time_entry_tags_time_entry_id_tag_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_site_admin": { - "name": "is_site_admin", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0005_snapshot.json b/drizzle/meta/0005_snapshot.json deleted file mode 100644 index d17359f..0000000 --- a/drizzle/meta/0005_snapshot.json +++ /dev/null @@ -1,1353 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "ab39405a-a606-451d-b41a-8cca25983f9d", - "prevId": "434e419c-a025-443d-95e1-6d1e22de2418", - "tables": { - "api_tokens": { - "name": "api_tokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'*'" - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "api_tokens_token_unique": { - "name": "api_tokens_token_unique", - "columns": [ - "token" - ], - "isUnique": true - }, - "api_tokens_user_id_idx": { - "name": "api_tokens_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "api_tokens_user_id_users_id_fk": { - "name": "api_tokens_user_id_users_id_fk", - "tableFrom": "api_tokens", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "categories": { - "name": "categories", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "categories_organization_id_idx": { - "name": "categories_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "categories_organization_id_organizations_id_fk": { - "name": "categories_organization_id_organizations_id_fk", - "tableFrom": "categories", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "clients": { - "name": "clients", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "phone": { - "name": "phone", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "clients_organization_id_idx": { - "name": "clients_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "clients_organization_id_organizations_id_fk": { - "name": "clients_organization_id_organizations_id_fk", - "tableFrom": "clients", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoice_items": { - "name": "invoice_items", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "quantity": { - "name": "quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "unit_price": { - "name": "unit_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "amount": { - "name": "amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - } - }, - "indexes": { - "invoice_items_invoice_id_idx": { - "name": "invoice_items_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoice_items_invoice_id_invoices_id_fk": { - "name": "invoice_items_invoice_id_invoices_id_fk", - "tableFrom": "invoice_items", - "tableTo": "invoices", - "columnsFrom": [ - "invoice_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoices": { - "name": "invoices", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "number": { - "name": "number", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'invoice'" - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'draft'" - }, - "issue_date": { - "name": "issue_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "due_date": { - "name": "due_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "notes": { - "name": "notes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "currency": { - "name": "currency", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'USD'" - }, - "subtotal": { - "name": "subtotal", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "discount_value": { - "name": "discount_value", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "discount_type": { - "name": "discount_type", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'percentage'" - }, - "discount_amount": { - "name": "discount_amount", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_rate": { - "name": "tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_amount": { - "name": "tax_amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "total": { - "name": "total", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "invoices_organization_id_idx": { - "name": "invoices_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "invoices_client_id_idx": { - "name": "invoices_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoices_organization_id_organizations_id_fk": { - "name": "invoices_organization_id_organizations_id_fk", - "tableFrom": "invoices", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "invoices_client_id_clients_id_fk": { - "name": "invoices_client_id_clients_id_fk", - "tableFrom": "invoices", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "members": { - "name": "members", - "columns": { - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'member'" - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "members_user_id_idx": { - "name": "members_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "members_organization_id_idx": { - "name": "members_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "members_user_id_users_id_fk": { - "name": "members_user_id_users_id_fk", - "tableFrom": "members", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "members_organization_id_organizations_id_fk": { - "name": "members_organization_id_organizations_id_fk", - "tableFrom": "members", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "members_user_id_organization_id_pk": { - "columns": [ - "user_id", - "organization_id" - ], - "name": "members_user_id_organization_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "organizations": { - "name": "organizations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "logo_url": { - "name": "logo_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "default_tax_rate": { - "name": "default_tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "default_currency": { - "name": "default_currency", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'USD'" - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passkey_challenges": { - "name": "passkey_challenges", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "challenge": { - "name": "challenge", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "passkey_challenges_challenge_unique": { - "name": "passkey_challenges_challenge_unique", - "columns": [ - "challenge" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passkeys": { - "name": "passkeys", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "counter": { - "name": "counter", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device_type": { - "name": "device_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "backed_up": { - "name": "backed_up", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "transports": { - "name": "transports", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "passkeys_user_id_idx": { - "name": "passkeys_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "passkeys_user_id_users_id_fk": { - "name": "passkeys_user_id_users_id_fk", - "tableFrom": "passkeys", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "sessions": { - "name": "sessions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "sessions_user_id_idx": { - "name": "sessions_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "site_settings": { - "name": "site_settings", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "site_settings_key_unique": { - "name": "site_settings_key_unique", - "columns": [ - "key" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tags": { - "name": "tags", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "rate": { - "name": "rate", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "tags_organization_id_idx": { - "name": "tags_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "tags_organization_id_organizations_id_fk": { - "name": "tags_organization_id_organizations_id_fk", - "tableFrom": "tags", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entries": { - "name": "time_entries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "category_id": { - "name": "category_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "start_time": { - "name": "start_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "end_time": { - "name": "end_time", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_manual": { - "name": "is_manual", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "time_entries_user_id_idx": { - "name": "time_entries_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "time_entries_organization_id_idx": { - "name": "time_entries_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "time_entries_client_id_idx": { - "name": "time_entries_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - }, - "time_entries_start_time_idx": { - "name": "time_entries_start_time_idx", - "columns": [ - "start_time" - ], - "isUnique": false - }, - "time_entries_invoice_id_idx": { - "name": "time_entries_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entries_user_id_users_id_fk": { - "name": "time_entries_user_id_users_id_fk", - "tableFrom": "time_entries", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_organization_id_organizations_id_fk": { - "name": "time_entries_organization_id_organizations_id_fk", - "tableFrom": "time_entries", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_client_id_clients_id_fk": { - "name": "time_entries_client_id_clients_id_fk", - "tableFrom": "time_entries", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_category_id_categories_id_fk": { - "name": "time_entries_category_id_categories_id_fk", - "tableFrom": "time_entries", - "tableTo": "categories", - "columnsFrom": [ - "category_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entry_tags": { - "name": "time_entry_tags", - "columns": { - "time_entry_id": { - "name": "time_entry_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tag_id": { - "name": "tag_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "time_entry_tags_time_entry_id_idx": { - "name": "time_entry_tags_time_entry_id_idx", - "columns": [ - "time_entry_id" - ], - "isUnique": false - }, - "time_entry_tags_tag_id_idx": { - "name": "time_entry_tags_tag_id_idx", - "columns": [ - "tag_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entry_tags_time_entry_id_time_entries_id_fk": { - "name": "time_entry_tags_time_entry_id_time_entries_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "time_entries", - "columnsFrom": [ - "time_entry_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entry_tags_tag_id_tags_id_fk": { - "name": "time_entry_tags_tag_id_tags_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "tags", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "time_entry_tags_time_entry_id_tag_id_pk": { - "columns": [ - "time_entry_id", - "tag_id" - ], - "name": "time_entry_tags_time_entry_id_tag_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_site_admin": { - "name": "is_site_admin", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0006_snapshot.json b/drizzle/meta/0006_snapshot.json deleted file mode 100644 index b103426..0000000 --- a/drizzle/meta/0006_snapshot.json +++ /dev/null @@ -1,1266 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "ce0dba35-7c48-46a5-acf1-436c46a6ffd2", - "prevId": "ab39405a-a606-451d-b41a-8cca25983f9d", - "tables": { - "api_tokens": { - "name": "api_tokens", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "token": { - "name": "token", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'*'" - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "api_tokens_token_unique": { - "name": "api_tokens_token_unique", - "columns": [ - "token" - ], - "isUnique": true - }, - "api_tokens_user_id_idx": { - "name": "api_tokens_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "api_tokens_user_id_users_id_fk": { - "name": "api_tokens_user_id_users_id_fk", - "tableFrom": "api_tokens", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "clients": { - "name": "clients", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "phone": { - "name": "phone", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "clients_organization_id_idx": { - "name": "clients_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "clients_organization_id_organizations_id_fk": { - "name": "clients_organization_id_organizations_id_fk", - "tableFrom": "clients", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoice_items": { - "name": "invoice_items", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "quantity": { - "name": "quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 1 - }, - "unit_price": { - "name": "unit_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "amount": { - "name": "amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - } - }, - "indexes": { - "invoice_items_invoice_id_idx": { - "name": "invoice_items_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoice_items_invoice_id_invoices_id_fk": { - "name": "invoice_items_invoice_id_invoices_id_fk", - "tableFrom": "invoice_items", - "tableTo": "invoices", - "columnsFrom": [ - "invoice_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "invoices": { - "name": "invoices", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "number": { - "name": "number", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'invoice'" - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'draft'" - }, - "issue_date": { - "name": "issue_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "due_date": { - "name": "due_date", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "notes": { - "name": "notes", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "currency": { - "name": "currency", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'USD'" - }, - "subtotal": { - "name": "subtotal", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "discount_value": { - "name": "discount_value", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "discount_type": { - "name": "discount_type", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'percentage'" - }, - "discount_amount": { - "name": "discount_amount", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_rate": { - "name": "tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "tax_amount": { - "name": "tax_amount", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "total": { - "name": "total", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "invoices_organization_id_idx": { - "name": "invoices_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "invoices_client_id_idx": { - "name": "invoices_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "invoices_organization_id_organizations_id_fk": { - "name": "invoices_organization_id_organizations_id_fk", - "tableFrom": "invoices", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "invoices_client_id_clients_id_fk": { - "name": "invoices_client_id_clients_id_fk", - "tableFrom": "invoices", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "members": { - "name": "members", - "columns": { - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'member'" - }, - "joined_at": { - "name": "joined_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "members_user_id_idx": { - "name": "members_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "members_organization_id_idx": { - "name": "members_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "members_user_id_users_id_fk": { - "name": "members_user_id_users_id_fk", - "tableFrom": "members", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "members_organization_id_organizations_id_fk": { - "name": "members_organization_id_organizations_id_fk", - "tableFrom": "members", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "members_user_id_organization_id_pk": { - "columns": [ - "user_id", - "organization_id" - ], - "name": "members_user_id_organization_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "organizations": { - "name": "organizations", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "logo_url": { - "name": "logo_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "street": { - "name": "street", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "city": { - "name": "city", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "state": { - "name": "state", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "zip": { - "name": "zip", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country": { - "name": "country", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "default_tax_rate": { - "name": "default_tax_rate", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "default_currency": { - "name": "default_currency", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'USD'" - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passkey_challenges": { - "name": "passkey_challenges", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "challenge": { - "name": "challenge", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "passkey_challenges_challenge_unique": { - "name": "passkey_challenges_challenge_unique", - "columns": [ - "challenge" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "passkeys": { - "name": "passkeys", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "counter": { - "name": "counter", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "device_type": { - "name": "device_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "backed_up": { - "name": "backed_up", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "transports": { - "name": "transports", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "last_used_at": { - "name": "last_used_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "passkeys_user_id_idx": { - "name": "passkeys_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "passkeys_user_id_users_id_fk": { - "name": "passkeys_user_id_users_id_fk", - "tableFrom": "passkeys", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "sessions": { - "name": "sessions", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "expires_at": { - "name": "expires_at", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "sessions_user_id_idx": { - "name": "sessions_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "site_settings": { - "name": "site_settings", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "key": { - "name": "key", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updated_at": { - "name": "updated_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "site_settings_key_unique": { - "name": "site_settings_key_unique", - "columns": [ - "key" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tags": { - "name": "tags", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "color": { - "name": "color", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "rate": { - "name": "rate", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "tags_organization_id_idx": { - "name": "tags_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "tags_organization_id_organizations_id_fk": { - "name": "tags_organization_id_organizations_id_fk", - "tableFrom": "tags", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entries": { - "name": "time_entries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "user_id": { - "name": "user_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "organization_id": { - "name": "organization_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "start_time": { - "name": "start_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "end_time": { - "name": "end_time", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "invoice_id": { - "name": "invoice_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "is_manual": { - "name": "is_manual", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "time_entries_user_id_idx": { - "name": "time_entries_user_id_idx", - "columns": [ - "user_id" - ], - "isUnique": false - }, - "time_entries_organization_id_idx": { - "name": "time_entries_organization_id_idx", - "columns": [ - "organization_id" - ], - "isUnique": false - }, - "time_entries_client_id_idx": { - "name": "time_entries_client_id_idx", - "columns": [ - "client_id" - ], - "isUnique": false - }, - "time_entries_start_time_idx": { - "name": "time_entries_start_time_idx", - "columns": [ - "start_time" - ], - "isUnique": false - }, - "time_entries_invoice_id_idx": { - "name": "time_entries_invoice_id_idx", - "columns": [ - "invoice_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entries_user_id_users_id_fk": { - "name": "time_entries_user_id_users_id_fk", - "tableFrom": "time_entries", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_organization_id_organizations_id_fk": { - "name": "time_entries_organization_id_organizations_id_fk", - "tableFrom": "time_entries", - "tableTo": "organizations", - "columnsFrom": [ - "organization_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entries_client_id_clients_id_fk": { - "name": "time_entries_client_id_clients_id_fk", - "tableFrom": "time_entries", - "tableTo": "clients", - "columnsFrom": [ - "client_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "time_entry_tags": { - "name": "time_entry_tags", - "columns": { - "time_entry_id": { - "name": "time_entry_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tag_id": { - "name": "tag_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "time_entry_tags_time_entry_id_idx": { - "name": "time_entry_tags_time_entry_id_idx", - "columns": [ - "time_entry_id" - ], - "isUnique": false - }, - "time_entry_tags_tag_id_idx": { - "name": "time_entry_tags_tag_id_idx", - "columns": [ - "tag_id" - ], - "isUnique": false - } - }, - "foreignKeys": { - "time_entry_tags_time_entry_id_time_entries_id_fk": { - "name": "time_entry_tags_time_entry_id_time_entries_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "time_entries", - "columnsFrom": [ - "time_entry_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "time_entry_tags_tag_id_tags_id_fk": { - "name": "time_entry_tags_tag_id_tags_id_fk", - "tableFrom": "time_entry_tags", - "tableTo": "tags", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "time_entry_tags_time_entry_id_tag_id_pk": { - "columns": [ - "time_entry_id", - "tag_id" - ], - "name": "time_entry_tags_time_entry_id_tag_id_pk" - } - }, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "users": { - "name": "users", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "password_hash": { - "name": "password_hash", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "is_site_admin": { - "name": "is_site_admin", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "users_email_unique": { - "name": "users_email_unique", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index ae7bc1c..eb036fd 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -5,50 +5,8 @@ { "idx": 0, "version": "6", - "when": 1768688193284, - "tag": "0000_motionless_king_cobra", - "breakpoints": true - }, - { - "idx": 1, - "version": "6", - "when": 1768690333269, - "tag": "0001_lazy_roughhouse", - "breakpoints": true - }, - { - "idx": 2, - "version": "6", - "when": 1768773436601, - "tag": "0002_chilly_cyclops", - "breakpoints": true - }, - { - "idx": 3, - "version": "6", - "when": 1768842088321, - "tag": "0003_amusing_wendigo", - "breakpoints": true - }, - { - "idx": 4, - "version": "6", - "when": 1768876902359, - "tag": "0004_happy_namorita", - "breakpoints": true - }, - { - "idx": 5, - "version": "6", - "when": 1768931251965, - "tag": "0005_fair_skreet", - "breakpoints": true - }, - { - "idx": 6, - "version": "6", - "when": 1768932542464, - "tag": "0006_good_malcolm_colcord", + "when": 1768934194146, + "tag": "0000_lazy_rictor", "breakpoints": true } ]