aboutsummaryrefslogtreecommitdiffstats
path: root/rust/migrations
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-08-14 20:13:50 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-08-14 20:13:50 -0700
commit987b41fd721231bc320a5f562d9a1c526db01079 (patch)
treea529a3554cad6c66587a5bc558e4aaa97a867c8c /rust/migrations
parent03db89544ee1589300e497bd5064b72f357d0c80 (diff)
downloadfatcat-987b41fd721231bc320a5f562d9a1c526db01079.tar.gz
fatcat-987b41fd721231bc320a5f562d9a1c526db01079.zip
cockroach: rename reserved columns
Diffstat (limited to 'rust/migrations')
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql10
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index 18139d30..95efc9b8 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -272,8 +272,8 @@ CREATE TABLE release_contrib (
release_rev UUID REFERENCES release_rev(id) NOT NULL,
creator_ident_id UUID REFERENCES creator_ident(id),
raw_name TEXT,
- role TEXT, -- TODO: enum?
- index BIGINT,
+ role_val TEXT, -- TODO: enum?
+ index_val BIGINT,
extra_json JSON
);
@@ -284,7 +284,7 @@ CREATE TABLE release_ref (
id BIGSERIAL PRIMARY KEY,
release_rev UUID REFERENCES release_rev(id) NOT NULL,
target_release_ident_id UUID REFERENCES release_ident(id), -- or work?
- index BIGINT,
+ index_val BIGINT,
key TEXT,
extra_json JSON, -- title, year, container_title, locator (aka, page), oci_id
container_title TEXT,
@@ -429,12 +429,12 @@ INSERT INTO release_rev_abstract (release_rev, abstract_sha1, mimetype, lang) VA
('00000000-0000-0000-4444-FFF000000001', '1ba86bf8c2979a62d29b18b537e50b2b093be27e', 'text/plain', 'en'),
('00000000-0000-0000-4444-FFF000000002', '0da908ab584b5e445a06beb172e3fab8cb5169e3', 'application/xml+jats', 'en');
-INSERT INTO release_contrib (release_rev, creator_ident_id, raw_name, role, index) VALUES
+INSERT INTO release_contrib (release_rev, creator_ident_id, raw_name, role_val, index_val) VALUES
('00000000-0000-0000-4444-FFF000000002', null, null, null, null),
('00000000-0000-0000-4444-FFF000000002', '00000000-0000-0000-2222-000000000002', 'some contrib', 'editor', 4),
('00000000-0000-0000-4444-FFF000000003', '00000000-0000-0000-2222-000000000003', 'John P. A. Ioannidis', 'author', 0);
-INSERT INTO release_ref (release_rev, target_release_ident_id, index, extra_json) VALUES
+INSERT INTO release_ref (release_rev, target_release_ident_id, index_val, extra_json) VALUES
('00000000-0000-0000-4444-FFF000000002', null, null, null),
('00000000-0000-0000-4444-FFF000000002', '00000000-0000-0000-4444-000000000001', 4, '{"unstructured":"citation note"}'),
('00000000-0000-0000-4444-FFF000000003', null, 0, '{"unstructured": "Ioannidis JP, Haidich AB, Lau J. Any casualties in the clash of randomised and observational evidence? BMJ. 2001;322:879–880"}'),