From 8014def1a8da3397d78d1162f9e1b8c3f22d0322 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 26 Dec 2020 10:51:46 +0530 Subject: add transactions and quantities - backend exposes endpoints to perform transactions - frontend introduces a new page to "checkout" cart --- backend/migrations/2020-12-25-041256_cart_quantity/down.sql | 4 ++++ backend/migrations/2020-12-25-041256_cart_quantity/up.sql | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 backend/migrations/2020-12-25-041256_cart_quantity/down.sql create mode 100644 backend/migrations/2020-12-25-041256_cart_quantity/up.sql (limited to 'backend/migrations/2020-12-25-041256_cart_quantity') 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 @@ +-- This file should undo anything in `up.sql` + +alter table cart_items +drop 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 @@ +-- Your SQL goes here +alter table cart_items +add quantity integer default 1; -- cgit v1.2.3