Commit 324265ab authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Liquibase: fix sequence rename

parent 2fdf4a19
Subproject commit 7a81f76fac53e140fcd83394212b153bc9de24a0
Subproject commit 30fdc5272d3244cb244166f70e24c5f2904f86d2
......@@ -42,7 +42,10 @@
</not>
</and>
</preConditions>
<renameSequence oldSequenceName="SALE_SEQ" newSequenceName="EXPECTED_SALE_SEQ"/>
<sql endDelimiter=";">
alter sequence SALE_SEQ rename to EXPECTED_SALE_SEQ;
commit;
</sql>
<createSequence sequenceName="SALE_SEQ" incrementBy="50"/>
</changeSet>
......@@ -52,19 +55,16 @@
<preConditions onFail="MARK_RAN">
<tableIsEmpty tableName="EXPECTED_SALE"/>
</preConditions>
<sql>
<sql endDelimiter=";">
insert into EXPECTED_SALE(ID, SALE_DATE, SALE_LOCATION_FK, SALE_TYPE_FK, TRIP_FK, LANDING_FK)
select S.ID, S.START_DATE_TIME, S.SALE_LOCATION_FK, S.SALE_TYPE_FK, S.TRIP_FK, null
from SALE S
where S.TRIP_FK is not null
</sql>
<sql>
select S.ID, S.START_DATE_TIME, S.SALE_LOCATION_FK, S.SALE_TYPE_FK, S.TRIP_FK, null
from SALE S
where S.TRIP_FK is not null;
update SALE_MEASUREMENT set EXPECTED_SALE_FK=SALE_FK, SALE_FK=null
where SALE_FK in (select ES.ID from EXPECTED_SALE ES)
</sql>
<sql>
where SALE_FK in (select ES.ID from EXPECTED_SALE ES);
update PRODUCT set EXPECTED_SALE_FK=SALE_FK, SALE_FK=null
where SALE_FK is (select ES.ID from EXPECTED_SALE ES)
where SALE_FK in (select ES.ID from EXPECTED_SALE ES);
commit;
</sql>
</changeSet>
......
......@@ -264,7 +264,7 @@
END_DATE_TIME="2020-10-01 12:00:00.000"
METIER_FK="23"
RECORDER_DEPARTMENT_FK="11" QUALITY_FLAG_FK="0"/>
<LANDING ID="11" TRIP_FK="11" VESSEL_FK="1" RANK_ORDER_ON_VESSEL="1" OBSERVED_LOCATION_FK="11" PROGRAM_FK="30" LANDING_DATE_TIME="2020-10-01 12:00:00.000" LANDING_LOCATION_FK="23" CREATION_DATE="2010-10-01" RECORDER_DEPARTMENT_FK="11" QUALITY_FLAG_FK="0" COMMENTS="ObservedLanding #11" RECORDER_PERSON_FK="2"/>
<LANDING ID="11" TRIP_FK="11" VESSEL_FK="1" RANK_ORDER="1" OBSERVED_LOCATION_FK="11" PROGRAM_FK="30" LANDING_DATE_TIME="2020-10-01 12:00:00.000" LANDING_LOCATION_FK="23" CREATION_DATE="2010-10-01" RECORDER_DEPARTMENT_FK="11" QUALITY_FLAG_FK="0" COMMENTS="ObservedLanding #11" RECORDER_PERSON_FK="2"/>
<LANDING_MEASUREMENT ID="21" LANDING_FK="11" PMFM_FK="136" RANK_ORDER="1" QUALITATIVE_VALUE_FK="409" UPDATE_DATE="2020-10-01" RECORDER_DEPARTMENT_FK="11" QUALITY_FLAG_FK="0"/>
<!-- PARAM BIO -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment