From 4478d51aaee7ecd0753373b0fcd017ca07560e83 Mon Sep 17 00:00:00 2001 From: Asep Haryana Saputra <90584806+MythEclipse@users.noreply.github.com> Date: Fri, 22 May 2026 17:19:46 +0000 Subject: [PATCH] feat: add production MVP database migration --- apps/api/drizzle/0002_lumpy_smasher.sql | 111 +++ apps/api/drizzle/meta/0002_snapshot.json | 840 +++++++++++++++++++++++ apps/api/drizzle/meta/_journal.json | 7 + 3 files changed, 958 insertions(+) create mode 100644 apps/api/drizzle/0002_lumpy_smasher.sql create mode 100644 apps/api/drizzle/meta/0002_snapshot.json diff --git a/apps/api/drizzle/0002_lumpy_smasher.sql b/apps/api/drizzle/0002_lumpy_smasher.sql new file mode 100644 index 0000000..5f6b6a9 --- /dev/null +++ b/apps/api/drizzle/0002_lumpy_smasher.sql @@ -0,0 +1,111 @@ +CREATE TABLE IF NOT EXISTS "diagnoses" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" uuid NOT NULL, + "predicted_disease_slug" varchar(80), + "confidence" real, + "status" varchar(40) NOT NULL, + "failure_reason" text, + "image_url" text NOT NULL, + "uploader_public_id" varchar(160) NOT NULL, + "image_file_name" varchar(240) NOT NULL, + "image_mime_type" varchar(120) NOT NULL, + "image_size_bytes" integer NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "diagnosis_predictions" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "diagnosis_id" uuid NOT NULL, + "disease_slug" varchar(80), + "model_label" varchar(120) NOT NULL, + "confidence" real NOT NULL, + "rank" integer NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "expert_reviews" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "diagnosis_id" uuid NOT NULL, + "expert_id" uuid NOT NULL, + "verdict" varchar(20) NOT NULL, + "corrected_disease_slug" varchar(80), + "notes" text NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "sessions" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" uuid NOT NULL, + "token_hash" text NOT NULL, + "expires_at" timestamp with time zone NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "users" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "email" varchar(240) NOT NULL, + "name" varchar(160) NOT NULL, + "password_hash" text, + "role" varchar(20) DEFAULT 'user' NOT NULL, + "google_id" varchar(240), + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "diagnoses" ADD CONSTRAINT "diagnoses_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "diagnoses" ADD CONSTRAINT "diagnoses_predicted_disease_slug_disease_catalog_slug_fk" FOREIGN KEY ("predicted_disease_slug") REFERENCES "public"."disease_catalog"("slug") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "diagnosis_predictions" ADD CONSTRAINT "diagnosis_predictions_diagnosis_id_diagnoses_id_fk" FOREIGN KEY ("diagnosis_id") REFERENCES "public"."diagnoses"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "diagnosis_predictions" ADD CONSTRAINT "diagnosis_predictions_disease_slug_disease_catalog_slug_fk" FOREIGN KEY ("disease_slug") REFERENCES "public"."disease_catalog"("slug") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "expert_reviews" ADD CONSTRAINT "expert_reviews_diagnosis_id_diagnoses_id_fk" FOREIGN KEY ("diagnosis_id") REFERENCES "public"."diagnoses"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "expert_reviews" ADD CONSTRAINT "expert_reviews_expert_id_users_id_fk" FOREIGN KEY ("expert_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "expert_reviews" ADD CONSTRAINT "expert_reviews_corrected_disease_slug_disease_catalog_slug_fk" FOREIGN KEY ("corrected_disease_slug") REFERENCES "public"."disease_catalog"("slug") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "diagnoses_user_id_idx" ON "diagnoses" USING btree ("user_id");--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "diagnoses_status_idx" ON "diagnoses" USING btree ("status");--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "diagnosis_predictions_diagnosis_id_idx" ON "diagnosis_predictions" USING btree ("diagnosis_id");--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "expert_reviews_diagnosis_id_idx" ON "expert_reviews" USING btree ("diagnosis_id");--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "expert_reviews_expert_id_idx" ON "expert_reviews" USING btree ("expert_id");--> statement-breakpoint +CREATE UNIQUE INDEX IF NOT EXISTS "sessions_token_hash_idx" ON "sessions" USING btree ("token_hash");--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "sessions_user_id_idx" ON "sessions" USING btree ("user_id");--> statement-breakpoint +CREATE UNIQUE INDEX IF NOT EXISTS "users_email_idx" ON "users" USING btree ("email");--> statement-breakpoint +CREATE UNIQUE INDEX IF NOT EXISTS "users_google_id_idx" ON "users" USING btree ("google_id"); \ No newline at end of file diff --git a/apps/api/drizzle/meta/0002_snapshot.json b/apps/api/drizzle/meta/0002_snapshot.json new file mode 100644 index 0000000..3ca4325 --- /dev/null +++ b/apps/api/drizzle/meta/0002_snapshot.json @@ -0,0 +1,840 @@ +{ + "id": "da5776ab-55b4-4aa6-85da-61db5fc31546", + "prevId": "16700e2c-ff8f-4864-a71a-6f4b98a1313a", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.app_events": { + "name": "app_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(120)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.diagnoses": { + "name": "diagnoses", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "predicted_disease_slug": { + "name": "predicted_disease_slug", + "type": "varchar(80)", + "primaryKey": false, + "notNull": false + }, + "confidence": { + "name": "confidence", + "type": "real", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(40)", + "primaryKey": false, + "notNull": true + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uploader_public_id": { + "name": "uploader_public_id", + "type": "varchar(160)", + "primaryKey": false, + "notNull": true + }, + "image_file_name": { + "name": "image_file_name", + "type": "varchar(240)", + "primaryKey": false, + "notNull": true + }, + "image_mime_type": { + "name": "image_mime_type", + "type": "varchar(120)", + "primaryKey": false, + "notNull": true + }, + "image_size_bytes": { + "name": "image_size_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "diagnoses_user_id_idx": { + "name": "diagnoses_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "diagnoses_status_idx": { + "name": "diagnoses_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "diagnoses_user_id_users_id_fk": { + "name": "diagnoses_user_id_users_id_fk", + "tableFrom": "diagnoses", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "diagnoses_predicted_disease_slug_disease_catalog_slug_fk": { + "name": "diagnoses_predicted_disease_slug_disease_catalog_slug_fk", + "tableFrom": "diagnoses", + "tableTo": "disease_catalog", + "columnsFrom": [ + "predicted_disease_slug" + ], + "columnsTo": [ + "slug" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.diagnosis_predictions": { + "name": "diagnosis_predictions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "diagnosis_id": { + "name": "diagnosis_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "disease_slug": { + "name": "disease_slug", + "type": "varchar(80)", + "primaryKey": false, + "notNull": false + }, + "model_label": { + "name": "model_label", + "type": "varchar(120)", + "primaryKey": false, + "notNull": true + }, + "confidence": { + "name": "confidence", + "type": "real", + "primaryKey": false, + "notNull": true + }, + "rank": { + "name": "rank", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "diagnosis_predictions_diagnosis_id_idx": { + "name": "diagnosis_predictions_diagnosis_id_idx", + "columns": [ + { + "expression": "diagnosis_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "diagnosis_predictions_diagnosis_id_diagnoses_id_fk": { + "name": "diagnosis_predictions_diagnosis_id_diagnoses_id_fk", + "tableFrom": "diagnosis_predictions", + "tableTo": "diagnoses", + "columnsFrom": [ + "diagnosis_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "diagnosis_predictions_disease_slug_disease_catalog_slug_fk": { + "name": "diagnosis_predictions_disease_slug_disease_catalog_slug_fk", + "tableFrom": "diagnosis_predictions", + "tableTo": "disease_catalog", + "columnsFrom": [ + "disease_slug" + ], + "columnsTo": [ + "slug" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.disease_catalog": { + "name": "disease_catalog", + "schema": "", + "columns": { + "slug": { + "name": "slug", + "type": "varchar(80)", + "primaryKey": true, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(80)", + "primaryKey": false, + "notNull": true + }, + "common_name": { + "name": "common_name", + "type": "varchar(120)", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "symptoms": { + "name": "symptoms", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "recommendations": { + "name": "recommendations", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "risk_level": { + "name": "risk_level", + "type": "varchar(20)", + "primaryKey": false, + "notNull": true + }, + "accent_color": { + "name": "accent_color", + "type": "varchar(40)", + "primaryKey": false, + "notNull": true + }, + "display_order": { + "name": "display_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.expert_reviews": { + "name": "expert_reviews", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "diagnosis_id": { + "name": "diagnosis_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "expert_id": { + "name": "expert_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "verdict": { + "name": "verdict", + "type": "varchar(20)", + "primaryKey": false, + "notNull": true + }, + "corrected_disease_slug": { + "name": "corrected_disease_slug", + "type": "varchar(80)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "expert_reviews_diagnosis_id_idx": { + "name": "expert_reviews_diagnosis_id_idx", + "columns": [ + { + "expression": "diagnosis_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "expert_reviews_expert_id_idx": { + "name": "expert_reviews_expert_id_idx", + "columns": [ + { + "expression": "expert_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "expert_reviews_diagnosis_id_diagnoses_id_fk": { + "name": "expert_reviews_diagnosis_id_diagnoses_id_fk", + "tableFrom": "expert_reviews", + "tableTo": "diagnoses", + "columnsFrom": [ + "diagnosis_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "expert_reviews_expert_id_users_id_fk": { + "name": "expert_reviews_expert_id_users_id_fk", + "tableFrom": "expert_reviews", + "tableTo": "users", + "columnsFrom": [ + "expert_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "expert_reviews_corrected_disease_slug_disease_catalog_slug_fk": { + "name": "expert_reviews_corrected_disease_slug_disease_catalog_slug_fk", + "tableFrom": "expert_reviews", + "tableTo": "disease_catalog", + "columnsFrom": [ + "corrected_disease_slug" + ], + "columnsTo": [ + "slug" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.image_classifications": { + "name": "image_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "predicted_disease_slug": { + "name": "predicted_disease_slug", + "type": "varchar(80)", + "primaryKey": false, + "notNull": true + }, + "confidence": { + "name": "confidence", + "type": "real", + "primaryKey": false, + "notNull": true + }, + "probabilities": { + "name": "probabilities", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_url": { + "name": "image_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "original_file_name": { + "name": "original_file_name", + "type": "varchar(240)", + "primaryKey": false, + "notNull": true + }, + "uploader_public_id": { + "name": "uploader_public_id", + "type": "varchar(160)", + "primaryKey": false, + "notNull": true + }, + "uploader_payload": { + "name": "uploader_payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "image_classifications_predicted_disease_slug_disease_catalog_slug_fk": { + "name": "image_classifications_predicted_disease_slug_disease_catalog_slug_fk", + "tableFrom": "image_classifications", + "tableTo": "disease_catalog", + "columnsFrom": [ + "predicted_disease_slug" + ], + "columnsTo": [ + "slug" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.manual_classifications": { + "name": "manual_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "disease_slug": { + "name": "disease_slug", + "type": "varchar(80)", + "primaryKey": false, + "notNull": true + }, + "observation": { + "name": "observation", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "location": { + "name": "location", + "type": "varchar(160)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "manual_classifications_disease_slug_disease_catalog_slug_fk": { + "name": "manual_classifications_disease_slug_disease_catalog_slug_fk", + "tableFrom": "manual_classifications", + "tableTo": "disease_catalog", + "columnsFrom": [ + "disease_slug" + ], + "columnsTo": [ + "slug" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sessions_token_hash_idx": { + "name": "sessions_token_hash_idx", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sessions_user_id_idx": { + "name": "sessions_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "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": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "email": { + "name": "email", + "type": "varchar(240)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(160)", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "varchar(20)", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "google_id": { + "name": "google_id", + "type": "varchar(240)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "users_email_idx": { + "name": "users_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_google_id_idx": { + "name": "users_google_id_idx", + "columns": [ + { + "expression": "google_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/api/drizzle/meta/_journal.json b/apps/api/drizzle/meta/_journal.json index a492b03..63d0d65 100644 --- a/apps/api/drizzle/meta/_journal.json +++ b/apps/api/drizzle/meta/_journal.json @@ -15,6 +15,13 @@ "when": 1779461286348, "tag": "0001_cute_lyja", "breakpoints": true + }, + { + "idx": 2, + "version": "7", + "when": 1779470332261, + "tag": "0002_lumpy_smasher", + "breakpoints": true } ] } \ No newline at end of file