diff --git a/dirs/ecommerce/migrations/20240801083707.sql b/dirs/ecommerce/migrations/20240801083707.sql new file mode 100644 index 0000000..5388b90 --- /dev/null +++ b/dirs/ecommerce/migrations/20240801083707.sql @@ -0,0 +1,2 @@ +-- Modify "users" table +ALTER TABLE `users` ADD UNIQUE INDEX `user_name` (`user_name`); diff --git a/dirs/ecommerce/migrations/atlas.sum b/dirs/ecommerce/migrations/atlas.sum index 2c5f53c..5b651cc 100644 --- a/dirs/ecommerce/migrations/atlas.sum +++ b/dirs/ecommerce/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:ag/hSSF2oVKFPE9F/IplLMOPlyvQd0gXcpVyLHhXv0U= +h1:Ap7xMN9V1zyLgjBJwn9epFduJ1QnnCkyJgTxoacsNjc= 20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo= 20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY= 20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA= @@ -28,3 +28,4 @@ h1:ag/hSSF2oVKFPE9F/IplLMOPlyvQd0gXcpVyLHhXv0U= 20240723130918.sql h1:7UFf+5hmmm/hJZdmF1lvHCz+GYQKbSkxAUK6Q41kVXs= 20240725130853.sql h1:8wHRNNINenYDpavChvcXopJj7i2i88dKydkPoZ+3biE= 20240728130515.sql h1:f32S9I3rYZ1KIUsnLpIyCMc/nxv2U8AqCmpA/95S8ls= +20240801083707.sql h1:87RLzlaeNBXjfXtSlg3G/IAPqye2IeKogJCJTvpPTXA= diff --git a/dirs/ecommerce/schema.sql b/dirs/ecommerce/schema.sql index 7b50534..988fde7 100644 --- a/dirs/ecommerce/schema.sql +++ b/dirs/ecommerce/schema.sql @@ -12,7 +12,8 @@ CREATE TABLE `users` ( `last_login` timestamp NULL, `address` varchar(255) NULL, PRIMARY KEY (`id`), -UNIQUE INDEX `email` (`email`) +UNIQUE INDEX `email` (`email`), +UNIQUE INDEX `user_name` (`user_name`) ) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci; -- Create 'categories' table