Skip to content

Commit

Permalink
remove flyway merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Mar 5, 2025
1 parent 4384ef0 commit f3005a3
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/main/resources/db/migration/V6.5.0.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,3 @@ UPDATE license SET
scheme_uri = 'https://spdx.org/licenses/',
language_code = 'en'
WHERE uri = 'https://opensource.org/licenses/MIT';
-- Add deaccessionnote column
--

ALTER TABLE datasetversion ADD COLUMN IF NOT EXISTS deaccessionnote VARCHAR(1000);

-- Update deaccessionnote for existing datasetversions
--

UPDATE datasetversion set deaccessionnote = versionnote;
UPDATE datasetversion set versionnote = null;

-- Move/merge archivenote contents and remove archivenote column (on existing DBs that have this column)
DO $$
BEGIN
IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'datasetversion' AND COLUMN_NAME = 'archivenote') THEN
UPDATE datasetversion set deaccessionlink = CONCAT_WS(' ', deaccessionlink, archivenote);
ALTER TABLE datasetversion DROP COLUMN archivenote;
END IF;
END
$$

0 comments on commit f3005a3

Please sign in to comment.