-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sql
More file actions
59 lines (45 loc) · 1.09 KB
/
Copy pathsetup.sql
File metadata and controls
59 lines (45 loc) · 1.09 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
48
49
50
51
52
53
54
55
56
57
58
--
-- Run from snaily user in madast database
--
---- START OF VERSION 1
create schema madast;
create table madast.users
(
id text not null
constraint users_pk
primary key,
email text
constraint users_email_key
unique,
firstname text,
lastname text
);
alter table madast.users
owner to snaily;
alter table madast.users
add column password text;
---- END OF VERSION 1
---- START OF VERSION 2
create table madast.items
(
id text not null
constraint items_pk
primary key,
parent_id text,
title text,
body text,
created_date timestamp with time zone,
created_by text,
waiting_for text,
organization_id text,
waiting_for_done boolean,
waiting_for_done_date timestamp with time zone,
created_by_done boolean,
created_by_done_date timestamp with time zone
);
alter table madast.items owner to snaily;
create index items_created_by_index
on madast.items (created_by);
create index items_waiting_for_index
on madast.items (waiting_for);
---- END OF VERSION 2