forked from jackalnom/centralcoastcauldrons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.sql
More file actions
47 lines (43 loc) · 1.43 KB
/
schema.sql
File metadata and controls
47 lines (43 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
global_inventory:
create table
public.global_inventory (
id bigint generated by default as identity,
created_at timestamp with time zone not null default now(),
num_red_ml integer null,
gold integer null,
num_blue_ml integer null,
num_green_ml integer null,
num_dark_ml integer null default 0,
total_potions bigint null,
constraint global_inventory_pkey primary key (id)
) tablespace pg_default;
potions_inventory:
create table
public.potions_inventory (
id bigint generated by default as identity,
created_at timestamp with time zone not null default now(),
quantity integer null,
price integer null,
sku text null,
name text null,
type integer[] null,
constraint potions_inventory_pkey primary key (id)
) tablespace pg_default;
carts:
create table
public.carts (
cart_id bigint generated by default as identity,
created_at timestamp with time zone not null default now(),
customer_name text null,
constraint carts_pkey primary key (cart_id)
) tablespace pg_default;
cart_items:
create table
public.cart_items (
cart_id bigint generated by default as identity,
created_at timestamp with time zone not null default now(),
id bigint not null,
quantity bigint not null,
constraint cart_items_pkey primary key (cart_id),
constraint cart_items_id_fkey foreign key (id) references potions_inventory (id)
) tablespace pg_default;