From 7809ccbba56be8c5377f94cf2d287a0e1521fdc1 Mon Sep 17 00:00:00 2001 From: Alberto Duarte Delgado Date: Wed, 25 Mar 2026 15:32:20 +0000 Subject: Initial commit: App Oficina base project --- drizzle/0001_brief_mandrill.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 drizzle/0001_brief_mandrill.sql (limited to 'drizzle/0001_brief_mandrill.sql') diff --git a/drizzle/0001_brief_mandrill.sql b/drizzle/0001_brief_mandrill.sql new file mode 100644 index 0000000..0866313 --- /dev/null +++ b/drizzle/0001_brief_mandrill.sql @@ -0,0 +1,16 @@ +CREATE TABLE `categorias` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `nombre` text NOT NULL +); +--> statement-breakpoint +CREATE UNIQUE INDEX `categorias_nombre_unique` ON `categorias` (`nombre`);--> statement-breakpoint +CREATE TABLE `productos` ( + `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, + `nombre` text NOT NULL, + `stock` integer, + `precio` real, + `categoria_id` integer, + FOREIGN KEY (`categoria_id`) REFERENCES `categorias`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `productos_nombre_unique` ON `productos` (`nombre`); \ No newline at end of file -- cgit v1.2.3-54-g00ecf