This commit is contained in:
Pratik Tripathy
2020-12-01 04:15:28 +05:30
parent fc075ea55c
commit e7a77d0ee2
14 changed files with 156 additions and 52 deletions
@@ -1,8 +1,13 @@
create sequence products_productid_seq;
create table if not exists products
(
productid integer not null
constraint pk_products
primary key,
primary key DEFAULT nextval('products_productid_seq'),
productname text not null,
created_at timestamp not null default current_timestamp
);
);
alter sequence products_productid_seq
owned by products.productid;
@@ -1,8 +1,14 @@
create sequence orders_ordersid_seq;
create table if not exists orders
(
orderid integer not null
constraint pk_orders
primary key,
primary key default nextval('orders_ordersid_seq'),
customer_email text not null,
created_at timestamp not null default current_timestamp
);
);
alter sequence orders_ordersid_seq
owned by orders.orderid;