From: David A. <web...@av...> - 2008-08-22 17:58:36
|
On Aug 22, 2008, at 1:41 PM, Mike Schrag wrote: >> But is there an answer to "is there a way to globally tell the >> Migration to use NVARCHAR as the datatype for the ALTER TABLE >> statement?" > This is what externalTypeForJDBCType does ... It takes the JDBCType > you provide and returns back the external type that should be used > for it. As an example, here's an excerpt from PG's: > > if (jdbcType == Types.INTEGER) { > externalType = "int4"; > } Wow. I actually understood what you were saying and have already made my subclass! Here's the conversions I'm written so far: if (jdbcType == Types.CHAR) { externalType = "nchar"; } else if (jdbcType == Types.VARCHAR) { externalType = "nvarchar"; } else if (jdbcType == Types.LONGVARCHAR) { externalType = "ntext"; } else { externalType = super.externalTypeForJDBCType(adaptor, jdbcType); } Either of you, or anyone else, have any problems with those? How exactly do I set the parameter in the Properties file? Also, would the databaseProductName simply be Microsoft? Thanks! Dave > > Migrations deals only in JDBC types currently, and those are then > converted over to external types when we created eoattributes on the > fly to generate SQL through EOF. > > ms > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc |