<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
                      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">

  <changeSet id="0001" author="gulnaz">
    <comment>create failed_auth table</comment>
    <sql>
      CREATE TABLE IF NOT EXISTS auth.failed_auth (
      id VARCHAR(128) NOT NULL PRIMARY KEY,
      user_id VARCHAR(128) NOT NULL,
      datetime timestamp without time zone
      );

      ALTER TABLE auth.failed_auth OWNER TO ervu_business_metrics;

      COMMENT ON TABLE auth.failed_auth IS 'События неуспешной аутентификации';
      COMMENT ON COLUMN auth.failed_auth.id IS 'Идентификатор события';
      COMMENT ON COLUMN auth.failed_auth.user_id IS 'Идентификатор пользователя';
      COMMENT ON COLUMN auth.failed_auth.datetime IS 'Дата и время события';
    </sql>
  </changeSet>
</databaseChangeLog>
