feat(29-01): generate migration for image presentation fields
Migration adds dominant_color, crop_zoom, crop_x, crop_y to items, global_items, and thread_candidates. Run db:push to apply. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
28
drizzle-pg/0004_smiling_night_nurse.sql
Normal file
28
drizzle-pg/0004_smiling_night_nurse.sql
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
CREATE TABLE "global_item_tags" (
|
||||||
|
"global_item_id" integer NOT NULL,
|
||||||
|
"tag_id" integer NOT NULL,
|
||||||
|
CONSTRAINT "global_item_tags_global_item_id_tag_id_pk" PRIMARY KEY("global_item_id","tag_id")
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "source_url" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "image_credit" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "image_source_url" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "dominant_color" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "crop_zoom" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "crop_x" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD COLUMN "crop_y" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "items" ADD COLUMN "dominant_color" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "items" ADD COLUMN "crop_zoom" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "items" ADD COLUMN "crop_x" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "items" ADD COLUMN "crop_y" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "oauth_codes" ADD COLUMN "user_id" integer NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "thread_candidates" ADD COLUMN "dominant_color" text;--> statement-breakpoint
|
||||||
|
ALTER TABLE "thread_candidates" ADD COLUMN "crop_zoom" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "thread_candidates" ADD COLUMN "crop_x" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "thread_candidates" ADD COLUMN "crop_y" double precision;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_item_tags" ADD CONSTRAINT "global_item_tags_global_item_id_global_items_id_fk" FOREIGN KEY ("global_item_id") REFERENCES "public"."global_items"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_item_tags" ADD CONSTRAINT "global_item_tags_tag_id_tags_id_fk" FOREIGN KEY ("tag_id") REFERENCES "public"."tags"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "items" ADD CONSTRAINT "items_global_item_id_global_items_id_fk" FOREIGN KEY ("global_item_id") REFERENCES "public"."global_items"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "oauth_codes" ADD CONSTRAINT "oauth_codes_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "thread_candidates" ADD CONSTRAINT "thread_candidates_global_item_id_global_items_id_fk" FOREIGN KEY ("global_item_id") REFERENCES "public"."global_items"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "global_items" ADD CONSTRAINT "global_items_brand_model_unique" UNIQUE("brand","model");
|
||||||
1296
drizzle-pg/meta/0004_snapshot.json
Normal file
1296
drizzle-pg/meta/0004_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,13 @@
|
|||||||
"when": 1775811339957,
|
"when": 1775811339957,
|
||||||
"tag": "0003_loving_serpent_society",
|
"tag": "0003_loving_serpent_society",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 4,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1776016552627,
|
||||||
|
"tag": "0004_smiling_night_nurse",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user