2024-04-16 19:06:23 -04:00
|
|
|
CREATE TABLE `sandbox` (
|
|
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
|
|
`name` text NOT NULL,
|
2024-04-23 01:53:37 -04:00
|
|
|
`type` text NOT NULL,
|
|
|
|
`bucket` text,
|
|
|
|
`init` integer DEFAULT false,
|
2024-04-16 19:06:23 -04:00
|
|
|
`user_id` text NOT NULL,
|
|
|
|
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
|
|
|
|
);
|
|
|
|
--> statement-breakpoint
|
|
|
|
CREATE TABLE `user` (
|
|
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
|
|
`name` text NOT NULL,
|
|
|
|
`email` text NOT NULL
|
|
|
|
);
|
|
|
|
--> statement-breakpoint
|
|
|
|
CREATE UNIQUE INDEX `sandbox_id_unique` ON `sandbox` (`id`);--> statement-breakpoint
|
|
|
|
CREATE UNIQUE INDEX `user_id_unique` ON `user` (`id`);
|