use strict;
use warnings;
-use base qw/
- DBIx::Class::Schema::Loader::DBI
- DBIx::Class::Schema::Loader::DBI::Sybase::Common
-/;
+use base 'DBIx::Class::Schema::Loader::DBI::Sybase::Common';
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04999_10';
+our $VERSION = '0.05002';
=head1 NAME
$self->_set_quote_char_and_name_sep;
}
-# remove 'IDENTITY' from column data_type
-sub _columns_info_for {
- my $self = shift;
- my $result = $self->next::method(@_);
-
- for my $col (keys %$result) {
- $result->{$col}->{data_type} =~ s/\s* identity \s*//ix;
- }
-
- return $result;
-}
-
sub _table_pk_info {
my ($self, $table) = @_;
my $dbh = $self->schema->storage->dbh;
# strip parens
$default =~ s/^\( (.*) \)\z/$1/x;
- # literal or function?
+ # Literal strings are in ''s, numbers are in ()s (in some versions of
+ # MSSQL, in others they are unquoted) everything else is a function.
$extra_info{default_value} =
- $default =~ /^' (.*) '\z/x ? $1 : \$default;
+ $default =~ /^['(] (.*) [)']\z/x ? $1 :
+ $default =~ /^\d/ ? $default : \$default;
}
return \%extra_info;
=head1 AUTHOR
-See L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
=head1 LICENSE