Hello,

As discussed in a recent thread (“Use case for a "case insensitive equals" 
qualifier”), I want to use PostgreSQL’s CITEXT extension type on a column 
(User.username). I’d like to make the change using migrations.

Because CITEXT is an extension type, you need to create it in any database 
where you want to use it:

CREATE EXTENSION IF NOT EXISTS citext;

That’s fine: I can just call ERXJDBCUtilities.executeUpdate() in the 
appropriate migration upgrade(). However, what _seems_ to be going on is that 
EOF loads the database’s JDBC info at launch, and (because the extension hasn’t 
been created) it doesn’t seem to contain CITEXT. So, despite running CREATE 
EXTENSION in the migration, it fails because nothing is known about the 
External Type for that attribute:

JDBCAdaptorException: Unable to find type information for external type 
'citext' in attribute 'username' of entity 'User'.  Check spelling and 
capitalization.

If I create the extension manually before launching and running that migration, 
it proceeds just fine.

Am I stuck with manually creating the extension everywhere I want to deploy 
this, or is there a way to force EOF to reload the JDBC info at the appropriate 
time?


-- 
Paul Hoadley
http://logicsquad.net/



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to