-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathaskmatepart2-sample-data.sql
More file actions
72 lines (61 loc) · 1.98 KB
/
askmatepart2-sample-data.sql
File metadata and controls
72 lines (61 loc) · 1.98 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.6
-- Dumped by pg_dump version 9.5.6
DROP TABLE IF EXISTS public.boards;
DROP SEQUENCE IF EXISTS public.boards_id_seq;
CREATE TABLE boards (
id serial NOT NULL,
title text
);
DROP TABLE IF EXISTS public.cards;
DROP SEQUENCE IF EXISTS public.cards_id_seq;
CREATE TABLE cards (
id serial NOT NULL,
board_id integer,
title text,
status_id integer,
"order" integer
);
DROP TABLE IF EXISTS public.credentials;
DROP SEQUENCE IF EXISTS public.credentials_id_seq;
CREATE TABLE credentials (
id serial NOT NULL,
user_id integer,
user_login text,
user_email text,
user_password text
);
DROP TABLE IF EXISTS public.statuses;
DROP SEQUENCE IF EXISTS public.statuses_id_seq;
CREATE TABLE statuses (
id serial NOT NULL,
title text
);
-- ALTER TABLE ONLY answer
-- ADD CONSTRAINT pk_answer_id PRIMARY KEY (id);
--
-- ALTER TABLE ONLY question_tag
-- ADD CONSTRAINT pk_question_tag_id PRIMARY KEY (question_id, tag_id);
--
-- ALTER TABLE ONLY comment
-- ADD CONSTRAINT fk_answer_id FOREIGN KEY (answer_id) REFERENCES answer(id);
INSERT INTO boards VALUES (1, 'Board 1');
INSERT INTO boards VALUES (2, 'Board 2');
INSERT INTO cards VALUES (1, 1, 'new card 1', 0, 0);
INSERT INTO cards VALUES (2,1,'new card 2',0,1);
INSERT INTO cards VALUES (3,1,'in progress card',1,0);
INSERT INTO cards VALUES (4,1,'planning',2,0);
INSERT INTO cards VALUES (5,1,'done card 1',3,0);
INSERT INTO cards VALUES (6,1,'done card 1',3,1);
INSERT INTO cards VALUES (7,2,'new card 1',0,0);
INSERT INTO cards VALUES (8,2,'new card 2',0,1);
INSERT INTO cards VALUES (9,2,'in progress card',1,0);
INSERT INTO cards VALUES (10,2,'planning',2,0);
INSERT INTO cards VALUES (11,2,'done card 1',3,0);
INSERT INTO cards VALUES (12,2,'done card 1',3,1);
INSERT INTO statuses VALUES (0, 'new');
INSERT INTO statuses VALUES (1, 'in progress');
INSERT INTO statuses VALUES (2, 'testing');
INSERT INTO statuses VALUES (3, 'done');