···11+ALTER TABLE `recipes` RENAME COLUMN "image_ref" TO "image";--> statement-breakpoint
22+CREATE TABLE `profiles` (
33+ `uri` text GENERATED ALWAYS AS ('at://' || "did" || '/?/self') VIRTUAL,
44+ `did` text PRIMARY KEY NOT NULL,
55+ `ingested_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
66+ `display_name` text(640) NOT NULL,
77+ `description` text(2500),
88+ `pronouns` text(200),
99+ `website` text,
1010+ `avatar` text,
1111+ `banner` text,
1212+ `created_at` text NOT NULL
1313+);
1414+--> statement-breakpoint
1515+CREATE INDEX `profiles_cat_idx` ON `profiles` (`created_at`);--> statement-breakpoint
1616+CREATE INDEX `profiles_iat_idx` ON `profiles` (`ingested_at`);--> statement-breakpoint
1717+ALTER TABLE `recipes` DROP COLUMN `uri`;--> statement-breakpoint
1818+ALTER TABLE `recipes` ADD `uri` text GENERATED ALWAYS AS ('at://' || "author_did" || '/?/' || "rkey") VIRTUAL;--> statement-breakpoint
1919+ALTER TABLE `recipes` ADD `ingested_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL;--> statement-breakpoint
2020+CREATE INDEX `recipes_title_idx` ON `recipes` (`title`);--> statement-breakpoint
2121+CREATE INDEX `recipes_cat_idx` ON `recipes` (`created_at`);--> statement-breakpoint
2222+CREATE INDEX `recipes_iat_idx` ON `recipes` (`ingested_at`);--> statement-breakpoint
2323+ALTER TABLE `recipes` ALTER COLUMN "author_did" TO "author_did" text NOT NULL REFERENCES profiles(did) ON DELETE cascade ON UPDATE no action;