Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dirs/ecommerce/migrations/20260402133844.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Modify "products" table
ALTER TABLE `products` ADD INDEX `products_price` (`price`);
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:geN0bNkk8WIOjLFq/Ma5wgxXVhAHDFSyypHGplY8Avs=
h1:JUhFsyTRyuPk0j8x5PDoV2Kew1n+QSAnY+ooc3JymZc=
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
Expand Down Expand Up @@ -181,3 +181,4 @@ h1:geN0bNkk8WIOjLFq/Ma5wgxXVhAHDFSyypHGplY8Avs=
20260326133800.sql h1:UFU6EVonbyxtk1s0YBDJluF3MRVNwVwOupuNiU2Yu+I=
20260329132844.sql h1:pCnKo9J4XAeE/oiLOmNFa9jhEmnVqnZfcxhQCXXP4XM=
20260331134011.sql h1:Ntuoljti9czG7zVFYSU0vnphOW69j1nX8NNiooN3PJQ=
20260402133844.sql h1:U+0m/CbqN/SRyFivcjeWU1jBMr8ERtLetNQPhP160Bo=
1 change: 1 addition & 0 deletions dirs/ecommerce/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ CREATE TABLE `products` (
UNIQUE INDEX `product_name` (`product_name`),
INDEX `products_status_category_id` (`status`, `category_id`),
INDEX `products_manufacturer` (`manufacturer`),
INDEX `products_price` (`price`),
CONSTRAINT `products_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION ON DELETE SET NULL,
CHECK (`discount` BETWEEN 0.00 AND 100.00),
CHECK (`discount` <= `max_discount`),
Expand Down
Loading