<?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="modmailModule" value="(SELECT id FROM module WHERE name = 'modmail')"/>
    <property name="modmailFeature" value="(SELECT id FROM feature WHERE key = 'modmail')"/>

    <changeSet  author="Sheldan"  id="modmail_modMail-commands">
        <insert tableName="command">
            <column name="name" value="anonReply"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="close"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="closeSilently"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="contact"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="removeModMailRole"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="reply"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setModMailCategory"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="setModMailRole"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="subscribe"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
        <insert tableName="command">
            <column name="name" value="unSubscribe"/>
            <column name="module_id" valueComputed="${modmailModule}"/>
            <column name="feature_id" valueComputed="${modmailFeature}"/>
        </insert>
    </changeSet>

</databaseChangeLog>