-#!/usr/bin/perl -w
+#!/usr/bin/perl -w
# vim:filetype=perl
# Before `make install' is performed this script should be runnable with
#=============================================================================
BEGIN {
- maybe_plan(212, 'SQL::Translator::Parser::XML::SQLFairy');
+ maybe_plan(238, 'SQL::Translator::Parser::XML::SQLFairy');
}
my $testschema = "$Bin/data/xml/schema.xml";
is_nullable => 0,
default_value => "hello",
size => 100,
+ is_unique => 1,
},
{
name => "description",
{
name => "email",
data_type => "varchar",
- size => 255,
+ size => 500,
is_unique => 1,
default_value => undef,
is_nullable => 1,
fields => ["email"],
},
{
+ name => 'very_long_index_name_on_title_field_which_should_be_truncated_for_various_rdbms',
+ type => UNIQUE,
+ fields => ["title"],
+ },
+ {
type => FOREIGN_KEY,
fields => ["another_id"],
reference_table => "Another",
is_primary_key => 1,
is_auto_increment => 1,
},
+ {
+ name => "num",
+ data_type => "numeric",
+ default_value => undef,
+ size => '10,2',
+ },
],
}, # end table Another
], # end tables
views => [
{
name => 'email_list',
- sql => "SELECT email FROM Basic WHERE email IS NOT NULL",
+ sql => "SELECT email FROM Basic WHERE (email IS NOT NULL)",
fields => ['email'],
extra => {
foo => "bar",