Skip to content

Commit

Permalink
Add a new column 'color' to the 'products' table to store the color o…
Browse files Browse the repository at this point in the history
…f the product. This feature allows us to store the specific color information for each product. (#152)

Co-authored-by: GitHub Gen Changes <>
  • Loading branch information
ariga-bot authored Feb 23, 2025
1 parent df76d95 commit 25ecff6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dirs/ecommerce/migrations/20250223131009.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Modify "products" table
ALTER TABLE `products` ADD COLUMN `color` varchar(50) NULL COMMENT "Color of the product, optional";
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:DQZaPTrvJt7pfVvaDmfdQy1Bj9vryao05Cczn2oma34=
h1:BLf4MeokOp6CItjMBLULEuA+eKjgnQkUEwDaLPpstCM=
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
Expand Down Expand Up @@ -78,3 +78,4 @@ h1:DQZaPTrvJt7pfVvaDmfdQy1Bj9vryao05Cczn2oma34=
20250204131144.sql h1:V+pgVOWi42m0AC5Onhdj5IgbsbPjhMP9B450Jypbq70=
20250209131046.sql h1:k5w+h5NcOXb4rTzY5b3ZO0inHu7QHGalmXdJh2oTV4Q=
20250220131443.sql h1:BiBfHIw7v9K4592vrCNhl0lpprhQLG3WfN82wEYSPps=
20250223131009.sql h1:t4doEgnFfNCikFlfc3TEWav0DK1PfMJjBADjioBdFDU=
1 change: 1 addition & 0 deletions dirs/ecommerce/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ CREATE TABLE `products` (
`currency_code` varchar(3) NOT NULL DEFAULT 'USD' COMMENT 'Currency code for the product price',
`category_id` int NULL COMMENT 'Foreign key referencing categories',
`description` text NULL COMMENT 'Description of the product',
`color` varchar(50) NULL COMMENT 'Color of the product, optional',
`image_url` varchar(255) NULL COMMENT 'URL to the product image',
`thumbnail_url` varchar(255) NULL COMMENT 'URL to the product thumbnail image',
`featured` bool NOT NULL DEFAULT 0 COMMENT 'Flag indicating if the product is featured, defaults to false',
Expand Down

0 comments on commit 25ecff6

Please sign in to comment.