
liquibase.harness.change.changelogs.snowflake.addForeignKey.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"> <!-- onDelete and onUpdate actions are not really supported, as they aren’t enforced. Also statement that create foreign key with these attributes silently fail unless ALTER ACCOUNT SET UNSUPPORTED_DDL_ACTION = FAIL; https://docs.snowflake.com/en/sql-reference/constraints-properties.html https://stackoverflow.com/questions/70802811/snowflake-foreign-keys-arent-created-when-using-on-update-on-delete-actions --> <changeSet author="oleh" id="1"> <addForeignKeyConstraint baseColumnNames="author_id" baseTableName="posts" constraintName="fk_posts_authors_test" referencedColumnNames="id" referencedTableName="authors" validate="true"/> <rollback> <dropForeignKeyConstraint baseTableName="posts" constraintName="fk_posts_authors_test"/> </rollback> </changeSet> </databaseChangeLog>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy