feat: create saved filters table

This commit is contained in:
2026-04-30 19:16:45 +08:00
parent 4c0284ef9e
commit 4cfd046953
6 changed files with 4138 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE "saved_filters" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"name" text NOT NULL,
"filters" jsonb NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "saved_filters_user_name" UNIQUE("user_id","name")
);
--> statement-breakpoint
ALTER TABLE "saved_filters" ADD CONSTRAINT "saved_filters_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14
View File
@@ -141,6 +141,20 @@
"when": 1777547264277,
"tag": "0019_tiresome_genesis",
"breakpoints": true
},
{
"idx": 20,
"version": "7",
"when": 1777547665970,
"tag": "0020_flaky_lilith",
"breakpoints": true
},
{
"idx": 21,
"version": "7",
"when": 1777547793864,
"tag": "0021_demonic_texas_twister",
"breakpoints": true
}
]
}