Skip to content

Commit

Permalink
Added a 'thumbnail_url' column to 'products' table to store URLs of p…
Browse files Browse the repository at this point in the history
…roduct thumbnails. (#104)

Co-authored-by: GitHub Gen Changes <>
  • Loading branch information
ariga-bot authored Oct 27, 2024
1 parent 91e23d5 commit 74cff74
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/20241027144749.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Modify "products" table
ALTER TABLE `products` ADD COLUMN `thumbnail_url` varchar(255) NULL COMMENT "URL to the product thumbnail image";
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:41GMD5Qi34HG+UJPkQ0XWLAEDpv2X0AEFG0+I2gvlYo=
h1:NMi0fWXDuUkmq21unRIe6/tqtR44t7Mex/OPehuw+UA=
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
Expand Down Expand Up @@ -53,3 +53,4 @@ h1:41GMD5Qi34HG+UJPkQ0XWLAEDpv2X0AEFG0+I2gvlYo=
20241020130953.sql h1:Tvps4LR+l6bKFHNb82EY4SGzhPvCYXx3nwvFDjFRDac=
20241022103333_add_comments.sql h1:/H61oAHrzxI4ZgrNQMApyTLkYeOKZB4qaATCEHJHFI8=
20241027112248.sql h1:Uz/zd2cH0VzbQuO8TcENLacZimgQA9XIdHmL+det8Lc=
20241027144749.sql h1:0OTheGU7/lbJB+NXlrmAVMNonIFH89tj9dzW6EByorg=
1 change: 1 addition & 0 deletions dirs/ecommerce/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ CREATE TABLE `products` (
`category_id` int NULL COMMENT 'Foreign key referencing categories',
`description` text NULL COMMENT 'Description of the product',
`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',
`status` varchar(50) NOT NULL DEFAULT 'active' COMMENT 'Current status of the product (e.g., active, inactive)',
`discount` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT 'Discount amount on the product',
Expand Down

0 comments on commit 74cff74

Please sign in to comment.