what are the best practices to deal with partitioned tables in liquibase?

Hi,

I’m new to liquibase, so my question may be answered somewhere already… What are the best practices to deal with partitioned tables in liquibase? More specifically I’m talking about oracle. Oracle’s syntax for partitioned table looks like

CREATE TABLE ( … USUAL STAFF HERE… ) PARTITION BY

What I like to see is to mark somehow staff in bold as context depended. So when I create database in “test” context (singlenoded, nonclustered) all the optimization staff of the create table expression is just ignored. I don’t like the idea of having two separate create table changelogs as this would introduce place for errors…

What would be best would be to allow context= attributes in the tag.  I created a feature request for that http://liquibase.jira.com/browse/CORE-385 which I would like to get in for 2.0. 

For now, I don’t think there is any easy way to do it besides creating multiple createTable changeSets with different contexts.  You could do something with preparsing/filtering the XML but that may be too much work, depending on your environment.

Nathan

Thank you very much. I’m ‘watching’ this issue.

Originally posted by: Nathan
What would be best would be to allow context= attributes in the tag. 

What version is tag available in? Is it a sub-element of createTable? I could not find it in the manual (or have I just missed it?)

Cheers,
Christian.

Sorry, it is modifySql http://www.liquibase.org/manual/modify_sql which can take an append tag.  It is a sub-tab of changeSet.

Nathan