Matthias Andreas Benkard | d5498fc | 2020-08-23 21:51:00 +0200 | [diff] [blame] | 1 | <?xml version="1.1" encoding="UTF-8" standalone="no"?> |
| 2 | <databaseChangeLog |
| 3 | xmlns="http://www.liquibase.org/xml/ns/dbchangelog" |
| 4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 5 | xsi:schemaLocation=" |
| 6 | http://www.liquibase.org/xml/ns/dbchangelog |
| 7 | http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd"> |
| 8 | |
| 9 | <changeSet author="mulk" id="1.3-1"> |
| 10 | <createTable tableName="lazychat_message_texts" schemaName="benki"> |
| 11 | <column name="lazychat_message" type="integer"> |
| 12 | <constraints |
| 13 | nullable="false" |
| 14 | primaryKeyName="lazychat_message_texts_pkey" |
| 15 | primaryKey="true" |
| 16 | foreignKeyName="lazychat_message_texts_lazychat_message_fkey" |
| 17 | referencedTableSchemaName="benki" |
| 18 | referencedTableName="lazychat_messages" |
| 19 | referencedColumnNames="id"/> |
| 20 | </column> |
| 21 | |
| 22 | <column name="language" type="varchar"> |
| 23 | <constraints |
| 24 | nullable="false" |
| 25 | primaryKeyName="lazychat_message_texts_pkey" |
| 26 | primaryKey="true" |
| 27 | checkConstraint="IN ('', 'de', 'en', 'fr', 'ja', 'la')"/> |
| 28 | </column> |
| 29 | |
| 30 | <column name="content" type="varchar"> |
| 31 | <constraints nullable="false"/> |
| 32 | </column> |
| 33 | </createTable> |
| 34 | |
| 35 | <sql> |
| 36 | insert into benki.lazychat_message_texts(lazychat_message, language, content) |
| 37 | select id, '', content from benki.lazychat_messages; |
| 38 | </sql> |
| 39 | |
| 40 | <dropColumn tableName="lazychat_messages" schemaName="benki"> |
| 41 | <column name="content"/> |
| 42 | </dropColumn> |
| 43 | |
| 44 | <createTable tableName="bookmark_texts" schemaName="benki"> |
| 45 | <column name="bookmark" type="integer"> |
| 46 | <constraints |
| 47 | nullable="false" |
| 48 | primaryKeyName="bookmark_texts_pkey" |
| 49 | primaryKey="true" |
| 50 | foreignKeyName="bookmark_texts_bookmark_fkey" |
| 51 | referencedTableSchemaName="benki" |
| 52 | referencedTableName="bookmarks" |
| 53 | referencedColumnNames="id"/> |
| 54 | </column> |
| 55 | |
| 56 | <column name="language" type="varchar"> |
| 57 | <constraints |
| 58 | nullable="false" |
| 59 | primaryKeyName="bookmark_texts_pkey" |
| 60 | primaryKey="true" |
| 61 | checkConstraint="IN ('', 'de', 'en', 'fr', 'ja', 'la')"/> |
| 62 | </column> |
| 63 | |
| 64 | <column name="title" type="varchar"/> |
| 65 | <column name="description" type="varchar"/> |
| 66 | </createTable> |
| 67 | |
| 68 | <sql> |
| 69 | insert into benki.bookmark_texts(bookmark, language, title, description) |
| 70 | select id, '', title, description from benki.bookmarks; |
| 71 | </sql> |
| 72 | |
| 73 | <dropColumn tableName="bookmarks" schemaName="benki"> |
| 74 | <column name="title"/> |
| 75 | <column name="description"/> |
| 76 | </dropColumn> |
| 77 | </changeSet> |
| 78 | |
| 79 | </databaseChangeLog> |