The widget_secret table was defined in all three Drizzle schema files but no SQL migration was ever generated to create it, causing setSecret to fail with 'no such table: widget_secret' in production (drizzle-kit push in development hid the problem). - Add migration SQL for sqlite (0040), mysql (0042), postgresql (0008) - Update journal entries for all three dialects - Add onError handlers to setSecret/deleteSecret mutations so errors are shown as red notifications instead of silently swallowed Fixes #6186
10 lines
428 B
SQL
10 lines
428 B
SQL
CREATE TABLE "widget_secret" (
|
|
"item_id" varchar(64) NOT NULL,
|
|
"kind" varchar(64) NOT NULL,
|
|
"value" text NOT NULL,
|
|
"updated_at" timestamp NOT NULL,
|
|
CONSTRAINT "widget_secret_item_id_kind_pk" PRIMARY KEY("item_id","kind")
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "widget_secret" ADD CONSTRAINT "widget_secret_item_id_item_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."item"("id") ON DELETE cascade ON UPDATE no action;
|