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
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};
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';
# other types
timestamp => { data_type => 'timestamp', inflate_datetime => 0 },
rowversion => { data_type => 'rowversion' },
- uniqueidentifier => { data_type => 'uniqueidentifier' },
+ uniqueidentifier => { data_type => 'uniqueidentifier', auto_nextval => 1 },
sql_variant => { data_type => 'sql_variant' },
xml => { data_type => 'xml' },
},
'nvarchar(20)' => { data_type => 'nvarchar', size => 20 },
'xml' => { data_type => 'xml' },
'uniqueidentifierstr'
- => { data_type => 'uniqueidentifierstr' },
+ => { data_type => 'uniqueidentifierstr', auto_nextval => 1 },
# Binary types
'binary' => { data_type => 'binary', size => 1 },
'varbinary' => { data_type => 'varbinary', size => 1 },
'varbinary(20)'=> { data_type => 'varbinary', size => 20 },
'uniqueidentifier'
- => { data_type => 'uniqueidentifier' },
+ => { data_type => 'uniqueidentifier', auto_nextval => 1 },
# Blob types
'long binary' => { data_type => 'long binary' },