add auto_nextval => 1 to uniqueidentifier columns on MSSQL and to uniqueidentifier...
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / MSSQL.pm
index e9d628c..4aabd9b 100644 (file)
@@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI::Sybase::Common';
 use Carp::Clan qw/^DBIx::Class/;
 use mro 'c3';
 
-our $VERSION = '0.07001';
+our $VERSION = '0.07002';
 
 =head1 NAME
 
@@ -253,6 +253,9 @@ AND table_name = @{[ $dbh->quote($table) ]} AND column_name = @{[ $dbh->quote($c
 
             delete $info->{size} if $info->{size} == 7;
         }
+        elsif ($info->{data_type} eq 'uniqueidentifier') {
+            $info->{auto_nextval} = 1;
+        }
 
         if ($info->{data_type} !~ /^(?:n?char|n?varchar|binary|varbinary|numeric|decimal|float|datetime(?:2|offset)|time)\z/) {
             delete $info->{size};