Created
October 11, 2019 11:10
-
-
Save serverhorror/f1849d8cefb725d227e2c84d8630e364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SEQUENCE REVISION_SEQ | |
START WITH 1 | |
INCREMENT BY 1 | |
; | |
CREATE TABLE REVISION | |
( | |
REVISION_NR BIGINT NOT NULL , | |
CREATED_AT TIMESTAMP WITH TIME ZONE , | |
CREATED_BY UUID NOT NULL , | |
CREATING_ACTION VARCHAR (10) | |
); | |
ALTER TABLE REVISION | |
ADD CONSTRAINT REVISIONS_PK PRIMARY KEY ( REVISION_NR ); | |
insert into revision (revision_nr, created_at, created_by, creating_action) select NEXTVAL('REVISION_SEQ'), CURRENT_TIMESTAMP, 'setup', null ; | |
insert into revision (revision_nr, created_at, created_by, creating_action) values (9223372036854775807, CURRENT_TIMESTAMP, 'setup', null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment