ALTER TABLE "comments" ADD CONSTRAINT "comments_parent_id_comments_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."comments"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "recipe_ingredients_recipe_idx" ON "recipe_ingredients" USING btree ("recipe_id");--> statement-breakpoint
CREATE INDEX "recipe_steps_recipe_idx" ON "recipe_steps" USING btree ("recipe_id");--> statement-breakpoint
CREATE INDEX "meal_plan_entries_plan_idx" ON "meal_plan_entries" USING btree ("meal_plan_id");--> statement-breakpoint
CREATE UNIQUE INDEX "meal_plan_entries_plan_day_meal_idx" ON "meal_plan_entries" USING btree ("meal_plan_id","day","meal_type");--> statement-breakpoint
CREATE INDEX "meal_plans_user_idx" ON "meal_plans" USING btree ("user_id");--> statement-breakpoint
CREATE UNIQUE INDEX "meal_plans_user_week_idx" ON "meal_plans" USING btree ("user_id","week_start");--> statement-breakpoint
CREATE INDEX "pantry_items_user_idx" ON "pantry_items" USING btree ("user_id");