···11-CREATE TABLE `auth_session` (
22- `key` text PRIMARY KEY NOT NULL,
33- `session` text NOT NULL
44-);
55---> statement-breakpoint
66-CREATE TABLE `auth_state` (
77- `key` text PRIMARY KEY NOT NULL,
88- `state` text NOT NULL
99-);
1010---> statement-breakpoint
1111-CREATE TABLE `recipes` (
1212- `uri` text GENERATED ALWAYS AS ("author_did" || '/' || "rkey") VIRTUAL,
1313- `id` integer PRIMARY KEY NOT NULL,
1414- `rkey` text NOT NULL,
1515- `image_ref` text,
1616- `title` text NOT NULL,
1717- `time` integer DEFAULT 0 NOT NULL,
1818- `serves` integer,
1919- `description` text,
2020- `ingredients` text NOT NULL,
2121- `ingredients_count` integer GENERATED ALWAYS AS (json_array_length("ingredients")) VIRTUAL,
2222- `steps` text NOT NULL,
2323- `steps_count` integer GENERATED ALWAYS AS (json_array_length("steps")) VIRTUAL,
2424- `created_at` text NOT NULL,
2525- `author_did` text NOT NULL
2626-);
2727---> statement-breakpoint
2828-CREATE UNIQUE INDEX `recipes_id_unique` ON `recipes` (`id`);--> statement-breakpoint
2929-CREATE UNIQUE INDEX `unique_author_rkey` ON `recipes` (`rkey`,`author_did`);
+16
libs/database/migrations/0000_kind_ultron.sql
···11+CREATE TABLE `recipes` (
22+ `uri` text GENERATED ALWAYS AS ("author_did" || '/' || "rkey") VIRTUAL,
33+ `author_did` text NOT NULL,
44+ `rkey` text NOT NULL,
55+ `image_ref` text,
66+ `title` text NOT NULL,
77+ `time` integer DEFAULT 0 NOT NULL,
88+ `serves` integer,
99+ `description` text,
1010+ `ingredients` text NOT NULL,
1111+ `ingredients_count` integer GENERATED ALWAYS AS (json_array_length("ingredients")) VIRTUAL,
1212+ `steps` text NOT NULL,
1313+ `steps_count` integer GENERATED ALWAYS AS (json_array_length("steps")) VIRTUAL,
1414+ `created_at` text NOT NULL,
1515+ PRIMARY KEY(`author_did`, `rkey`)
1616+);