aboutsummaryrefslogtreecommitdiff
path: root/backend/migrations
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-26 05:21:46 +0000
committerAkshay <[email protected]>2020-12-26 05:21:46 +0000
commit8014def1a8da3397d78d1162f9e1b8c3f22d0322 (patch)
tree346e1de0ac6aa4ca973c1b3e5897c2c44948e5a8 /backend/migrations
parent7c6006e1abc6094b5922ab69ccfa5449b8dbbc99 (diff)
add transactions and quantities
- backend exposes endpoints to perform transactions - frontend introduces a new page to "checkout" cart
Diffstat (limited to 'backend/migrations')
-rw-r--r--backend/migrations/2020-12-25-041256_cart_quantity/down.sql4
-rw-r--r--backend/migrations/2020-12-25-041256_cart_quantity/up.sql3
-rw-r--r--backend/migrations/2020-12-25-150728_transaction_date/down.sql4
-rw-r--r--backend/migrations/2020-12-25-150728_transaction_date/up.sql4
4 files changed, 15 insertions, 0 deletions
diff --git a/backend/migrations/2020-12-25-041256_cart_quantity/down.sql b/backend/migrations/2020-12-25-041256_cart_quantity/down.sql
new file mode 100644
index 0000000..94aec7a
--- /dev/null
+++ b/backend/migrations/2020-12-25-041256_cart_quantity/down.sql
@@ -0,0 +1,4 @@
1-- This file should undo anything in `up.sql`
2
3alter table cart_items
4drop column quantity;
diff --git a/backend/migrations/2020-12-25-041256_cart_quantity/up.sql b/backend/migrations/2020-12-25-041256_cart_quantity/up.sql
new file mode 100644
index 0000000..314c11c
--- /dev/null
+++ b/backend/migrations/2020-12-25-041256_cart_quantity/up.sql
@@ -0,0 +1,3 @@
1-- Your SQL goes here
2alter table cart_items
3add quantity integer default 1;
diff --git a/backend/migrations/2020-12-25-150728_transaction_date/down.sql b/backend/migrations/2020-12-25-150728_transaction_date/down.sql
new file mode 100644
index 0000000..18fe306
--- /dev/null
+++ b/backend/migrations/2020-12-25-150728_transaction_date/down.sql
@@ -0,0 +1,4 @@
1-- This file should undo anything in `up.sql`
2
3alter table transaction
4drop column order_date;
diff --git a/backend/migrations/2020-12-25-150728_transaction_date/up.sql b/backend/migrations/2020-12-25-150728_transaction_date/up.sql
new file mode 100644
index 0000000..76f9820
--- /dev/null
+++ b/backend/migrations/2020-12-25-150728_transaction_date/up.sql
@@ -0,0 +1,4 @@
1-- Your SQL goes here
2
3alter table transaction
4add order_date date not null default curdate();