Skip to content

Commit ce3f1ce

Browse files
author
Ferenc Hammerl
committed
Add created_by_user_id column to poll table
1 parent 7547e68 commit ce3f1ce

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

dbconfig/create_tables.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CREATE TABLE poll
77
preferences_type text NOT NULL,
88
state text NOT NULL,
99
title text NOT NULL,
10+
created_by_user_id integer, -- dummy value, would obviously be a foreign key
1011
PRIMARY KEY (id)
1112
);
1213

dbconfig/insert_rows.sql

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
INSERT INTO poll(
2-
id, latest_change, initiated, hidden, preferences_type, state, title)
2+
id, latest_change, initiated, hidden, preferences_type, state, title, created_by_user_id, 4)
33
VALUES ('xsd4cv89t5f5um4b', null, now(), false, 'YESNO', 'OPEN', 'Qui sont les superhéros Marvel les plus oufs?');
44

55
INSERT INTO participant(
@@ -16,13 +16,26 @@ INSERT INTO participant(
1616

1717

1818
INSERT INTO poll(
19-
id, latest_change, initiated, hidden, preferences_type, state, title)
20-
VALUES ('v89t5f5um4bxsd4c', null, now(), false, 'YESNO', 'OPEN', '谁是最坏蛋奇迹超级英雄?');
19+
id, latest_change, initiated, hidden, preferences_type, state, title, created_by_user_id)
20+
VALUES ('v89t5f5um4bxsd4c', null, now(), false, 'YESNO', 'OPEN', '谁是最坏蛋奇迹超级英雄?', 4);
2121

2222
INSERT INTO participant(
2323
name, email, poll_id)
2424
VALUES ('Revi Doe', 'mh+sample@doodle.com', 'v89t5f5um4bxsd4c');
2525

2626
INSERT INTO participant(
2727
name, email, poll_id)
28-
VALUES ('Johannes Doe', 'mh+sample@doodle.com', 'v89t5f5um4bxsd4c');
28+
VALUES ('Tanya Doe', 'mh+sample@doodle.com', 'v89t5f5um4bxsd4c');
29+
30+
31+
INSERT INTO poll(
32+
id, latest_change, initiated, hidden, preferences_type, state, title, created_by_user_id)
33+
VALUES ('f5um4bxsd4cv89t5', null, now(), false, 'YESNO', 'OPEN', 'Le bébé 👶🏼 le plus adorable au monde va avoir 2 ans le 12 janvier. Le temps passe vite. Quand auriez-vous du temps pour fêter avec nous??', 9);
34+
35+
INSERT INTO participant(
36+
name, email, poll_id)
37+
VALUES ('Irene Doe', 'mh+sample@doodle.com', 'f5um4bxsd4cv89t5');
38+
39+
INSERT INTO participant(
40+
name, email, poll_id)
41+
VALUES ('Johannes Doe', 'mh+sample@doodle.com', 'f5um4bxsd4cv89t5');

0 commit comments

Comments
 (0)