-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathliquibase-rename-helper-tables-18x.xml
36 lines (31 loc) · 1.59 KB
/
liquibase-rename-helper-tables-18x.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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<!-- Liquibase 1.9.x is used in OpenMRS 1.8.x. (was upgraded to 2.0 in OpenMRS 1.9)
Liquibase 1.9.x has a bug where it doesn't register the custom table names we
use for the DATABASECHANGELOG(LOCK) tables. The demo dataset uses liquibasechangelog(lock)
but in order for the demo db to be upgraded by maven the tables need to be named
DATABASECHANGELOG and then named back before openmrs starts.
-->
<changeSet id="20111202-1602-18x" author="standalone" dbms="mysql">
<comment>Renaming liquibase helper tables to the standard openmrs names</comment>
<renameTable newTableName="liquibasechangelog" oldTableName="DATABASECHANGELOG"/>
<!-- create temporary tables for liquibase to write this change to, otherwise it fails -->
<sql>
CREATE TABLE `DATABASECHANGELOG` (
`ID` varchar(63) NOT NULL,
`AUTHOR` varchar(63) NOT NULL,
`FILENAME` varchar(200) NOT NULL,
`DATEEXECUTED` datetime NOT NULL,
`MD5SUM` varchar(32) DEFAULT NULL,
`DESCRIPTION` varchar(255) DEFAULT NULL,
`COMMENTS` varchar(255) DEFAULT NULL,
`TAG` varchar(255) DEFAULT NULL,
`LIQUIBASE` varchar(10) DEFAULT NULL,
PRIMARY KEY (`ID`,`AUTHOR`,`FILENAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
</databaseChangeLog>