This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
/
db.changelog-1.5.xml
181 lines (157 loc) · 6.98 KB
/
db.changelog-1.5.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet author="aeng@redhat.com" id="1">
<comment>Add table to store glossary entry</comment>
<createTable tableName="HGlossaryEntry">
<column name="id" type="bigint">
<constraints nullable="false" />
</column>
<column name="creationDate" type="DATETIME">
<constraints nullable="false" />
</column>
<column name="lastChanged" type="DATETIME">
<constraints nullable="false" />
</column>
<column name="versionNum" type="int">
<constraints nullable="false" />
</column>
</createTable>
<addPrimaryKey tableName="HGlossaryEntry" columnNames="id" />
</changeSet>
<changeSet author="aeng@redhat.com" id="2">
<comment>Add table to store glossary term</comment>
<createTable tableName="HGlossaryTerm">
<column name="id" type="bigint">
<constraints nullable="false" />
</column>
<column name="glossaryEntryId" type="bigint">
<constraints nullable="false" />
</column>
<column name="localeId" type="bigint">
<constraints nullable="false" />
</column>
<column name="content" type="longtext" />
<column name="sourceRef" type="longtext" />
<column name="creationDate" type="DATETIME">
<constraints nullable="false" />
</column>
<column name="lastChanged" type="DATETIME">
<constraints nullable="false" />
</column>
<column name="versionNum" type="int">
<constraints nullable="false" />
</column>
</createTable>
<addPrimaryKey tableName="HGlossaryTerm" columnNames="id" />
<addUniqueConstraint tableName="HGlossaryTerm"
columnNames="glossaryEntryId,localeId" constraintName="UKglossaryEntryId_LocaleId" />
<addForeignKeyConstraint baseTableName="HGlossaryTerm"
baseColumnNames="glossaryEntryId" constraintName="UKglossaryterm_glossary_entry_id"
referencedTableName="HGlossaryEntry" referencedColumnNames="id" />
<addForeignKeyConstraint baseTableName="HGlossaryTerm"
baseColumnNames="localeId" constraintName="UKglossaryterm_localeId"
referencedTableName="HLocale" referencedColumnNames="id" />
</changeSet>
<changeSet author="aeng@redhat.com" id="3">
<comment>Add table to store glossary term comment</comment>
<createTable tableName="HTermComment">
<column name="id" type="bigint">
<constraints nullable="false" />
</column>
<column name="comment" type="longtext">
<constraints nullable="false" />
</column>
<column name="pos" type="int">
<constraints nullable="false" />
</column>
<column name="glossaryTermId" type="bigint">
<constraints nullable="false" />
</column>
</createTable>
<addPrimaryKey tableName="HTermComment" columnNames="id" />
<addForeignKeyConstraint baseTableName="HTermComment"
baseColumnNames="glossaryTermId" constraintName="UKtermComment_glossaryTerm"
referencedTableName="HGlossaryTerm" referencedColumnNames="id" />
</changeSet>
<changeSet author="aeng@redhat.com" id="4">
<comment>Alter glossary entry table</comment>
<addColumn tableName="HGlossaryEntry">
<column name="srcTermId" type="bigint">
<constraints nullable="false" />
</column>
</addColumn>
<addForeignKeyConstraint baseTableName="HGlossaryEntry"
baseColumnNames="srcTermId" constraintName="UKglossaryEntry_glossaryTerm"
referencedTableName="HGlossaryTerm" referencedColumnNames="id" />
</changeSet>
<changeSet author="aeng@redhat.com" id="5">
<comment>Add obsolete column to HTermComment</comment>
<addColumn tableName="HTermComment">
<column name="obsolete" type="bit">
<constraints nullable="false" />
</column>
</addColumn>
</changeSet>
<changeSet author="aeng@redhat.com" id="6">
<comment>Alter HTermComment - removed obsolete</comment>
<dropColumn tableName="HTermComment" columnName="obsolete" />
</changeSet>
<changeSet author="aeng@redhat.com" id="7">
<validCheckSum>1484b636bf20f8a55f257622fc9f3cd</validCheckSum>
<validCheckSum>20b6eae675fc802af04aa2ad48fddc83</validCheckSum>
<comment>Alter glossary entry table - remove srcTermId/add srcLocaleId/add sourceRef</comment>
<dropForeignKeyConstraint baseTableName="HGlossaryEntry" constraintName="UKglossaryEntry_glossaryTerm" />
<dropColumn tableName="HGlossaryEntry" columnName="srcTermId" />
<addColumn tableName="HGlossaryEntry">
<column name="srcLocaleId" type="bigint">
<constraints nullable="false" />
</column>
</addColumn>
<addForeignKeyConstraint baseTableName="HGlossaryEntry"
baseColumnNames="srcLocaleId" constraintName="UKglossaryentry_srcLocaleId"
referencedTableName="HLocale" referencedColumnNames="id" />
<addColumn tableName="HGlossaryEntry">
<column name="sourceRef" type="longtext"/>
</addColumn>
</changeSet>
<changeSet author="aeng@redhat.com" id="8" dbms="mysql">
<comment>Alter glossary tables - remove sourceRef/add auto increment</comment>
<dropColumn tableName="HGlossaryTerm" columnName="sourceRef" />
<addAutoIncrement tableName="HGlossaryEntry" columnName="id" columnDataType="bigint"/>
<addAutoIncrement tableName="HGlossaryTerm" columnName="id" columnDataType="bigint"/>
<addAutoIncrement tableName="HTermComment" columnName="id" columnDataType="bigint"/>
</changeSet>
<changeSet author="aeng@redhat.com" id="8.5" dbms="h2">
<comment>Alter glossary tables - remove sourceRef/add auto increment</comment>
<dropColumn tableName="HGlossaryTerm" columnName="sourceRef" />
</changeSet>
<changeSet author="aeng@redhat.com" id="9">
<comment>Alter glossary term table - remove constraint</comment>
<dropForeignKeyConstraint baseTableName="HTermComment" constraintName="UKtermComment_glossaryTerm" />
</changeSet>
<changeSet author="aeng@redhat.com" id="10">
<comment>Add obsolete column to HProject</comment>
<addColumn tableName="HProject">
<column name="obsolete" type="boolean" defaultValueBoolean="false">
<constraints nullable="false" />
</column>
</addColumn>
</changeSet>
<changeSet author="aeng@redhat.com" id="11">
<comment>Add obsolete column to HProjectIteration</comment>
<addColumn tableName="HProjectIteration">
<column name="obsolete" type="boolean" defaultValueBoolean="false">
<constraints nullable="false" />
</column>
</addColumn>
</changeSet>
<!--
NB: Please do not add any more changesets to this file.
Any future changesets for the 1.5 branch should be added to db.changelog-1.6.xml.
-->
</databaseChangeLog>