Re: Set case insensitive unique index with ERXMigrations
Re: Set case insensitive unique index with ERXMigrations
- Subject: Re: Set case insensitive unique index with ERXMigrations
- From: Paul Hoadley <email@hidden>
- Date: Mon, 27 Mar 2017 10:59:13 +1030
Hi Jeff,
On 25 Mar 2017, at 04:16, Jeff Schmitz < email@hidden> wrote: Just a quick question on how to create a case insensitive unique index in an ERXMigration?
As Samuel mentioned, this is going to be database-dependent. We’ve been using PostgreSQL’s CITEXT type for a year or so now, and it works as designed. Because it’s an extension type, you need to run:
CREATE EXTENSION IF NOT EXISTS citext;
at some point—we do this in a migration upgrade(). You can then add and alter columns and add indexes in the usual way. There’s a brief discussion on performance here:
though that’s not specific to indexing that column type.
(Finally, if you are using PostgreSQL, and you do need to add this extension to an existing database during a migration, there is a small issue with the JDBC info not being available to EOF quite early enough, which is easily fixed. I can dig up the thread if you need it.)
|
_______________________________________________
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