Re: Postgresql citext
Re: Postgresql citext
- Subject: Re: Postgresql citext
- From: David Avendasora <email@hidden>
- Date: Wed, 20 Nov 2013 09:22:32 -0500
On Nov 19, 2013, at 10:22 AM, Theodore Petrosky <email@hidden> wrote:
do your migrations without the 'special' column, then add it with SQL (assuming you have added the citext module).
ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "ALTER TABLE t_user ADD column myspecialcolumn citext”);
Also of note, if the standard Java-based migrations don’t have the features you want and you’d rather just do it all with SQL, that is even easier!
Just create an empty migration class that extends ERXMigration instead of ERXMigrationDatabase. You don’t need to add any actual code to it at all. This will tell migrations to look for a similarly-named SQL file in your project's Resources directory (anywhere in the directory, so feel free to nest it in as many directories and suits your OCD).
For example:
MigrationClassName_upgrade.migration
Or with DB-specific migrations enabled:
MigrationClassName_Database_upgrade.migration
Dave
—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™ ————————————————————————————— David Avendasora Senior Software Abuser Nekesto, Inc.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden