forked from jackalnom/centralcoastcauldrons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
44 lines (41 loc) · 1.48 KB
/
schema.sql
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
create table
public.global_inventory (
num_green_ml integer not null default 0,
num_red_ml integer not null default 0,
num_blue_ml integer not null default 0,
id smallint not null default '1'::smallint,
gold integer not null default 100,
ml_capacity integer null default 10000,
potion_capacity integer null default 50,
num_dark_ml integer null default 0,
constraint global_inventory_pkey primary key (id)
) tablespace pg_default;
create table
public.catalog (
name text null default 'Green Potion'::text,
price integer null default 0,
id smallint generated by default as identity not null,
sku text not null default 'RED'::text,
potion_type integer[] not null default '{0,1,0,0}'::integer[],
quantity integer null,
constraint potion_catalog_pkey primary key (id)
) tablespace pg_default;
create table
public.carts (
id integer generated by default as identity not null,
customer_name text null,
customer_class text null,
level integer null,
created_at timestamp with time zone null default now(),
constraint carts_pkey primary key (id)
) tablespace pg_default;
create table
public.cart_items (
created_at timestamp with time zone not null default now(),
item_sku text null,
quantity integer null,
id integer generated by default as identity not null,
cart_id integer not null,
paid boolean null default false,
constraint cart_items_pkey primary key (id)
) tablespace pg_default;