aboutsummaryrefslogtreecommitdiffstats
path: root/rust/migrations/2018-05-12-001226_init
diff options
context:
space:
mode:
Diffstat (limited to 'rust/migrations/2018-05-12-001226_init')
-rw-r--r--rust/migrations/2018-05-12-001226_init/down.sql2
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql4
2 files changed, 5 insertions, 1 deletions
diff --git a/rust/migrations/2018-05-12-001226_init/down.sql b/rust/migrations/2018-05-12-001226_init/down.sql
index 3f796db6..7667d122 100644
--- a/rust/migrations/2018-05-12-001226_init/down.sql
+++ b/rust/migrations/2018-05-12-001226_init/down.sql
@@ -31,3 +31,5 @@ DROP TABLE IF EXISTS abstracts CASCADE;
DROP TABLE IF EXISTS editor CASCADE;
DROP TABLE IF EXISTS editgroup CASCADE;
DROP TABLE IF EXISTS changelog CASCADE;
+
+DROP SEQUENCE IF EXISTS changelog_seq CASCADE;
diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index 6b0e9c6e..3ca954ca 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -30,8 +30,10 @@ ALTER TABLE editor
ADD CONSTRAINT editor_editgroupid_fkey FOREIGN KEY (active_editgroup_id)
REFERENCES editgroup(id);
+CREATE SEQUENCE changelog_seq START 1 INCREMENT 1;
+
CREATE TABLE changelog (
- id BIGSERIAL PRIMARY KEY,
+ id BIGINT PRIMARY KEY DEFAULT nextval('changelog_seq'),
editgroup_id UUID REFERENCES editgroup(id) NOT NULL,
timestamp TIMESTAMP WITHOUT TIME ZONE DEFAULT now() NOT NULL
);