[SIS-25] adding rss news module

updating abstracto version
This commit is contained in:
Sheldan
2023-10-29 19:00:16 +01:00
parent 0d6f71baac
commit 96d3918a4d
151 changed files with 4679 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,49 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
<property name="rssNewsFeature" value="(SELECT id FROM feature WHERE key = 'rssNews')"/>
<changeSet author="Sheldan" id="rssNewsFeature-commands">
<insert tableName="command">
<column name="name" value="createNewsCategory"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="deleteNewsCategory"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="showNewsCategories"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="createNewsCategoryChannelMapping"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="deleteNewsCategoryChannelMapping"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="createNewsCategorySubscription"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
<insert tableName="command">
<column name="name" value="deleteNewsCategorySubscription"/>
<column name="module_id" valueComputed="${utilityModule}"/>
<column name="feature_id" valueComputed="${rssNewsFeature}"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,13 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="feature.xml" relativeToChangelogFile="true"/>
<include file="command.xml" relativeToChangelogFile="true"/>
<include file="news_feed_source.xml" relativeToChangelogFile="true"/>
<include file="news_gathering_job.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,17 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_feature-insertion">
<insert tableName="feature">
<column name="key" value="orfNews"/>
</insert>
<insert tableName="feature">
<column name="key" value="rssNews"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,92 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_feed_source-initial_sources">
<insert tableName="news_feed_source">
<column name="name" value="news"/>
<column name="url" value="https://rss.orf.at/news.xml"/>
<column name="feed_type" value="RFD"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="sport"/>
<column name="url" value="https://rss.orf.at/sport.xml"/>
<column name="feed_type" value="RFD"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="help"/>
<column name="url" value="https://rss.orf.at/help.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="science"/>
<column name="url" value="https://rss.orf.at/science.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="oe3"/>
<column name="url" value="https://rss.orf.at/oe3.xml"/>
<column name="feed_type" value="RFD"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="fm4"/>
<column name="url" value="https://rss.orf.at/fm4.xml"/>
<column name="feed_type" value="RFD"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="oesterreich"/>
<column name="url" value="https://rss.orf.at/oesterreich.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="burgenland"/>
<column name="url" value="https://rss.orf.at/burgenland.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="wien"/>
<column name="url" value="https://rss.orf.at/wien.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="niederoesterreich"/>
<column name="url" value="https://rss.orf.at/noe.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="oberoesterreich"/>
<column name="url" value="https://rss.orf.at/ooe.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="salzburg"/>
<column name="url" value="https://rss.orf.at/salzburg.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="steiermark"/>
<column name="url" value="https://rss.orf.at/steiermark.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="kaernten"/>
<column name="url" value="https://rss.orf.at/kaernten.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="tirol"/>
<column name="url" value="https://rss.orf.at/tirol.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
<insert tableName="news_feed_source">
<column name="name" value="vorarlberg"/>
<column name="url" value="https://rss.orf.at/vorarlberg.xml"/>
<column name="feed_type" value="RSS"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,19 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_gathering_job-insert">
<insert tableName="scheduler_job">
<column name="name" value="newsGatheringJob"/>
<column name="group_name" value="rssNews"/>
<column name="clazz" value="dev.sheldan.sissi.module.rssnews.orf.job.NewsPostGatherJob"/>
<column name="active" value="true"/>
<column name="cron_expression" value="0 */10 * * * ?"/>
<column name="recovery" value="false"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,62 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_category-table">
<createTable tableName="news_category">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints nullable="false"/>
</column>
<column name="key" type="VARCHAR(128)">
<constraints nullable="false"/>
</column>
<column name="enabled" type="BOOLEAN">
<constraints nullable="false"/>
</column>
<column name="server_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addUniqueConstraint columnNames="key, server_id"
constraintName="uc_news_category"
disabled="false"
tableName="news_category"/>
<addPrimaryKey columnNames="id" tableName="news_category" constraintName="pk_news_category" validate="true"/>
<addForeignKeyConstraint baseColumnNames="server_id" baseTableName="news_category" constraintName="fk_news_category_server"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="server" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS news_category_update_trigger ON news_category;
CREATE TRIGGER news_category_update_trigger BEFORE UPDATE ON news_category FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS news_category_insert_trigger ON news_category;
CREATE TRIGGER news_category_insert_trigger BEFORE INSERT ON news_category FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
<changeSet author="Sheldan" id="news_category_in_news_feed_source_category-table">
<createTable tableName="news_category_in_news_feed_source_category">
<column name="server_category_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="source_category_id" type="BIGINT">
<constraints nullable="false"/>
</column>
</createTable>
<addForeignKeyConstraint baseColumnNames="server_category_id" baseTableName="news_category_in_news_feed_source_category"
constraintName="fk_news_category_in_news_feed_source_category_server_category" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id" referencedTableName="news_category"
validate="true"/>
<addForeignKeyConstraint baseColumnNames="source_category_id" baseTableName="news_category_in_news_feed_source_category"
constraintName="fk_news_category_in_news_feed_source_category_server_category_source_category" deferrable="false"
initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="id"
referencedTableName="news_feed_source_category" validate="true"/>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,53 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_category_channel_mapping-table">
<createTable tableName="news_category_channel_mapping">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints nullable="false"/>
</column>
<column name="enabled" type="BOOLEAN">
<constraints nullable="false"/>
</column>
<column name="server_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="channel_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="category_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addUniqueConstraint columnNames="server_id, channel_id, category_id"
constraintName="uc_news_category_channel_mapping"
disabled="false"
tableName="news_category_channel_mapping"/>
<addPrimaryKey columnNames="id" tableName="news_category_channel_mapping" constraintName="pk_news_category_channel_mapping" validate="true"/>
<addForeignKeyConstraint baseColumnNames="server_id" baseTableName="news_category_channel_mapping" constraintName="fk_news_category_channel_mapping_server"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="server" validate="true"/>
<addForeignKeyConstraint baseColumnNames="channel_id" baseTableName="news_category_channel_mapping" constraintName="fk_news_category_channel_mapping_channel"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="channel" validate="true"/>
<addForeignKeyConstraint baseColumnNames="category_id" baseTableName="news_category_channel_mapping" constraintName="fk_news_category_channel_mapping_news_category"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="news_category" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS news_category_channel_mapping_update_trigger ON news_category_channel_mapping;
CREATE TRIGGER news_category_channel_mapping_update_trigger BEFORE UPDATE ON news_category_channel_mapping FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS news_category_channel_mapping_insert_trigger ON news_category_channel_mapping;
CREATE TRIGGER news_category_channel_mapping_insert_trigger BEFORE INSERT ON news_category_channel_mapping FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,42 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_feed_record-table">
<createTable tableName="news_feed_record">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints nullable="false"/>
</column>
<column name="url" type="VARCHAR(128)">
<constraints nullable="false"/>
</column>
<column name="source_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addUniqueConstraint columnNames="url, source_id"
constraintName="uc_news_feed_record"
disabled="false"
tableName="news_feed_record"/>
<addPrimaryKey columnNames="id" tableName="news_feed_record" constraintName="pk_news_feed_record" validate="true"/>
<addForeignKeyConstraint baseColumnNames="source_id" baseTableName="news_feed_record" constraintName="fk_news_feed_record_source"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="news_feed_source" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS news_feed_record_update_trigger ON news_feed_record;
CREATE TRIGGER news_feed_record_update_trigger BEFORE UPDATE ON news_feed_record FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS news_feed_record_insert_trigger ON news_feed_record;
CREATE TRIGGER news_feed_record_insert_trigger BEFORE INSERT ON news_feed_record FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,40 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_feed_source-table">
<createTable tableName="news_feed_source">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints nullable="false"/>
</column>
<column name="url" type="VARCHAR(255)">
<constraints nullable="false" unique="true"/>
</column>
<column name="name" type="VARCHAR(128)">
<constraints nullable="false" unique="true"/>
</column>
<column name="feed_type" type="VARCHAR(256)">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addPrimaryKey columnNames="id" tableName="news_feed_source" constraintName="pk_news_feed_source" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS news_feed_source_update_trigger ON news_feed_source;
CREATE TRIGGER news_feed_source_update_trigger BEFORE UPDATE ON news_feed_source FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS news_feed_source_insert_trigger ON news_feed_source;
CREATE TRIGGER news_feed_source_insert_trigger BEFORE INSERT ON news_feed_source FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
<sql>
ALTER TABLE news_feed_source ADD CONSTRAINT check_news_feed_source_feed_type CHECK (feed_type IN ('RFD', 'RSS'));
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,41 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_feed_source_category-table">
<createTable tableName="news_feed_source_category">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints nullable="false"/>
</column>
<column name="name" type="VARCHAR(128)">
<constraints nullable="false"/>
</column>
<column name="source_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addUniqueConstraint columnNames="name, source_id"
constraintName="uc_news_feed_category"
disabled="false"
tableName="news_feed_source_category"/>
<addPrimaryKey columnNames="id" tableName="news_feed_source_category" constraintName="pk_news_feed_source_category" validate="true"/>
<addForeignKeyConstraint baseColumnNames="source_id" baseTableName="news_feed_source_category" constraintName="fk_news_feed_source_category_news_feed_source"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="news_feed_source" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS news_feed_source_category_update_trigger ON news_feed_source_category;
CREATE TRIGGER news_feed_source_category_update_trigger BEFORE UPDATE ON news_feed_source_category FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS news_feed_source_category_insert_trigger ON news_feed_source_category;
CREATE TRIGGER news_feed_source_category_insert_trigger BEFORE INSERT ON news_feed_source_category FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,49 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<changeSet author="Sheldan" id="news_post-table">
<createTable tableName="news_post">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints nullable="false"/>
</column>
<column name="url" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="channel_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="server_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="news_category_channel_mapping_id" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="created" type="TIMESTAMP WITHOUT TIME ZONE"/>
<column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
</createTable>
<addPrimaryKey columnNames="id" tableName="news_post" constraintName="pk_news_post" validate="true"/>
<addForeignKeyConstraint baseColumnNames="channel_id" baseTableName="news_post" constraintName="fk_news_post_channel"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="channel" validate="true"/>
<addForeignKeyConstraint baseColumnNames="server_id" baseTableName="news_post" constraintName="fk_news_post_server"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="server" validate="true"/>
<addForeignKeyConstraint baseColumnNames="news_category_channel_mapping_id" baseTableName="news_post" constraintName="fk_news_post_news_category_channel_mapping"
deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION"
referencedColumnNames="id" referencedTableName="news_category_channel_mapping" validate="true"/>
<sql>
DROP TRIGGER IF EXISTS news_post_update_trigger ON news_post;
CREATE TRIGGER news_post_update_trigger BEFORE UPDATE ON news_post FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
</sql>
<sql>
DROP TRIGGER IF EXISTS news_post_insert_trigger ON news_post;
CREATE TRIGGER news_post_insert_trigger BEFORE INSERT ON news_post FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
</sql>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,15 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="news_feed_source.xml" relativeToChangelogFile="true"/>
<include file="news_feed_source_category.xml" relativeToChangelogFile="true"/>
<include file="news_feed_record.xml" relativeToChangelogFile="true"/>
<include file="news_category.xml" relativeToChangelogFile="true"/>
<include file="news_category_channel_mapping.xml" relativeToChangelogFile="true"/>
<include file="news_post.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext dbchangelog.xsd
http://www.liquibase.org/xml/ns/pro dbchangelog.xsd" >
<include file="1.4.19/collection.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View File

@@ -0,0 +1,5 @@
abstracto.featureFlags.orfNews.featureName=orfNews
abstracto.featureFlags.orfNews.enabled=false
abstracto.featureFlags.rssNews.featureName=rssNews
abstracto.featureFlags.rssNews.enabled=false