c903458be57e05ba2b17ee000b6b19186eafe229
[JavaForFun] /
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: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/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
3     <changeSet author="gustavo (generated)" id="1469119656864-1" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
4         <createTable tableName="AD">
5             <column autoIncrement="true" name="ID" type="BIGINT">
6                 <constraints primaryKey="true"/>
7             </column>
8             <column name="COMPANY_ID" type="BIGINT"/>
9             <column name="COMPANY_CATEG_ID" type="BIGINT"/>
10             <column name="AD_GPS" type="BLOB"/>
11             <column name="AD_MOBILE_IMAGE" type="VARCHAR(255)"/>
12             <column defaultValueComputed="CURRENT_TIMESTAMP" name="CREATED_AT" type="TIMESTAMP">
13                 <constraints nullable="false"/>
14             </column>
15             <column defaultValue="0000-00-00 00:00:00" name="UPDATED_AT" type="TIMESTAMP">
16                 <constraints nullable="false"/>
17             </column>
18         </createTable>
19         <modifySql dbms="mysql">
20             <append value="ENGINE=InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci"/>
21         </modifySql>
22     </changeSet>
23     <changeSet author="gustavo (generated)" id="1469119656864-2" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
24         <createTable tableName="AD_AUDITED">
25             <column name="ID" type="BIGINT">
26                 <constraints nullable="false"/>
27             </column>
28             <column name="REVISION" type="BIGINT">
29                 <constraints nullable="false"/>
30             </column>
31             <column name="REVISION_TYPE" type="TINYINT(3)"/>
32             <column name="REVISION_END" type="BIGINT"/>
33             <column name="REVISION_END_TIMESTAMP" type="datetime"/>
34             <column name="AD_MOBILE_IMAGE" type="VARCHAR(255)"/>
35             <column name="adMobileImage_MODIFIED" type="BIT(1)"/>
36             <column name="COMPANY_CATEG_ID" type="BIGINT"/>
37             <column name="companyCategId_MODIFIED" type="BIT(1)"/>
38             <column name="COMPANY_ID" type="BIGINT"/>
39             <column name="companyId_MODIFIED" type="BIT(1)"/>
40             <column name="CREATED_AT" type="datetime"/>
41             <column name="createdAt_MODIFIED" type="BIT(1)"/>
42             <column name="UPDATED_AT" type="datetime"/>
43             <column name="updatedAt_MODIFIED" type="BIT(1)"/>
44             <column name="adDescriptions_MODIFIED" type="BIT(1)"/>
45         </createTable>
46         <modifySql dbms="mysql">
47             <append value="ENGINE=InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci"/>
48         </modifySql>
49     </changeSet>
50     <changeSet author="gustavo (generated)" id="1469119656864-3" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
51         <createTable tableName="AD_DESCRIPTION">
52             <column autoIncrement="true" name="ID" type="BIGINT">
53                 <constraints primaryKey="true"/>
54             </column>
55             <column name="LANGUAGE_ID" type="BIGINT">
56                 <constraints nullable="false"/>
57             </column>
58             <column name="AD_ID" type="BIGINT"/>
59             <column name="AD_NAME" type="VARCHAR(255)">
60                 <constraints nullable="false"/>
61             </column>
62             <column name="AD_DESCRIPTION" type="LONGTEXT"/>
63             <column name="AD_MOBILE_TEXT" type="VARCHAR(500)">
64                 <constraints nullable="false"/>
65             </column>
66             <column name="AD_LINK" type="VARCHAR(3000)">
67                 <constraints nullable="false"/>
68             </column>
69         </createTable>
70         <modifySql dbms="mysql">
71             <append value="ENGINE=InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci"/>
72         </modifySql>
73     </changeSet>
74     <changeSet author="gustavo (generated)" id="1469119656864-4" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
75         <createTable tableName="AD_DESCRIPTION_AUDITED">
76             <column name="ID" type="BIGINT">
77                 <constraints nullable="false"/>
78             </column>
79             <column name="REVISION" type="BIGINT">
80                 <constraints nullable="false"/>
81             </column>
82             <column name="REVISION_TYPE" type="TINYINT(3)"/>
83             <column name="REVISION_END" type="BIGINT"/>
84             <column name="REVISION_END_TIMESTAMP" type="datetime"/>
85             <column name="AD_DESCRIPTION" type="VARCHAR(255)"/>
86             <column name="AD_LINK" type="VARCHAR(255)"/>
87             <column name="AD_MOBILE_TEXT" type="VARCHAR(255)"/>
88             <column name="AD_NAME" type="VARCHAR(255)"/>
89             <column name="LANGUAGE_ID" type="BIGINT"/>
90             <column name="AD_ID" type="BIGINT"/>
91         </createTable>
92         <modifySql dbms="mysql">
93             <append value="ENGINE=InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci"/>
94         </modifySql>
95     </changeSet>
96     <changeSet author="gustavo (generated)" id="1469119656864-5" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
97         <createTable tableName="CUSTOM_REVISION">
98             <column name="ID" type="BIGINT">
99                 <constraints nullable="false"/>
100             </column>
101             <column name="REVISION_DATE" type="BIGINT">
102                 <constraints nullable="false"/>
103             </column>
104             <column name="USERNAME" type="VARCHAR(255)"/>
105         </createTable>
106         <modifySql dbms="mysql">
107             <append value="ENGINE=InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci"/>
108         </modifySql>
109     </changeSet>
110     <changeSet author="gustavo (generated)" id="1469119656864-6" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
111         <createTable tableName="con_test">
112             <column name="a" type="CHAR(1)"/>
113         </createTable>
114     </changeSet>
115     <changeSet author="gustavo (generated)" id="1469119656864-7" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
116         <addPrimaryKey columnNames="ID, REVISION" constraintName="PRIMARY" tableName="AD_AUDITED"/>
117     </changeSet>
118     <changeSet author="gustavo (generated)" id="1469119656864-8" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
119         <addPrimaryKey columnNames="ID, REVISION" constraintName="PRIMARY" tableName="AD_DESCRIPTION_AUDITED"/>
120     </changeSet>
121     <changeSet author="gustavo (generated)" id="1469119656864-9" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
122         <addPrimaryKey columnNames="ID" constraintName="PRIMARY" tableName="CUSTOM_REVISION"/>
123     </changeSet>
124     <changeSet author="gustavo (generated)" id="1469119656864-10" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
125         <createIndex indexName="FK5kfkyp713lqaiybgbyjpjibgh" tableName="AD_DESCRIPTION">
126             <column name="AD_ID"/>
127         </createIndex>
128     </changeSet>
129     <changeSet author="gustavo (generated)" id="1469119656864-11" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
130         <createIndex indexName="FK96c2brah4r0lo3uevpptryfgc" tableName="AD_DESCRIPTION_AUDITED">
131             <column name="REVISION"/>
132         </createIndex>
133     </changeSet>
134     <changeSet author="gustavo (generated)" id="1469119656864-12" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
135         <createIndex indexName="FKdii961w5phmscfhw04iv3ur76" tableName="AD_AUDITED">
136             <column name="REVISION"/>
137         </createIndex>
138     </changeSet>
139     <changeSet author="gustavo (generated)" id="1469119656864-13" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
140         <createIndex indexName="FKgw7fxrsc46dchjriobk8ivqwx" tableName="AD_AUDITED">
141             <column name="REVISION_END"/>
142         </createIndex>
143     </changeSet>
144     <changeSet author="gustavo (generated)" id="1469119656864-14" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
145         <createIndex indexName="FKjox6d8yc1qj061bfidmu3gl4d" tableName="AD_DESCRIPTION_AUDITED">
146             <column name="REVISION_END"/>
147         </createIndex>
148     </changeSet>
149     <changeSet author="gustavo (generated)" id="1469119656864-15" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
150         <addForeignKeyConstraint baseColumnNames="AD_ID" baseTableName="AD_DESCRIPTION" constraintName="FK5kfkyp713lqaiybgbyjpjibgh" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="ID" referencedTableName="AD"/>
151     </changeSet>
152     <changeSet author="gustavo (generated)" id="1469119656864-16" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
153         <addForeignKeyConstraint baseColumnNames="REVISION" baseTableName="AD_DESCRIPTION_AUDITED" constraintName="FK96c2brah4r0lo3uevpptryfgc" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="ID" referencedTableName="CUSTOM_REVISION"/>
154     </changeSet>
155     <changeSet author="gustavo (generated)" id="1469119656864-17" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
156         <addForeignKeyConstraint baseColumnNames="REVISION" baseTableName="AD_AUDITED" constraintName="FKdii961w5phmscfhw04iv3ur76" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="ID" referencedTableName="CUSTOM_REVISION"/>
157     </changeSet>
158     <changeSet author="gustavo (generated)" id="1469119656864-18" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
159         <addForeignKeyConstraint baseColumnNames="REVISION_END" baseTableName="AD_AUDITED" constraintName="FKgw7fxrsc46dchjriobk8ivqwx" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="ID" referencedTableName="CUSTOM_REVISION"/>
160     </changeSet>
161     <changeSet author="gustavo (generated)" id="1469119656864-19" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
162         <addForeignKeyConstraint baseColumnNames="REVISION_END" baseTableName="AD_DESCRIPTION_AUDITED" constraintName="FKjox6d8yc1qj061bfidmu3gl4d" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="ID" referencedTableName="CUSTOM_REVISION"/>
163     </changeSet>
164 </databaseChangeLog>