Skip to content

Commit

Permalink
Added 'last_order_date' column to the 'users' table to track the date…
Browse files Browse the repository at this point in the history
… of the user's last order. (#136)

Co-authored-by: GitHub Gen Changes <>
  • Loading branch information
ariga-bot authored Jan 2, 2025
1 parent cfee627 commit 9873852
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/20250102131036.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Modify "users" table
ALTER TABLE `users` ADD COLUMN `last_order_date` date NULL COMMENT "Date of the user's last order";
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:l98jtm0KDA9wjnxtxIzu9U7xKz1M3MY/+3pz1qbJsQo=
h1:Rn+1tTkF/iDeC1Y5mm6Zi1/SYwVmghRJhikPGEsH/a0=
20230316085611.sql h1:br6W6LPEnnsejlz/7hRm9zthwStCzjN2vZkqVPxlmvo=
20230316090502.sql h1:GfeRjkSeoCt3JVRtLQNa/r50lRfpAPXS7AqTU2ZNFgY=
20230531091333_products_categories.sql h1:59q2M59dV5dJNv4Lyb2TAJz8V6HekgkLn9z4DoL98jA=
Expand Down Expand Up @@ -66,3 +66,4 @@ h1:l98jtm0KDA9wjnxtxIzu9U7xKz1M3MY/+3pz1qbJsQo=
20241217131440.sql h1:LBppckudt/r82v6i910RWNoBAHQ7E3KwrMHETxwXfF4=
20241222081015.sql h1:RU7o+jkmMTI4Okz56YG4sZYRL2P+YMvcXfLlIYR8Rk8=
20241224131007.sql h1:OHMWMynd3YnU6t9QKs1R8ei2BbbNlZ66Tx73jgmeJUM=
20250102131036.sql h1:NEfnhChNfi18FzcgQ4Jsc1ygWpGH19GNvu98+3VVTgQ=
1 change: 1 addition & 0 deletions dirs/ecommerce/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CREATE TABLE `users` (
`reward_points` int NOT NULL DEFAULT 0 COMMENT 'The number of reward points the user has accumulated',
`phone_verified` bool NOT NULL DEFAULT 0 COMMENT 'Flag indicating if the user phone number is verified, defaults to false',
`deleted_at` timestamp NULL COMMENT 'Timestamp for soft deletion of the user record',
`last_order_date` date NULL COMMENT 'Date of the user\'s last order',
PRIMARY KEY (`id`),
UNIQUE INDEX `email` (`email`),
UNIQUE INDEX `user_name` (`user_name`),
Expand Down

0 comments on commit 9873852

Please sign in to comment.