Matthias Andreas Benkard | 67c6067 | 2021-01-30 14:43:39 +0100 | [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.8-1"> |
| 10 | <sql> |
| 11 | CREATE TYPE benki.post_scope AS ENUM ('top_level', 'comment'); |
| 12 | </sql> |
| 13 | </changeSet> |
| 14 | |
| 15 | <changeSet author="mulk" id="1.8-2"> |
| 16 | <addColumn tableName="bookmarks" schemaName="benki"> |
| 17 | <column name="scope" type="benki.post_scope" defaultValue="top_level"> |
| 18 | <constraints nullable="false"/> |
| 19 | </column> |
| 20 | </addColumn> |
| 21 | |
| 22 | <addColumn tableName="lazychat_messages" schemaName="benki"> |
| 23 | <column name="scope" type="benki.post_scope" defaultValue="top_level"> |
| 24 | <constraints nullable="false"/> |
| 25 | </column> |
| 26 | </addColumn> |
| 27 | |
| 28 | <addColumn tableName="posts" schemaName="benki"> |
| 29 | <column name="scope" type="benki.post_scope" defaultValue="top_level"> |
| 30 | <constraints nullable="false"/> |
| 31 | </column> |
| 32 | </addColumn> |
| 33 | |
| 34 | <createIndex tableName="posts" |
| 35 | schemaName="benki" |
| 36 | indexName="post_scope_id_idx"> |
| 37 | <column name="scope"/> |
| 38 | <column name="id"/> |
| 39 | </createIndex> |
| 40 | </changeSet> |
| 41 | |
| 42 | <changeSet id="1.8-3" author="mulk"> |
| 43 | <createIndex tableName="bookmarks" |
| 44 | schemaName="benki" |
| 45 | indexName="bookmarks_scope_id_idx"> |
| 46 | <column name="scope"/> |
| 47 | <column name="id"/> |
| 48 | </createIndex> |
| 49 | |
| 50 | <createIndex tableName="lazychat_messages" |
| 51 | schemaName="benki" |
| 52 | indexName="lazychat_messages_scope_id_idx"> |
| 53 | <column name="scope"/> |
| 54 | <column name="id"/> |
| 55 | </createIndex> |
| 56 | </changeSet> |
| 57 | |
Matthias Andreas Benkard | 2f931de | 2021-06-28 20:56:50 +0200 | [diff] [blame] | 58 | <changeSet id="1.8-4" author="mulk"> |
| 59 | <sql> |
| 60 | ALTER TABLE benki.role_tags DROP CONSTRAINT role_tags_tag_check; |
| 61 | ALTER TABLE benki.role_tags ADD CONSTRAINT role_tags_tag_check CHECK (tag = ANY(ARRAY['admin', 'everyone', 'world', 'editor'])); |
| 62 | </sql> |
| 63 | </changeSet> |
| 64 | |
Matthias Andreas Benkard | 67c6067 | 2021-01-30 14:43:39 +0100 | [diff] [blame] | 65 | </databaseChangeLog> |