Skip to content

Commit

Permalink
Consolidate flyway scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Sep 27, 2023
1 parent a887205 commit 6c7826f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
ALTER TABLE fileaccessrequests ADD COLUMN IF NOT EXISTS request_state VARCHAR(64);
ALTER TABLE fileaccessrequests ADD COLUMN IF NOT EXISTS id SERIAL;
ALTER TABLE fileaccessrequests DROP CONSTRAINT IF EXISTS fileaccessrequests_pkey;
ALTER TABLE fileaccessrequests ADD CONSTRAINT fileaccessrequests_pkey PRIMARY KEY (id);
ALTER TABLE fileaccessrequests ADD COLUMN IF NOT EXISTS guestbookresponse_id INT;
ALTER TABLE fileaccessrequests DROP CONSTRAINT IF EXISTS fk_fileaccessrequests_guestbookresponse;
ALTER TABLE fileaccessrequests ADD CONSTRAINT fk_fileaccessrequests_guestbookresponse FOREIGN KEY (guestbookresponse_id) REFERENCES guestbookresponse(id);
DROP INDEX IF EXISTS created_requests;
CREATE UNIQUE INDEX created_requests ON fileaccessrequests (datafile_id, authenticated_user_id) WHERE request_state='CREATED';

ALTER TABLE dataverse ADD COLUMN IF NOT EXISTS guestbookatrequest bool;
ALTER TABLE dataset ADD COLUMN IF NOT EXISTS guestbookatrequest bool;

ALTER TABLE guestbookresponse ADD COLUMN IF NOT EXISTS eventtype VARCHAR(255);
ALTER TABLE guestbookresponse ADD COLUMN IF NOT EXISTS sessionid VARCHAR(255);

Expand Down

0 comments on commit 6c7826f

Please sign in to comment.