Skip to content

Commit

Permalink
Splitt flyway script i to deler
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur93 committed Nov 27, 2023
1 parent 2066379 commit e706d4d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- Table: SIVILSTAND

alter table SIVILSTAND
rename column SIVILSTAND_TYPE to SIVILSTAND_TYPE_OLD;

ALTER TABLE SIVILSTAND
ADD COLUMN SIVILSTAND TEXT;

UPDATE SIVILSTAND
SET SIVILSTAND = 'GIFT_SAMBOER'
WHERE SIVILSTAND_TYPE_OLD = 'GIFT';

UPDATE SIVILSTAND
SET SIVILSTAND = 'BOR_ALENE_MED_BARN'
WHERE SIVILSTAND_TYPE_OLD = 'BOR_ALENE_MED_BARN';

alter table SIVILSTAND
drop column SIVILSTAND_TYPE_OLD;

drop type if exists SIVILSTAND_TYPE cascade;
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
-- Table: SIVILSTAND

alter table SIVILSTAND
rename column SIVILSTAND_TYPE to SIVILSTAND_TYPE_OLD;

ALTER TABLE SIVILSTAND
ADD COLUMN SIVILSTAND TEXT;

UPDATE SIVILSTAND
SET SIVILSTAND = 'GIFT_SAMBOER'
WHERE SIVILSTAND_TYPE_OLD = 'GIFT';

UPDATE SIVILSTAND
SET SIVILSTAND = 'BOR_ALENE_MED_BARN'
WHERE SIVILSTAND_TYPE_OLD = 'BOR_ALENE_MED_BARN';

alter table SIVILSTAND
drop column SIVILSTAND_TYPE_OLD;

drop type if exists SIVILSTAND_TYPE cascade;

-- Table: BARN_I_HUSSTAND_PERIODE
alter table BARN_I_HUSSTAND_PERIODE
add column if not exists BOSTATUS text default 'MED_FORELDER' not null;
Expand Down

0 comments on commit e706d4d

Please sign in to comment.