Skip to content

Commit

Permalink
Added a 'category_description' column to the 'categories' table to st…
Browse files Browse the repository at this point in the history
…ore additional details about each category. (#79)

Co-authored-by: GitHub Gen Changes <>
  • Loading branch information
ariga-bot authored Aug 15, 2024
1 parent c4de4de commit 8ef958f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions dirs/ecommerce/migrations/20240815125449.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Modify "categories" table
ALTER TABLE `categories` ADD COLUMN `category_description` text NULL;
3 changes: 2 additions & 1 deletion dirs/ecommerce/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
h1:kz7N16b5Eatu6BuQPfx9lB5yLf7L3dDPAg6Z0Cu9Jlk=
h1:t5nB6GHWoQqI+kJDICV6tBKGpotim6b5wphogskPQlQ=
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
Expand Down Expand Up @@ -34,3 +34,4 @@ h1:kz7N16b5Eatu6BuQPfx9lB5yLf7L3dDPAg6Z0Cu9Jlk=
20240806130855.sql h1:rsSJMFdmgp33FVqqG5ONW+F8tv3+x1D2xEn+ATwNJw0=
20240808130858.sql h1:z1ZMAu6Olrqut5mavBk5M9CbJ0Yb7Calp9vSMyFJEvY=
20240811130749.sql h1:gdDmY5C1ZLsdBT6BSYnwlub1rFzYPtsP4gZdrXpRfRI=
20240815125449.sql h1:3vhjuCKKwckYQX7JIEFDL6hfjoiHFD5iECEmgfdvcHI=
5 changes: 3 additions & 2 deletions dirs/ecommerce/schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Create 'users' table
-- Create 'users' table
CREATE TABLE `users` (
`id` int NOT NULL,
`user_name` varchar(255) NOT NULL,
Expand All @@ -21,6 +21,7 @@ UNIQUE INDEX `phone_number` (`phone_number`)
CREATE TABLE `categories` (
`id` int NOT NULL,
`category_name` varchar(255) NOT NULL,
`category_description` text NULL,
PRIMARY KEY (`id`)
) CHARSET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

Expand Down Expand Up @@ -130,4 +131,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;

0 comments on commit 8ef958f

Please sign in to comment.