Based on @@ncharsize.
Revision history for Perl extension DBIx::Class::Schema::Loader
+ - set correct size for nchar/nvarchar columns for Sybase ASE,
+ depending on @@ncharsize
+
0.07021 2012-04-04 23:47:34
- use ::Schema::connect instead of ::Schema::connection in
make_schema_at (RT#74175)
if ($sth->fetchrow_array) {
$res->{is_auto_increment} = 1;
}
+ $sth->finish;
if ($data_type && $data_type =~ /^timestamp\z/i) {
$res->{inflate_datetime} = 0;
if ($data_type =~ /^(?:unichar|univarchar)\z/i) {
$res->{size} /= 2;
}
+ elsif ($data_type =~ /^n(?:var)?char\z/i) {
+ my ($nchar_size) = $self->dbh->selectrow_array('SELECT @@ncharsize');
+
+ $res->{size} /= $nchar_size;
+ }
}
}
[ $dsn, $user, $password ],
);
+ SybaseMultiSchema->storage->disconnect;
+
diag join "\n", @warns if @warns;
is @warns, 0;