aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-15 23:01:07 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-15 23:01:07 -0700
commit386928f9c5860afca72b4ae00c4d5e28efc50bef (patch)
tree879542e5509163b77469c16bb4d331a466141498
parentc4a4957d2f6a5ded19e47ca4d42ea8cf19742ece (diff)
downloadfatcat-386928f9c5860afca72b4ae00c4d5e28efc50bef.tar.gz
fatcat-386928f9c5860afca72b4ae00c4d5e28efc50bef.zip
remove all extra_json for now
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql22
-rw-r--r--rust/src/database_schema.rs10
2 files changed, 11 insertions, 21 deletions
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index be9866f9..0952cec3 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -17,7 +17,7 @@ CREATE TABLE editor (
CREATE TABLE editgroup (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
editor_id BIGSERIAL REFERENCES editor(id) NOT NULL,
description TEXT
);
@@ -35,7 +35,7 @@ CREATE TABLE changelog (
-------------------- Creators -----------------------------------------------
CREATE TABLE creator_rev (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
name TEXT NOT NULL,
orcid TEXT
@@ -54,7 +54,7 @@ CREATE TABLE creator_ident (
CREATE TABLE creator_edit (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
ident_id UUID REFERENCES creator_ident(id) NOT NULL,
rev_id BIGINT REFERENCES creator_rev(id),
redirect_id UUID REFERENCES creator_ident(id),
@@ -64,7 +64,7 @@ CREATE TABLE creator_edit (
-------------------- Containers --------------------------------------------
CREATE TABLE container_rev (
id BIGSERIAL PRIMARY KEY,
- -- XXX: extra_json JSON,
+ -- extra_json JSON,
name TEXT NOT NULL,
parent_ident_id BIGINT REFERENCES container_rev(id),
@@ -81,7 +81,7 @@ CREATE TABLE container_ident (
CREATE TABLE container_edit (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
ident_id UUID REFERENCES container_ident(id) NOT NULL,
rev_id BIGINT REFERENCES container_rev(id),
redirect_id UUID REFERENCES container_ident(id),
@@ -91,7 +91,7 @@ CREATE TABLE container_edit (
-------------------- Files -------------------------------------------------
CREATE TABLE file_rev (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
size INTEGER, -- TODO: uint64
sha1 TEXT, -- TODO: varchar or bytes
@@ -107,7 +107,7 @@ CREATE TABLE file_ident (
CREATE TABLE file_edit (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
ident_id UUID REFERENCES file_ident(id) NOT NULL,
rev_id BIGINT REFERENCES file_rev(id),
redirect_id UUID REFERENCES file_ident(id),
@@ -117,7 +117,7 @@ CREATE TABLE file_edit (
-------------------- Release -----------------------------------------------
CREATE TABLE release_rev (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
work_ident_id UUID NOT NULL, -- FOREIGN KEY; see ALRTER below
container_ident_id UUID REFERENCES container_ident(id),
@@ -140,7 +140,7 @@ CREATE TABLE release_ident (
CREATE TABLE release_edit (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
ident_id UUID REFERENCES release_ident(id) NOT NULL,
rev_id BIGINT REFERENCES release_rev(id),
redirect_id UUID REFERENCES release_ident(id),
@@ -150,7 +150,7 @@ CREATE TABLE release_edit (
-------------------- Works --------------------------------------------------
CREATE TABLE work_rev (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
-- not even a work, for now
work_type TEXT, -- TODO: enum?
@@ -166,7 +166,7 @@ CREATE TABLE work_ident (
CREATE TABLE work_edit (
id BIGSERIAL PRIMARY KEY,
- extra_json JSON,
+ -- extra_json JSON,
ident_id UUID REFERENCES work_ident(id) NOT NULL,
rev_id BIGINT REFERENCES work_rev(id),
redirect_id UUID REFERENCES work_ident(id),
diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs
index 1d6b46fc..789ed1f3 100644
--- a/rust/src/database_schema.rs
+++ b/rust/src/database_schema.rs
@@ -9,7 +9,6 @@ table! {
table! {
container_edit (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
ident_id -> Uuid,
rev_id -> Nullable<Int8>,
redirect_id -> Nullable<Uuid>,
@@ -39,7 +38,6 @@ table! {
table! {
creator_edit (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
ident_id -> Uuid,
rev_id -> Nullable<Int8>,
redirect_id -> Nullable<Uuid>,
@@ -59,7 +57,6 @@ table! {
table! {
creator_rev (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
name -> Text,
orcid -> Nullable<Text>,
}
@@ -68,7 +65,6 @@ table! {
table! {
editgroup (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
editor_id -> Int8,
description -> Nullable<Text>,
}
@@ -86,7 +82,6 @@ table! {
table! {
file_edit (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
ident_id -> Uuid,
rev_id -> Nullable<Int8>,
redirect_id -> Nullable<Uuid>,
@@ -113,7 +108,6 @@ table! {
table! {
file_rev (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
size -> Nullable<Int4>,
sha1 -> Nullable<Text>,
url -> Nullable<Text>,
@@ -133,7 +127,6 @@ table! {
table! {
release_edit (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
ident_id -> Uuid,
rev_id -> Nullable<Int8>,
redirect_id -> Nullable<Uuid>,
@@ -163,7 +156,6 @@ table! {
table! {
release_rev (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
work_ident_id -> Uuid,
container_ident_id -> Nullable<Uuid>,
title -> Text,
@@ -180,7 +172,6 @@ table! {
table! {
work_edit (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
ident_id -> Uuid,
rev_id -> Nullable<Int8>,
redirect_id -> Nullable<Uuid>,
@@ -200,7 +191,6 @@ table! {
table! {
work_rev (id) {
id -> Int8,
- extra_json -> Nullable<Json>,
work_type -> Nullable<Text>,
primary_release_id -> Nullable<Uuid>,
}