diff --git a/dirs/ecommerce/migrations/20240806130855.sql b/dirs/ecommerce/migrations/20240806130855.sql new file mode 100644 index 0000000..4eeafbb --- /dev/null +++ b/dirs/ecommerce/migrations/20240806130855.sql @@ -0,0 +1,2 @@ +-- Modify "orders" table +ALTER TABLE `orders` ADD COLUMN `shipping_address` varchar(255) NOT NULL; diff --git a/dirs/ecommerce/migrations/atlas.sum b/dirs/ecommerce/migrations/atlas.sum index acab15e..809a661 100644 --- a/dirs/ecommerce/migrations/atlas.sum +++ b/dirs/ecommerce/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:6kfFz/E9odd4UTioGGmPzrRQmxK3gCYpkSnYRHGCPak= +h1:luWIccvAY7xNWVYnfbb7RnEtJTviDThL+UZK3SGv8XM= 20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo= 20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY= 20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA= @@ -31,3 +31,4 @@ h1:6kfFz/E9odd4UTioGGmPzrRQmxK3gCYpkSnYRHGCPak= 20240801083707.sql h1:87RLzlaeNBXjfXtSlg3G/IAPqye2IeKogJCJTvpPTXA= 20240801130915.sql h1:wqC2zDRfVQWUWiV5ItznG3xy2zN7hCr7dGLdLFYW6+c= 20240804130742.sql h1:kB1qxstPuROcCPaWyqXh0ZnjpBsOSxGRLQJTa+CP03w= +20240806130855.sql h1:rsSJMFdmgp33FVqqG5ONW+F8tv3+x1D2xEn+ATwNJw0= diff --git a/dirs/ecommerce/schema.sql b/dirs/ecommerce/schema.sql index 91d6341..7c6a503 100644 --- a/dirs/ecommerce/schema.sql +++ b/dirs/ecommerce/schema.sql @@ -1,4 +1,4 @@ --- Create 'users' table + -- Create 'users' table CREATE TABLE `users` ( `id` int NOT NULL, `user_name` varchar(255) NOT NULL, @@ -83,6 +83,7 @@ CREATE TABLE `orders` ( `total_amount` decimal(10,2) NOT NULL, `comment` varchar(100) NULL, `status` varchar(50) NOT NULL DEFAULT 'PENDING', +`shipping_address` varchar(255) NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), @@ -127,4 +128,4 @@ CREATE TABLE `payment_methods` ( PRIMARY KEY (`id`), INDEX `user_id` (`user_id`), CONSTRAINT `payment_methods_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION ON DELETE CASCADE -) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; +) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; \ No newline at end of file