44 lines
2.1 KiB
XML
44 lines
2.1 KiB
XML
|
<?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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||
|
<changeSet author="al-f" id="20180405_110000-1" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
|
||
|
<createTable tableName="user_sessions">
|
||
|
<column name="id" type="INTEGER">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="version" type="INTEGER"/>
|
||
|
<column name="session_id" type="VARCHAR(255)">
|
||
|
<constraints nullable="false" unique="true"/>
|
||
|
</column>
|
||
|
<column name="ip_address" type="VARCHAR(255)">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="host" type="VARCHAR(255)">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
<column name="login_time" type="TIMESTAMP"/>
|
||
|
<column name="logout_time" type="TIMESTAMP"/>
|
||
|
<column name="user_id" type="integer">
|
||
|
<constraints nullable="false"/>
|
||
|
</column>
|
||
|
</createTable>
|
||
|
<addPrimaryKey columnNames="id" constraintName="user_sessions_pkey" tableName="user_sessions"/>
|
||
|
<addForeignKeyConstraint baseTableName="user_sessions" baseColumnNames="user_id"
|
||
|
constraintName="fk_user_sessions_users" referencedTableName="users"
|
||
|
referencedColumnNames="id"/>
|
||
|
</changeSet>
|
||
|
<changeSet author="al-f" id="20180405_110000-2">
|
||
|
<dropColumn columnName="activation_date"
|
||
|
tableName="users"/>
|
||
|
<dropColumn columnName="reset_date"
|
||
|
tableName="users"/>
|
||
|
<addColumn tableName="users">
|
||
|
<column name="activation_date" type="TIMESTAMP"/>
|
||
|
</addColumn>
|
||
|
<addColumn tableName="users">
|
||
|
<column name="reset_date" type="TIMESTAMP"/>
|
||
|
</addColumn>
|
||
|
</changeSet>
|
||
|
</databaseChangeLog>
|