summaryrefslogtreecommitdiff
path: root/src/main/resources/db/changeLog-1.7.xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/db/changeLog-1.7.xml')
-rw-r--r--src/main/resources/db/changeLog-1.7.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/main/resources/db/changeLog-1.7.xml b/src/main/resources/db/changeLog-1.7.xml
new file mode 100644
index 0000000..8824115
--- /dev/null
+++ b/src/main/resources/db/changeLog-1.7.xml
@@ -0,0 +1,55 @@
+<?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.10.xsd">
+
+ <changeSet author="mulk" id="1.7-1">
+ <createTable tableName="newsletters" schemaName="benki">
+ <column name="id" type="INTEGER">
+ <constraints primaryKeyName="newsletters_pkey" nullable="false" primaryKey="true"/>
+ </column>
+
+ <column name="date" type="TIMESTAMP WITH TIME ZONE">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+
+ <addColumn tableName="bookmarks" schemaName="benki">
+ <column name="newsletter" type="INTEGER">
+ <constraints foreignKeyName="bookmarks_newsletter_fkey" references="benki.newsletters(id)"/>
+ </column>
+ </addColumn>
+
+ <addColumn tableName="lazychat_messages" schemaName="benki">
+ <column name="newsletter" type="INTEGER">
+ <constraints foreignKeyName="lazychat_messages_newsletter_fkey" references="benki.newsletters(id)"/>
+ </column>
+ </addColumn>
+
+ <addColumn tableName="posts" schemaName="benki">
+ <column name="newsletter" type="INTEGER">
+ <constraints foreignKeyName="posts_newsletter_fkey" references="benki.newsletters(id)"/>
+ </column>
+ </addColumn>
+ </changeSet>
+
+ <changeSet author="mulk" id="1.7-2">
+ <createTable tableName="newsletter_subscriptions" schemaName="benki">
+ <column name="id" type="SERIAL" autoIncrement="true">
+ <constraints primaryKeyName="newsletter_subscriptions_pkey" nullable="false" primaryKey="true"/>
+ </column>
+
+ <column name="start_date" type="TIMESTAMP WITH TIME ZONE" defaultValue="now()">
+ <constraints nullable="false"/>
+ </column>
+
+ <column name="email" type="VARCHAR">
+ <constraints nullable="false" unique="true" uniqueConstraintName="newsletter_subscriptions_email_key"/>
+ </column>
+ </createTable>
+ </changeSet>
+
+</databaseChangeLog>