mirror of
https://github.com/hazemKrimi/crimson-vault.git
synced 2026-05-01 18:20:27 +00:00
wip: versioned migrations using atlas
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
-- Create "clients" table
|
||||
CREATE TABLE `clients` (
|
||||
`id` varchar NULL,
|
||||
`user_id` varchar NULL,
|
||||
`created_at` datetime NULL,
|
||||
`updated_at` datetime NULL,
|
||||
`deleted_at` datetime NULL,
|
||||
`name` text NULL,
|
||||
`fiscal_code` text NULL,
|
||||
`address` text NULL,
|
||||
`zip` text NULL,
|
||||
`country` text NULL,
|
||||
`phone` text NULL,
|
||||
`email` text NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_users_clients` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE
|
||||
);
|
||||
-- Create index "idx_clients_deleted_at" to table: "clients"
|
||||
CREATE INDEX `idx_clients_deleted_at` ON `clients` (`deleted_at`);
|
||||
-- Create "users" table
|
||||
CREATE TABLE `users` (
|
||||
`id` varchar NULL,
|
||||
`session_id` text NULL,
|
||||
`created_at` datetime NULL,
|
||||
`updated_at` datetime NULL,
|
||||
`deleted_at` datetime NULL,
|
||||
`logo` text NULL,
|
||||
`name` text NULL,
|
||||
`fiscal_code` text NULL,
|
||||
`address` text NULL,
|
||||
`zip` text NULL,
|
||||
`country` text NULL,
|
||||
`phone` text NULL,
|
||||
`email` text NULL,
|
||||
`username` text NULL,
|
||||
`password` text NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
-- Create index "users_username" to table: "users"
|
||||
CREATE UNIQUE INDEX `users_username` ON `users` (`username`);
|
||||
-- Create index "idx_users_deleted_at" to table: "users"
|
||||
CREATE INDEX `idx_users_deleted_at` ON `users` (`deleted_at`);
|
||||
@@ -0,0 +1,2 @@
|
||||
h1:2049NzfhHw8DDKsmQejeOcETj2pojlv5sA+O/QhmtG0=
|
||||
20250611102124.sql h1:HkDgtWXUxfAR9gIObTMzP98pVEIakerASGGSufW695k=
|
||||
Reference in New Issue
Block a user