Discussion:
[Liquibase-user] New Topic: Postgres with type="LONGTEXT" and best practice for supporting multiple database
Liquibase Community Forum
2010-09-25 18:56:47 UTC
Permalink
A new topic, 'Postgres with type="LONGTEXT" and best practice for supporting multiple database', has been made on a board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=712.new#new

The text of the topic is shown below:

I have a changeSet generated from a MySQL database. A column of one table is of type="LONGTEXT" which I understand allows text up to length 2^32 characters. Running this changeSet on a PostgreSQL database fails with the error 'type "longtext" does not exist'. According to Postgres docs, type="TEXT" is of unlimited length and thus would be a good fit for "LONGTEXT". (http://www.postgresql.org/docs/8.2/interactive/datatype-character.html).

I expected Liquibase to know enough to map type="LONGTEXT" to "TEXT" when applying to a Postgres database. Apparently this is not the case. Am I misunderstanding the goals of Liquibase? I'd like to maintain a single group of changelogs and be able to apply it to different types of databases. Is the best practice to maintain a separate line of changes for every database supported by my application? Or a primary line with some alternate changeSets configured with appropriate preconditions?

Thanks.

Unsubscribe to new topics from this board by clicking here: http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The Liquibase Community Forum Team.

Loading...