|
@@ -4,7 +4,8 @@
|
|
|
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-2.0.xsd">
|
|
|
+ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"
|
|
|
+ logicalFilePath="migrations.xml">
|
|
|
|
|
|
<changeSet id="1" author="moxie">
|
|
|
<createTable tableName="accounts">
|
|
@@ -118,28 +119,8 @@
|
|
|
</column>
|
|
|
</createTable>
|
|
|
|
|
|
- <createTable tableName="messages">
|
|
|
- <column name="id" type="bigint" autoIncrement="true">
|
|
|
- <constraints primaryKey="true" nullable="false"/>
|
|
|
- </column>
|
|
|
-
|
|
|
- <column name="account_id" type="bigint">
|
|
|
- <constraints nullable="false"/>
|
|
|
- </column>
|
|
|
|
|
|
- <column name="device_id" type="bigint">
|
|
|
- <constraints nullable="false"/>
|
|
|
- </column>
|
|
|
-
|
|
|
- <column name="encrypted_message" type="text">
|
|
|
- <constraints nullable="false"/>
|
|
|
- </column>
|
|
|
- </createTable>
|
|
|
|
|
|
- <createIndex tableName="messages" indexName="messages_account_and_device">
|
|
|
- <column name="account_id"/>
|
|
|
- <column name="device_id"/>
|
|
|
- </createIndex>
|
|
|
|
|
|
</changeSet>
|
|
|
|
|
@@ -171,4 +152,18 @@
|
|
|
<changeSet id="4" author="moxie">
|
|
|
<dropColumn tableName="keys" columnName="identity_key"/>
|
|
|
</changeSet>
|
|
|
+
|
|
|
+ <changeSet id="5" author="moxie">
|
|
|
+ <addColumn tableName="pending_accounts">
|
|
|
+ <column name="timestamp" type="bigint" defaultValueComputed="extract(epoch from now()) * 1000">
|
|
|
+ <constraints nullable="false"/>
|
|
|
+ </column>
|
|
|
+ </addColumn>
|
|
|
+
|
|
|
+ <addColumn tableName="pending_devices">
|
|
|
+ <column name="timestamp" type="bigint" defaultValueComputed="extract(epoch from now()) * 1000">
|
|
|
+ <constraints nullable="false"/>
|
|
|
+ </column>
|
|
|
+ </addColumn>
|
|
|
+ </changeSet>
|
|
|
</databaseChangeLog>
|