aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:19:05 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:19:05 -0800
commit0043831b0e5f3b5e3ff7fb76cbf8fa4e3c006d70 (patch)
tree71a5aaf61af359721dfbae3f17a59cdd8abd1bd6
parent6d9bab59919352bbdd5dd354c89c95d78a8f04a2 (diff)
downloadfatcat-0043831b0e5f3b5e3ff7fb76cbf8fa4e3c006d70.tar.gz
fatcat-0043831b0e5f3b5e3ff7fb76cbf8fa4e3c006d70.zip
schemas: editor_id as UUID (not int)
-rw-r--r--fatcat-openapi2.yml46
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql14
2 files changed, 22 insertions, 38 deletions
diff --git a/fatcat-openapi2.yml b/fatcat-openapi2.yml
index eb0528d5..cfc6be99 100644
--- a/fatcat-openapi2.yml
+++ b/fatcat-openapi2.yml
@@ -414,9 +414,7 @@ definitions:
- editgroup_id
properties:
edit_id:
- type: integer
- example: 847
- format: int64
+ <<: *FATCATUUID
ident:
type: string
example: "q3nouwy3nnbsvo3h5klxsx4a7y"
@@ -792,9 +790,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -808,9 +805,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
@@ -1061,9 +1057,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -1077,9 +1072,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
@@ -1312,9 +1306,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -1328,9 +1321,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
@@ -1529,9 +1521,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -1545,9 +1536,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
@@ -1746,9 +1736,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -1762,9 +1751,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
@@ -2078,9 +2066,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -2094,9 +2081,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
@@ -2318,9 +2304,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Found Edit
@@ -2334,9 +2319,8 @@ paths:
parameters:
- name: edit_id
in: path
- type: integer
- format: int64
required: true
+ <<: *FATCATUUID
responses:
200:
description: Deleted Edit
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index eadc2e8a..22f5cca6 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -85,7 +85,7 @@ CREATE INDEX creator_ident_rev_idx ON creator_ident(rev_id);
CREATE INDEX creator_ident_redirect_idx ON creator_ident(redirect_id);
CREATE TABLE creator_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES creator_ident(id) NOT NULL,
@@ -126,7 +126,7 @@ CREATE INDEX container_ident_rev_idx ON container_ident(rev_id);
CREATE INDEX container_ident_redirect_idx ON container_ident(redirect_id);
CREATE TABLE container_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES container_ident(id) NOT NULL,
@@ -174,7 +174,7 @@ CREATE INDEX file_ident_rev_idx ON file_ident(rev_id);
CREATE INDEX file_ident_redirect_idx ON file_ident(redirect_id);
CREATE TABLE file_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES file_ident(id) NOT NULL,
@@ -223,7 +223,7 @@ CREATE TABLE fileset_ident (
CREATE INDEX fileset_ident_rev_idx ON fileset_ident(rev_id);
CREATE TABLE fileset_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES fileset_ident(id) NOT NULL,
@@ -277,7 +277,7 @@ CREATE TABLE webcapture_ident (
CREATE INDEX webcapture_ident_rev_idx ON webcapture_ident(rev_id);
CREATE TABLE webcapture_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES webcapture_ident(id) NOT NULL,
@@ -346,7 +346,7 @@ CREATE INDEX release_ident_rev_idx ON release_ident(rev_id);
CREATE INDEX release_ident_redirect_idx ON release_ident(redirect_id);
CREATE TABLE release_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES release_ident(id) NOT NULL,
@@ -374,7 +374,7 @@ CREATE INDEX work_ident_rev_idx ON work_ident(rev_id);
CREATE INDEX work_ident_redirect_idx ON work_ident(redirect_id);
CREATE TABLE work_edit (
- id BIGSERIAL PRIMARY KEY,
+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
updated TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
ident_id UUID REFERENCES work_ident(id) NOT NULL,