mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
make sure statuses are unique
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
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-3.0.xsd">
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
|
||||||
|
|
||||||
<changeSet author="athou" id="change-entries-model">
|
<changeSet author="athou" id="change-entries-model">
|
||||||
@@ -14,8 +13,7 @@
|
|||||||
<constraints nullable="false" />
|
<constraints nullable="false" />
|
||||||
</column>
|
</column>
|
||||||
</addColumn>
|
</addColumn>
|
||||||
<addForeignKeyConstraint constraintName="fk_feed_id"
|
<addForeignKeyConstraint constraintName="fk_feed_id" baseTableName="FEEDENTRIES" baseColumnNames="feed_id"
|
||||||
baseTableName="FEEDENTRIES" baseColumnNames="feed_id"
|
|
||||||
referencedTableName="FEEDS" referencedColumnNames="id" />
|
referencedTableName="FEEDS" referencedColumnNames="id" />
|
||||||
<createIndex tableName="FEEDENTRIES" indexName="feed_updated_index">
|
<createIndex tableName="FEEDENTRIES" indexName="feed_updated_index">
|
||||||
<column name="feed_id" />
|
<column name="feed_id" />
|
||||||
@@ -135,4 +133,18 @@
|
|||||||
</createIndex>
|
</createIndex>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet author="athou" id="enforce-status-uniqueness">
|
||||||
|
<createIndex tableName="FEEDENTRYSTATUSES" indexName="entry_subscription_id" unique="true">
|
||||||
|
<column name="entry_id" />
|
||||||
|
<column name="subscription_id" />
|
||||||
|
</createIndex>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet author="athou" id="drop-previous-index">
|
||||||
|
<preConditions onFail="MARK_RAN" onFailMessage="no index, skipping">
|
||||||
|
<indexExists tableName="FEEDENTRYSTATUSES" indexName="FKD6DCE994F46A5555" />
|
||||||
|
</preConditions>
|
||||||
|
<dropIndex tableName="FEEDENTRYSTATUSES" indexName="FKD6DCE994F46A5555" />
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|||||||
Reference in New Issue
Block a user