A couple options:
- You could create a subclass of the MySqlDatabase class and override
the getClobType() method.  You can pass the databaseClassName into
liquibase.
- You could also specify the type as a parameter: <column
type="${clobType}"/> and then pass the value into liquibase.

I would think that either option would be easier than having to use
contexts because contexts would require you to duplicate your changesets
except for the clob type.  If there aren't a lot of tables being
created, however, the context (or "dbms" attribute) route may be the
easiest. 

Nathan

-----Original Message-----
From: David C. Hicks [mailto:dhi...@i-hicks.org] 
Sent: Monday, March 16, 2009 11:01 AM
To: Liquibase Users
Subject: [Liquibase-user] CLOB vs. LONGTEXT

Hi folks,

Making some headway on setting up in-memory, test databases, but I've 
encountered a "type" problem.  We currently define a couple of columns 
as the type LONGTEXT, because we anticipate storing really large strings

of data.  If I understood my reading of the Liquibase docs, it is 
preferred to use CLOB in order to keep the XML compatible across 
multiple databases.  Unfortunately, CLOB creates a regular TEXT field in

MySQL, thus reducing the size to 64k - yes, our data could be larger 
than that.

So, I'm wondering if there is a good way to handle this?  Perhaps this 
is another good use of the "context" attribute on a changeset - so that 
one datatype is used for production and another is used for testing?  
While not ideal, it would work.  I just wanted to try to get a "best 
practice" opinion.

Thanks,
Dave


------------------------------------------------------------------------
------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based
development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Liquibase-user mailing list
Liquibase-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/liquibase-user

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Liquibase-user mailing list
Liquibase-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/liquibase-user

Reply via email to