Open Vampire opened 3 years ago
Hi @Vampire Thanks for writing up the issue. We will add this to the list of changes that we are processing. The assumption is that this is running on an empty schema? Does Oracle xxx-7 mean Oracle 7 and xxx-12 mean Oracle 12?
No, 1 to 12 are just running number, no semantics. And no, not an empty database, but with the tables and pks existing (or non-existing) like they are named.
Hello, same issue here:
<changeSet id="${project.artifactId}-19-renamePrimaryKey" author="JDI">
<preConditions onFail="MARK_RAN">
<primaryKeyExists tableName="BODY_STRUCTURE" primaryKeyName="PK_LOCATION"/>
</preConditions>
<sql>
ALTER TABLE BODY_STRUCTURE RENAME CONSTRAINT PK_LOCATION TO PK_BODY_STRUCTURE
</sql>
</changeSet>
Error:
liquibase.exception.MigrationFailedException: Migration failed for change set db/changelog/db.changelog.xml::test-19-renamePrimaryKey::JDI:
Reason: liquibase.exception.DatabaseException: ORA-23292: La contrainte n'existe pas
[Failed SQL: (23292) ALTER TABLE BODY_STRUCTURE RENAME CONSTRAINT PK_LOCATION TO PK_BODY_STRUCTURE]
Have you made progress on this issue?
@Jukien We are going to add this back into the queue to take a deeper look at.
@molivasdat Noted
Hello some issue with liquibase 4.8.0 and Oracle 12
<changeSet author="user" id="1">
<preConditions onFail="MARK_RAN" onError="HALT">
<not>
<primaryKeyExists primaryKeyName="PK_TESTTABLE" tableName="TESTTABLE" />
</not>
</preConditions>
<dropPrimaryKey constraintName="PK_TESTTABLE" dropIndex="true" tableName="TESTTABLE"/>
</changeSet>
and even with removing the primaryKeyName attribute :
<changeSet author="user" id="1">
<preConditions onFail="MARK_RAN" onError="HALT">
<not>
<primaryKeyExists tableName="TESTTABLE" />
</not>
</preConditions>
<dropPrimaryKey constraintName="PK_TESTTABLE" dropIndex="true" tableName="TESTTABLE"/>
</changeSet>`
Any idea ?
Hello some issue with liquibase 4.8.0 and Oracle 12
<changeSet author="user" id="1"> <preConditions onFail="MARK_RAN" onError="HALT"> <not> <primaryKeyExists primaryKeyName="PK_TESTTABLE" tableName="TESTTABLE" /> </not> </preConditions> <dropPrimaryKey constraintName="PK_TESTTABLE" dropIndex="true" tableName="TESTTABLE"/> </changeSet>
and even with removing the primaryKeyName attribute :
<changeSet author="user" id="1"> <preConditions onFail="MARK_RAN" onError="HALT"> <not> <primaryKeyExists tableName="TESTTABLE" /> </not> </preConditions> <dropPrimaryKey constraintName="PK_TESTTABLE" dropIndex="true" tableName="TESTTABLE"/> </changeSet>`
Any idea ?
EDIT : my bad, was using the not condition ....
Still an issue on liquibase 4.15
.
Environment
Liquibase Version: 4.3.1
Liquibase Integration & Version: n/a
Liquibase Extension(s) & Version: n/a
Database Vendor & Version: Oracle broken, MSSQL works
Operating System Type & Version: n/a
Description
Given these change sets:
I would expect all to be marked as ran and none to fail due to the
stop
change. This works properly on MSSQL, but it fails on Oracle. On Oraclexxx-7
andxxx-12
reach thestop
change. It seems on Oracle any PK satisfies the pre-condition despite a name being specified.