From: Rafael Kitover Date: Mon, 17 Jan 2011 05:06:55 +0000 (-0500) Subject: That was a bad idea. X-Git-Tag: 0.07003~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=825c42a3a1fced8e8bad99cf01dff7a5c177643d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git That was a bad idea. This reverts commit e4d9f5156f1e62ab07ec1884c81f4a325584dfd0. --- diff --git a/Changes b/Changes index 7c0118b..5d656ba 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,5 @@ Revision history for Perl extension DBIx::Class::Schema::Loader - - add auto_nextval => 1 to uniqueidentifier columns on MSSQL and to - uniqueidentifier and uniqueidentifierstr columns on SQLAnywhere - add datetime_undef_if_invalid => 1 for MySQL datetime data types (RT#64820) - added column_accessor_map option diff --git a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm index 4aabd9b..17e8dd9 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm @@ -253,9 +253,6 @@ 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}; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm index 6fc5769..46e15fe 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm @@ -102,9 +102,6 @@ EOF elsif ($info->{data_type} eq 'float') { $info->{data_type} = 'real'; } - elsif ($info->{data_type} =~ /^uniqueidentifier(?:str)?\z/) { - $info->{auto_nextval} = 1; - } delete $info->{default_value} if ref($info->{default_value}) eq 'SCALAR' && ${ $info->{default_value} } eq 'NULL'; diff --git a/t/16mssql_common.t b/t/16mssql_common.t index cf77ed6..4ce93a7 100644 --- a/t/16mssql_common.t +++ b/t/16mssql_common.t @@ -149,7 +149,7 @@ my $tester = dbixcsl_common_tests->new( # other types timestamp => { data_type => 'timestamp', inflate_datetime => 0 }, rowversion => { data_type => 'rowversion' }, - uniqueidentifier => { data_type => 'uniqueidentifier', auto_nextval => 1 }, + uniqueidentifier => { data_type => 'uniqueidentifier' }, sql_variant => { data_type => 'sql_variant' }, xml => { data_type => 'xml' }, }, diff --git a/t/17sqlanywhere_common.t b/t/17sqlanywhere_common.t index 1a8421f..797c542 100644 --- a/t/17sqlanywhere_common.t +++ b/t/17sqlanywhere_common.t @@ -112,7 +112,7 @@ my $tester = dbixcsl_common_tests->new( 'nvarchar(20)' => { data_type => 'nvarchar', size => 20 }, 'xml' => { data_type => 'xml' }, 'uniqueidentifierstr' - => { data_type => 'uniqueidentifierstr', auto_nextval => 1 }, + => { data_type => 'uniqueidentifierstr' }, # Binary types 'binary' => { data_type => 'binary', size => 1 }, @@ -120,7 +120,7 @@ my $tester = dbixcsl_common_tests->new( 'varbinary' => { data_type => 'varbinary', size => 1 }, 'varbinary(20)'=> { data_type => 'varbinary', size => 20 }, 'uniqueidentifier' - => { data_type => 'uniqueidentifier', auto_nextval => 1 }, + => { data_type => 'uniqueidentifier' }, # Blob types 'long binary' => { data_type => 'long binary' },