Skip to content

Commit

Permalink
feat(bridge): Add Flyway migration for SyncRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfkaeser committed May 30, 2023
1 parent 859cb2b commit 122e462
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SEQUENCE IF NOT EXISTS bpdm_sequence START WITH 1 INCREMENT BY 1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE sync_records
(
id BIGINT NOT NULL,
uuid UUID NOT NULL,
created_at TIMESTAMP with time zone NOT NULL,
updated_at TIMESTAMP with time zone NOT NULL,
type VARCHAR(255) NOT NULL,
status VARCHAR(255) NOT NULL,
progress FLOAT NOT NULL,
count INTEGER NOT NULL,
status_details VARCHAR(255),
save_state VARCHAR(255),
started_at TIMESTAMP with time zone,
finished_at TIMESTAMP with time zone,
from_time TIMESTAMP with time zone,
CONSTRAINT pk_sync_records PRIMARY KEY (id)
);

ALTER TABLE sync_records
ADD CONSTRAINT uc_sync_records_type UNIQUE (type);

ALTER TABLE sync_records
ADD CONSTRAINT uc_sync_records_uuid UNIQUE (uuid);

0 comments on commit 122e462

Please sign in to comment.