- Menu items can now list allergens (shared catalog + join table), shown on the menu grid and item detail pages when applicable, and editable from the admin menu item form. - Removed the top-nav "Help" link now that the footer links to it. - The item customization page's price now uses the sliding AnimatedNumber, matching the basket line price. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
15 lines
972 B
SQL
15 lines
972 B
SQL
CREATE TABLE "allergens" (
|
|
"id" serial PRIMARY KEY NOT NULL,
|
|
"name" text NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "menu_item_allergens" (
|
|
"id" serial PRIMARY KEY NOT NULL,
|
|
"menu_item_id" integer NOT NULL,
|
|
"allergen_id" integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "menu_item_allergens" ADD CONSTRAINT "menu_item_allergens_menu_item_id_menu_items_id_fk" FOREIGN KEY ("menu_item_id") REFERENCES "public"."menu_items"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "menu_item_allergens" ADD CONSTRAINT "menu_item_allergens_allergen_id_allergens_id_fk" FOREIGN KEY ("allergen_id") REFERENCES "public"."allergens"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "allergens_name_idx" ON "allergens" USING btree ("name");--> statement-breakpoint
|
|
CREATE UNIQUE INDEX "menu_item_allergens_item_allergen_idx" ON "menu_item_allergens" USING btree ("menu_item_id","allergen_id"); |