Revision history for Perl extension DBIx::Class::Schema::Loader
+ - fix MSSQL collation detection on freetds tds version 8.0
+
0.06000 2010-04-06 01:12:25
- better type info for MySQL
- initial MySQL data type tests (jhannah)
lowercasing behavior accordingly, as lower-cased column names do not work on
case-sensitive databases.
-If you are using FreeTDS with C<tds version> set to C<8.0> the collation
-detection may fail, and Loader will default to case-insensitive mode. C<tds
-version> C<7.0> will work fine.
-
-If this happens set:
+To manually set or unset case-sensitive mode, put:
case_sensitive_collation => 1
-in your Loader options to override it.
+in your Loader options.
=cut
# more on collations here: http://msdn.microsoft.com/en-us/library/ms143515.aspx
my ($collation_name) =
eval { $dbh->selectrow_array('SELECT collation_name FROM sys.databases WHERE name = DB_NAME()') }
- || eval { $dbh->selectrow_array("SELECT databasepropertyex(DB_NAME(), 'Collation')") };
+ || eval { $dbh->selectrow_array("SELECT CAST(databasepropertyex(DB_NAME(), 'Collation') AS VARCHAR)") };
if (not $collation_name) {
warn <<'EOF';