<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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 https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
    <property name="coreFeature" value="(SELECT id FROM feature WHERE key = 'core')"/>
    <property name="helpModule" value="(SELECT id FROM module WHERE name = 'support')"/>
    <property name="utilityModule" value="(SELECT id FROM module WHERE name = 'utility')"/>
    <property name="channelsModule" value="(SELECT id FROM module WHERE name = 'channels')"/>
    <property name="configModule" value="(SELECT id FROM module WHERE name = 'config')"/>
    <changeSet  author="Sheldan"  id="core-help-commands">
        <insert tableName="command">
            <column name="name" value="help"/>
            <column name="module_id" valueComputed="${helpModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
    </changeSet>
    <changeSet author="Sheldan" id="core-utility-commands" >
        <insert tableName="command">
            <column name="name" value="ping"/>
            <column name="module_id" valueComputed="${utilityModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="echo"/>
            <column name="module_id" valueComputed="${utilityModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
    </changeSet>
    <changeSet author="Sheldan" id="core-channels-commands" >
        <insert tableName="command">
            <column name="name" value="addToChannelGroup"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="createChannelGroup"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="deleteChannelGroup"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="disableCommand"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="enableCommand"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="listChannelGroups"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="posttarget"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="removeFromChannelGroup"/>
            <column name="module_id" valueComputed="${channelsModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
    </changeSet>
    <changeSet author="Sheldan" id="core-config-commands" >
        <insert tableName="command">
            <column name="name" value="clearCache"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setConfig"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setAdminMode"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="resetConfig"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setPrefix"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setTemplate"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="getTemplate"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="resetTemplate"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="getCustomTemplate"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setupFeature"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="allow"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="allowRole"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="disableFeature"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="disAllowRole"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="enableFeature"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="features"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="makeAffected"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="makeImmune"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="restrict"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="enableMode"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="disableMode"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="featureModes"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setEmote"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="allowMention"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="disallowMention"/>
            <column name="module_id" valueComputed="${configModule}"/>
            <column name="feature_id" valueComputed="${coreFeature}"/>
        </insert>
    </changeSet>
</databaseChangeLog>