Commit c27bace3 authored by Tamlyn Rhodes's avatar Tamlyn Rhodes
Browse files

Use JSONB[] instead of JSONB for columns which are arrays

This is a convenience to make the schema work better with node-pg's parameter formatting.
parent b415a550
......@@ -28,11 +28,11 @@ CREATE TABLE manuscript (
decision TEXT,
"meta.title" TEXT,
"meta.article_type" TEXT,
"meta.article_ids" JSONB,
"meta.article_ids" JSONB[],
"meta.abstract" TEXT,
"meta.subjects" JSONB,
"meta.publication_dates" JSONB,
"meta.notes" JSONB
"meta.subjects" TEXT[],
"meta.publication_dates" JSONB[],
"meta.notes" JSONB[]
);
CREATE TABLE file (
......@@ -53,14 +53,14 @@ CREATE TABLE "user" (
id UUID PRIMARY KEY,
created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT current_timestamp,
updated TIMESTAMP WITH TIME ZONE,
default_identity_type TEXT
default_identity TEXT
);
CREATE TABLE review (
id UUID PRIMARY KEY,
created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT current_timestamp,
updated TIMESTAMP WITH TIME ZONE,
comments JSONB,
comments JSONB[],
recommendation TEXT,
open BOOLEAN,
user_id UUID NOT NULL REFERENCES "user"
......@@ -79,7 +79,7 @@ CREATE TABLE team (
id UUID PRIMARY KEY,
created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT current_timestamp,
updated TIMESTAMP WITH TIME ZONE,
team_members JSONB NOT NULL,
team_members JSONB[] NOT NULL,
role TEXT NOT NULL,
object_id UUID NOT NULL,
object_type TEXT NOT NULL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment