Skip to content

Commit

Permalink
check if archivenote exists
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Dec 13, 2024
1 parent ee2b1a1 commit 622024f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/resources/db/migration/V6.5.0.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ ALTER TABLE datasetversion ADD COLUMN IF NOT EXISTS deaccessionnote VARCHAR(1000
UPDATE datasetversion set deaccessionnote = versionnote;
UPDATE datasetversion set versionnote = null;

-- Move/merge archivenote contents and remove archivenote column
-- Move/merge archivenote contents and remove archivenote column (on existing DBs that have this column)
--
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'datasetversion'' AND COLUMN_NAME = 'archivenote'')

BEGIN

UPDATE datasetversion set deaccessionlink = CONCAT_WS(' ', deaccessionlink, archivenote);

ALTER TABLE datasetversion DROP COLUMN archivenote;

END

0 comments on commit 622024f

Please sign in to comment.