summaryrefslogtreecommitdiff
path: root/src/main/resources/db/changeLog-1.3.xml
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-08-23 21:51:00 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-08-27 21:09:12 +0200
commitd5498fcec7394d2b89667832853e239d5f496e1c (patch)
tree3d9d6ee6c1c175c22026059f4b44b2d954fac6d9 /src/main/resources/db/changeLog-1.3.xml
parente9b14f921cdaa0357aa58f4a72f930981b3042fb (diff)
Add localized texts to Benki post model.
Change-Id: I123cfe2ff06f85dc14c705b21d723d1c68fd2e00
Diffstat (limited to 'src/main/resources/db/changeLog-1.3.xml')
-rw-r--r--src/main/resources/db/changeLog-1.3.xml79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/main/resources/db/changeLog-1.3.xml b/src/main/resources/db/changeLog-1.3.xml
new file mode 100644
index 0000000..a0659c0
--- /dev/null
+++ b/src/main/resources/db/changeLog-1.3.xml
@@ -0,0 +1,79 @@
+<?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.3-1">
+ <createTable tableName="lazychat_message_texts" schemaName="benki">
+ <column name="lazychat_message" type="integer">
+ <constraints
+ nullable="false"
+ primaryKeyName="lazychat_message_texts_pkey"
+ primaryKey="true"
+ foreignKeyName="lazychat_message_texts_lazychat_message_fkey"
+ referencedTableSchemaName="benki"
+ referencedTableName="lazychat_messages"
+ referencedColumnNames="id"/>
+ </column>
+
+ <column name="language" type="varchar">
+ <constraints
+ nullable="false"
+ primaryKeyName="lazychat_message_texts_pkey"
+ primaryKey="true"
+ checkConstraint="IN ('', 'de', 'en', 'fr', 'ja', 'la')"/>
+ </column>
+
+ <column name="content" type="varchar">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+
+ <sql>
+ insert into benki.lazychat_message_texts(lazychat_message, language, content)
+ select id, '', content from benki.lazychat_messages;
+ </sql>
+
+ <dropColumn tableName="lazychat_messages" schemaName="benki">
+ <column name="content"/>
+ </dropColumn>
+
+ <createTable tableName="bookmark_texts" schemaName="benki">
+ <column name="bookmark" type="integer">
+ <constraints
+ nullable="false"
+ primaryKeyName="bookmark_texts_pkey"
+ primaryKey="true"
+ foreignKeyName="bookmark_texts_bookmark_fkey"
+ referencedTableSchemaName="benki"
+ referencedTableName="bookmarks"
+ referencedColumnNames="id"/>
+ </column>
+
+ <column name="language" type="varchar">
+ <constraints
+ nullable="false"
+ primaryKeyName="bookmark_texts_pkey"
+ primaryKey="true"
+ checkConstraint="IN ('', 'de', 'en', 'fr', 'ja', 'la')"/>
+ </column>
+
+ <column name="title" type="varchar"/>
+ <column name="description" type="varchar"/>
+ </createTable>
+
+ <sql>
+ insert into benki.bookmark_texts(bookmark, language, title, description)
+ select id, '', title, description from benki.bookmarks;
+ </sql>
+
+ <dropColumn tableName="bookmarks" schemaName="benki">
+ <column name="title"/>
+ <column name="description"/>
+ </dropColumn>
+ </changeSet>
+
+</databaseChangeLog>