7 use Test::SQL::Translator qw(maybe_plan);
11 id int auto_increment PRIMARY KEY,
12 foo varchar(255) not null default '',
15 CREATE UNIQUE INDEX random_foo_update ON random(foo,updated);
16 CREATE INDEX random_foo ON random(foo);
22 'SQL::Translator::Parser::MySQL',
23 'SQL::Translator::Producer::Oracle');
26 my $tr = SQL::Translator->new(
29 quote_table_names => 0,
30 quote_field_names => 0,
33 my $output = $tr->translate(\$create);
35 ok( $output, 'Translate MySQL to Oracle' );
36 ok( $output =~ /CREATE INDEX random_foo /, 'Normal index definition translated.');
37 ok( $output =~ /CREATE UNIQUE INDEX random_foo_update /, 'Unique index definition translated.');