
liquibase.harness.change.changelogs.cockroachdb.addPrimaryKey.xml Maven / Gradle / Ivy
The newest version!
<?xml version="1.0" encoding="UTF-8"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"> <!-- No way to drop added PK in crdb, so need to override default changelog by creating another table https://go.crdb.dev/issue-v/48026/v21.2--> <changeSet author="oleh" id="1"> <createTable tableName="primaryKeyTest"> <column name="test_id" type="int"> <constraints nullable="false"/> </column> <column name="test_column" type="varchar(50)"/> </createTable> <rollback> <dropTable tableName="primaryKeyTest"/> </rollback> </changeSet> <changeSet author="rafiss" id="2"> <addPrimaryKey columnNames="test_id" constraintName="primary" tableName="primaryKeyTest" validate="true"/> <rollback/> </changeSet> </databaseChangeLog>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy