<?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" >
    <changeSet author="Sheldan"  id="server-table">
        <createTable tableName="server">
            <column name="id" type="BIGINT">
                <constraints nullable="false" primaryKey="true" primaryKeyName="server_pkey"/>
            </column>
            <column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
                <constraints nullable="true"/>
            </column>
            <column name="admin_mode" type="BOOLEAN">
                <constraints nullable="false"/>
            </column>
            <column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
        </createTable>
        <sql>
            DROP TRIGGER IF EXISTS server_update_trigger ON server;
            CREATE TRIGGER server_update_trigger BEFORE UPDATE ON server FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
        </sql>
        <sql>
            DROP TRIGGER IF EXISTS server_insert_trigger ON server;
            CREATE TRIGGER server_insert_trigger BEFORE INSERT ON server FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
        </sql>
    </changeSet>

</databaseChangeLog>