<?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="experience_level-table">
        <createTable tableName="experience_level">
            <column name="level" type="INTEGER">
                <constraints nullable="false" primaryKey="true" primaryKeyName="experience_level_pkey"/>
            </column>
            <column name="created" type="TIMESTAMP WITHOUT TIME ZONE">
                <constraints nullable="false"/>
            </column>
            <column name="updated" type="TIMESTAMP WITHOUT TIME ZONE"/>
            <column name="experience_needed" type="BIGINT">
                <constraints nullable="false"/>
            </column>
        </createTable>
        <sql>
            DROP TRIGGER IF EXISTS experience_level_update_trigger ON experience_level;
            CREATE TRIGGER experience_level_update_trigger BEFORE UPDATE ON experience_level FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
        </sql>
        <sql>
            DROP TRIGGER IF EXISTS experience_level_insert_trigger ON experience_level;
            CREATE TRIGGER experience_level_insert_trigger BEFORE INSERT ON experience_level FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
        </sql>
    </changeSet>

</databaseChangeLog>