aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-11 14:47:19 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-11 14:47:19 -0800
commita1b1f0e6cb59aee71661c2dbd80245eb7ac81ac9 (patch)
treedb18a18a9c1ea9eed355f4db9920e27c647c6d9a
parente39d736a1c735c2c5156acf1183f4d81dc2af4d3 (diff)
downloadfatcat-a1b1f0e6cb59aee71661c2dbd80245eb7ac81ac9.tar.gz
fatcat-a1b1f0e6cb59aee71661c2dbd80245eb7ac81ac9.zip
fix some SQL meta-schema things (eg, richer examples)
-rw-r--r--rust/migrations/2019-01-01-000000_init/down.sql1
-rw-r--r--rust/migrations/2019-01-01-000000_init/up.sql20
2 files changed, 14 insertions, 7 deletions
diff --git a/rust/migrations/2019-01-01-000000_init/down.sql b/rust/migrations/2019-01-01-000000_init/down.sql
index b2666083..30e712e3 100644
--- a/rust/migrations/2019-01-01-000000_init/down.sql
+++ b/rust/migrations/2019-01-01-000000_init/down.sql
@@ -44,5 +44,6 @@ DROP TABLE IF EXISTS creator_edit CASCADE;
DROP TABLE IF EXISTS abstracts CASCADE;
DROP TABLE IF EXISTS auth_oidc CASCADE;
DROP TABLE IF EXISTS editor CASCADE;
+DROP TABLE IF EXISTS editgroup_annotation CASCADE;
DROP TABLE IF EXISTS editgroup CASCADE;
DROP TABLE IF EXISTS changelog CASCADE;
diff --git a/rust/migrations/2019-01-01-000000_init/up.sql b/rust/migrations/2019-01-01-000000_init/up.sql
index e6257f8d..5b8b120f 100644
--- a/rust/migrations/2019-01-01-000000_init/up.sql
+++ b/rust/migrations/2019-01-01-000000_init/up.sql
@@ -491,13 +491,19 @@ INSERT INTO editor (id, username, is_superuser, is_admin, is_bot, auth_epoch) VA
('00000000-0000-0000-AAAA-000000000005', 'webface-bot', true, true, true, '1970-01-01T01:01:01Z'), -- aaaaaaaaaaaabkvkaaaaaaaaau
('00000000-0000-0000-AAAA-000000000006', 'bnewbold', false, true, false, '1970-01-01T01:01:01Z'); -- aaaaaaaaaaaabkvkaaaaaaaaay
-INSERT INTO editgroup (id, editor_id, description) VALUES
- ('00000000-0000-0000-BBBB-000000000001', '00000000-0000-0000-AAAA-000000000001', 'first edit ever!'), -- aaaaaaaaaaaabo53aaaaaaaaae
- ('00000000-0000-0000-BBBB-000000000002', '00000000-0000-0000-AAAA-000000000001', 'another one!'), -- aaaaaaaaaaaabo53aaaaaaaaai
- ('00000000-0000-0000-BBBB-000000000003', '00000000-0000-0000-AAAA-000000000003', 'user edit'), -- aaaaaaaaaaaabo53aaaaaaaaam
- ('00000000-0000-0000-BBBB-000000000004', '00000000-0000-0000-AAAA-000000000002', 'uncommited edit'), -- aaaaaaaaaaaabo53aaaaaaaaaq
- ('00000000-0000-0000-BBBB-000000000005', '00000000-0000-0000-AAAA-000000000001', 'journal edit'), -- aaaaaaaaaaaabo53aaaaaaaaau
- ('00000000-0000-0000-BBBB-000000000006', '00000000-0000-0000-AAAA-000000000001', 'another journal edit'); -- aaaaaaaaaaaabo53aaaaaaaaay
+INSERT INTO editgroup (id, is_accepted, editor_id, description, submitted) VALUES
+ ('00000000-0000-0000-BBBB-000000000001', true, '00000000-0000-0000-AAAA-000000000001', 'first edit ever!', NULL), -- aaaaaaaaaaaabo53aaaaaaaaae
+ ('00000000-0000-0000-BBBB-000000000002', true, '00000000-0000-0000-AAAA-000000000001', 'another one!', NULL), -- aaaaaaaaaaaabo53aaaaaaaaai
+ ('00000000-0000-0000-BBBB-000000000003', true, '00000000-0000-0000-AAAA-000000000003', 'user edit', NULL), -- aaaaaaaaaaaabo53aaaaaaaaam
+ ('00000000-0000-0000-BBBB-000000000004', true, '00000000-0000-0000-AAAA-000000000002', 'uncommited edit', NULL), -- aaaaaaaaaaaabo53aaaaaaaaaq
+ ('00000000-0000-0000-BBBB-000000000005', true, '00000000-0000-0000-AAAA-000000000001', 'journal edit', NULL), -- aaaaaaaaaaaabo53aaaaaaaaau
+ ('00000000-0000-0000-BBBB-000000000006', false, '00000000-0000-0000-AAAA-000000000004', 'another journal edit', NULL), -- aaaaaaaaaaaabo53aaaaaaaaay
+ ('00000000-0000-0000-BBBB-000000000007', false, '00000000-0000-0000-AAAA-000000000003', 'edit for submission', now()); -- aaaaaaaaaaaabo53aaaaaaaaa?
+
+INSERT INTO editgroup_annotation (editgroup_id, editor_id, comment_markdown) VALUES
+ ('00000000-0000-0000-BBBB-000000000007', '00000000-0000-0000-AAAA-000000000003', 'I love this edit!'),
+ ('00000000-0000-0000-BBBB-000000000007', '00000000-0000-0000-AAAA-000000000004', 'I have concerns about this edit...'),
+ ('00000000-0000-0000-BBBB-000000000007', '00000000-0000-0000-AAAA-000000000003', 'updated with changes, please re-review.');
INSERT INTO changelog (editgroup_id) VALUES
('00000000-0000-0000-BBBB-000000000001'),