From b864e387895e86fb56d9faa90370b3de003bfaf3 Mon Sep 17 00:00:00 2001 From: noamcattan Date: Tue, 19 Mar 2024 14:35:07 +0200 Subject: [PATCH] schema changes --- dirs/ecommerce/migrations/20240319115808_user_is_admin.sql | 2 ++ dirs/ecommerce/migrations/atlas.sum | 3 ++- projects/estore/inventory/migrations/20240319121112.sql | 2 ++ projects/estore/inventory/migrations/atlas.sum | 3 ++- projects/estore/inventory/schema.hcl | 5 ----- 5 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 dirs/ecommerce/migrations/20240319115808_user_is_admin.sql create mode 100644 projects/estore/inventory/migrations/20240319121112.sql diff --git a/dirs/ecommerce/migrations/20240319115808_user_is_admin.sql b/dirs/ecommerce/migrations/20240319115808_user_is_admin.sql new file mode 100644 index 0000000..cfd3f93 --- /dev/null +++ b/dirs/ecommerce/migrations/20240319115808_user_is_admin.sql @@ -0,0 +1,2 @@ +-- Modify "users" table +ALTER TABLE `users` ADD COLUMN `is_admin` bool NULL DEFAULT 0; diff --git a/dirs/ecommerce/migrations/atlas.sum b/dirs/ecommerce/migrations/atlas.sum index 77a6819..4e06e34 100644 --- a/dirs/ecommerce/migrations/atlas.sum +++ b/dirs/ecommerce/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:lLffNdyf0kFcOXtLQf0/xe1dI12l1Su3r/7i0AV1jwU= +h1:jNBWmTKllvO8Z2dWvwhVXU+3o8d3Gk565vv/a7TYdFo= 20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo= 20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY= 20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA= @@ -10,3 +10,4 @@ h1:lLffNdyf0kFcOXtLQf0/xe1dI12l1Su3r/7i0AV1jwU= 20230531114433_seed_inventory.sql h1:jer7nlqTkkh435CE+LcQhdV6V/KQOVvNnP9/vKVG6KU= 20230531121807_orders.sql h1:RgIzinZdFrWrVCtrqQec/dJQ75tFQaOe+XLAHV5KzYM= 20230906125835_checkpoint.sql h1:jQaO4R0sJQ0ZOPp4Pp7pR2rQ1Cix9gaEaIt2qDomGWQ= +20240319115808_user_is_admin.sql h1:2DLidS3V0AKs8NqPAIUOlJjOUiUvVYPP0stOFSw6gS8= diff --git a/projects/estore/inventory/migrations/20240319121112.sql b/projects/estore/inventory/migrations/20240319121112.sql new file mode 100644 index 0000000..8f8d940 --- /dev/null +++ b/projects/estore/inventory/migrations/20240319121112.sql @@ -0,0 +1,2 @@ +-- Modify "products" table +ALTER TABLE `products` DROP COLUMN `price`; diff --git a/projects/estore/inventory/migrations/atlas.sum b/projects/estore/inventory/migrations/atlas.sum index 6e7cf79..7a3338b 100644 --- a/projects/estore/inventory/migrations/atlas.sum +++ b/projects/estore/inventory/migrations/atlas.sum @@ -1,3 +1,4 @@ -h1:OD80uv7vCyCGr2x6dS4rLVaCkoj7JyydbcT6gxQAShI= +h1:rLaSupPDNS/GL2eTsyIKijPv+y+0Ud5ob4fVlbOjzhs= 20240307092728.sql h1:BEXRAbglZQlUqXHRy4fvsEVsu7FlSfKcJ/JAkH2XgMY= 20240307104354_add_warehouses.sql h1:heT56DSu6Ka8TJo8K4F92rVxinZmt+7tbMX+y3vaJKo= +20240319121112.sql h1:8V+10WB7IMgPOjGma+geTPqV2ZMxBkphSWlCWceWrVU= diff --git a/projects/estore/inventory/schema.hcl b/projects/estore/inventory/schema.hcl index ede22d2..26ac6f0 100644 --- a/projects/estore/inventory/schema.hcl +++ b/projects/estore/inventory/schema.hcl @@ -36,11 +36,6 @@ table "products" { null = true type = int } - column "price" { - null = false - type = decimal(10,2) - unsigned = false - } column "description" { null = true type = text