-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdump.sql
More file actions
25 lines (21 loc) · 785 Bytes
/
dump.sql
File metadata and controls
25 lines (21 loc) · 785 Bytes
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
create type task_status as enum ('todo', 'doing', 'done');
alter type task_status owner to postgres;
create table task
(
id serial not null
constraint task_pk
primary key,
title varchar(255) not null,
detail text,
status task_status default 'todo'::task_status,
created_at timestamp default now(),
updated_at timestamp default now()
);
alter table task
owner to postgres;
INSERT INTO task (id, title, detail, status, created_at, updated_at)
VALUES (1, 'test1', null, 'todo', now(), now());
INSERT INTO task (id, title, detail, status, created_at, updated_at)
VALUES (2, 'test2', null, 'todo', now(), now());
INSERT INTO task (id, title, detail, status, created_at, updated_at)
VALUES (3, 'test3', null, 'doing', now(), now());