Skip to content

Commit 92a87b0

Browse files
authored
Added a 'category_image_url' column to the 'categories' table to store an image URL for the category. (#213)
Co-authored-by: GitHub Gen Changes <>
1 parent 08700c1 commit 92a87b0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Modify "categories" table
2+
ALTER TABLE `categories` ADD COLUMN `category_image_url` varchar(255) NULL COMMENT "URL to an image representing the category" AFTER `category_code`;

dirs/ecommerce/migrations/atlas.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
h1:qGuAzfM1J8DvvstrlaL55EzVOs1eJOhkSxMa1/9wUmU=
1+
h1:Sr++F45oHKyvCJNOCoTc2TNtMLYiVjO69dj6eCeiI6g=
22
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
33
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
44
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
@@ -114,3 +114,4 @@ h1:qGuAzfM1J8DvvstrlaL55EzVOs1eJOhkSxMa1/9wUmU=
114114
20250710132012.sql h1:a9FYtoRpMF+PR5DAaB3tTqWYxSa2rPM854hykKgipdY=
115115
20250715132055.sql h1:D6nLJbfZaJTuqhhENlgoF6LO8ouX6yqWAtq74Zch2Ks=
116116
20250724132033.sql h1:TngcAL8LenOVUNm6zri0U3f33K8mHNHq5lO7vUtmIrA=
117+
20250731132135.sql h1:cSy+4lVYqqbIXlorpnJl9jOYmgqPppfToXj07fTbr/Q=

dirs/ecommerce/schema.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ CREATE TABLE `categories` (
4444
`category_name` varchar(255) NOT NULL COMMENT 'The name of the category, must be unique',
4545
`category_description` text NULL COMMENT 'Description of the category',
4646
`category_code` varchar(100) NOT NULL UNIQUE COMMENT 'Unique code for the category',
47+
`category_image_url` varchar(255) NULL COMMENT 'URL to an image representing the category',
4748
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp of when the category was created',
4849
`updated_at` timestamp NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'Timestamp of the last update to the category record',
4950
`status` ENUM('active', 'inactive') NOT NULL DEFAULT 'active' COMMENT 'Current status of the category',

0 commit comments

Comments
 (0)