Hi everyone,
In Oracle, you can create a partitioned table like below:
- CREATE TABLE FOO(ID NUMBER(10)) PARTITION BY RANGE (ID) INTERVAL (1);
Oracle XE does not allow to use partitioning so the same table should look like:
- CREATE TABLE FOO(ID NUMBER(10));
I tried creating the following script:
- <changeSet id="TBL_FOO">
- <createTable remarks="Table comments" tableName="FOO">
- <column name="ID" type="NUMBER(10)"/>
- </createTable>
- <modifySql context="nonxe">
- <append value="PARTITION BY RANGE (ID) INTERVAL (1)"/>
- </modifySql>
- </changeSet>
However, Liquibase creates two statements for the above script and appends the partition clause to the COMMENT statement, which breaks the build.
- CREATE TABLE...;
- COMMENT ON TABLE FOO IS ".....";PARTITION BY RANGE (ID) INTERVAL (1)
Is there a nice way (e.g. not using replaceRegExp with "CREATE TABLE (.*);" and backreferences) to achieve the correct behavior?
PS: In fact, this problem is not tied to XE/nonXE differences. Even if you simply want to create an Oracle partitioned table with comment, you face that behavior.