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

  <changeSet id="create-table-shedlock" author="a.khakimullin">
    <comment>add table for jobs sync by locking</comment>
    <createTable tableName="shedlock">
      <column name="name" type="varchar(255)">
        <constraints primaryKey="true" primaryKeyName="shedlock_pk"/>
      </column>
      <column name="lock_until" type="timestamp without time zone"/>
      <column name="locked_at" type="timestamp without time zone"/>
      <column name="locked_by" type="varchar(255)"/>
    </createTable>
  </changeSet>
</databaseChangeLog>
