|
| 1 | +<?xml version="1.1" encoding="UTF-8" standalone="no"?> |
| 2 | +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-4.6.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.6.xsd"> |
| 3 | + |
| 4 | + <!-- required indexes for log_event to allow faster/more efficient sorting. --> |
| 5 | + |
| 6 | + <changeSet author="ALA Dev Team" id="1"> |
| 7 | + <preConditions onFail="MARK_RAN"> |
| 8 | + <not> |
| 9 | + <indexExists tableName="log_event" columnNames="month" /> |
| 10 | + </not> |
| 11 | + </preConditions> |
| 12 | + <createIndex indexName="month_idx" tableName="log_event"> |
| 13 | + <column name="month"/> |
| 14 | + </createIndex> |
| 15 | + </changeSet> |
| 16 | + |
| 17 | + <changeSet author="ALA Dev Team" id="2"> |
| 18 | + <preConditions onFail="MARK_RAN"> |
| 19 | + <not> |
| 20 | + <indexExists tableName="log_event" columnNames="log_event_type_id" /> |
| 21 | + </not> |
| 22 | + </preConditions> |
| 23 | + <createIndex indexName="log_event_type_id_idx" tableName="log_event"> |
| 24 | + <column name="log_event_type_id"/> |
| 25 | + </createIndex> |
| 26 | + </changeSet> |
| 27 | + |
| 28 | + <changeSet author="ALA Dev Team" id="3"> |
| 29 | + <preConditions onFail="MARK_RAN"> |
| 30 | + <not> |
| 31 | + <indexExists tableName="log_event" columnNames="log_source_type_id" /> |
| 32 | + </not> |
| 33 | + </preConditions> |
| 34 | + <createIndex indexName="log_source_type_id_idx" tableName="log_event"> |
| 35 | + <column name="log_source_type_id"/> |
| 36 | + </createIndex> |
| 37 | + </changeSet> |
| 38 | + |
| 39 | + <changeSet author="ALA Dev Team" id="4"> |
| 40 | + <preConditions onFail="MARK_RAN"> |
| 41 | + <not> |
| 42 | + <indexExists tableName="log_event" columnNames="log_reason_type_id" /> |
| 43 | + </not> |
| 44 | + </preConditions> |
| 45 | + <createIndex indexName="log_reason_type_id_idx" tableName="log_event"> |
| 46 | + <column name="log_reason_type_id"/> |
| 47 | + </createIndex> |
| 48 | + </changeSet> |
| 49 | + |
| 50 | + <changeSet author="ALA Dev Team" id="5"> |
| 51 | + <preConditions onFail="MARK_RAN"> |
| 52 | + <not> |
| 53 | + <indexExists tableName="log_event" columnNames="user_email" /> |
| 54 | + </not> |
| 55 | + </preConditions> |
| 56 | + <createIndex indexName="user_email_idx" tableName="log_event"> |
| 57 | + <column name="user_email"/> |
| 58 | + </createIndex> |
| 59 | + </changeSet> |
| 60 | + |
| 61 | + <changeSet author="ALA Dev Team" id="6"> |
| 62 | + <preConditions onFail="MARK_RAN"> |
| 63 | + <not> |
| 64 | + <indexExists tableName="log_event" columnNames="source" /> |
| 65 | + </not> |
| 66 | + </preConditions> |
| 67 | + <createIndex indexName="source_idx" tableName="log_event"> |
| 68 | + <column name="source"/> |
| 69 | + </createIndex> |
| 70 | + </changeSet> |
| 71 | + |
| 72 | + <!-- required indexes for log_detail to allow faster/more efficient sorting.--> |
| 73 | + |
| 74 | + <changeSet author="ALA Dev Team" id="7"> |
| 75 | + <preConditions onFail="MARK_RAN"> |
| 76 | + <not> |
| 77 | + <indexExists tableName="log_detail" columnNames="entity_type" /> |
| 78 | + </not> |
| 79 | + </preConditions> |
| 80 | + <createIndex indexName="entity_type_idx" tableName="log_detail"> |
| 81 | + <column name="entity_type"/> |
| 82 | + </createIndex> |
| 83 | + </changeSet> |
| 84 | + |
| 85 | + <changeSet author="ALA Dev Team" id="8"> |
| 86 | + <preConditions onFail="MARK_RAN"> |
| 87 | + <not> |
| 88 | + <indexExists tableName="log_detail" columnNames="entity_uid" /> |
| 89 | + </not> |
| 90 | + </preConditions> |
| 91 | + <createIndex indexName="entity_uid_idx" tableName="log_detail"> |
| 92 | + <column name="entity_uid"/> |
| 93 | + </createIndex> |
| 94 | + </changeSet> |
| 95 | + |
| 96 | + <changeSet author="ALA Dev Team" id="9"> |
| 97 | + <preConditions onFail="MARK_RAN"> |
| 98 | + <not> |
| 99 | + <indexExists tableName="log_detail" columnNames="record_count" /> |
| 100 | + </not> |
| 101 | + </preConditions> |
| 102 | + <createIndex indexName="record_count_idx" tableName="log_detail"> |
| 103 | + <column name="record_count"/> |
| 104 | + </createIndex> |
| 105 | + </changeSet> |
| 106 | + |
| 107 | +</databaseChangeLog> |
0 commit comments