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"?>
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<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-3.0.xsd">
|
||||
|
||||
<changeSet author="athou" id="change-entries-model">
|
||||
@@ -14,8 +13,7 @@
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint constraintName="fk_feed_id"
|
||||
baseTableName="FEEDENTRIES" baseColumnNames="feed_id"
|
||||
<addForeignKeyConstraint constraintName="fk_feed_id" baseTableName="FEEDENTRIES" baseColumnNames="feed_id"
|
||||
referencedTableName="FEEDS" referencedColumnNames="id" />
|
||||
<createIndex tableName="FEEDENTRIES" indexName="feed_updated_index">
|
||||
<column name="feed_id" />
|
||||
@@ -135,4 +133,18 @@
|
||||
</createIndex>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user