5 # Note that the bulk of the testing for the mysql producer is in
6 # 08postgres-to-mysql.t. This test is for additional stuff that can't be tested
7 # using an Oracle schema as source e.g. extra attributes.
13 use Test::SQL::Translator qw(maybe_plan);
19 #=============================================================================
24 'SQL::Translator::Producer::MySQL',
28 use Test::Differences;
33 my $yaml_in = <<EOSCHEMA;
40 mysql_table_type: InnoDB
42 mysql_collate: latin1_danish_ci
63 mysql_collate: utf8_general_ci
67 my $mysql_out = <<EOSQL;
68 SET foreign_key_checks=0;
72 swedish_name varchar(32) CHARACTER SET swe7,
73 description text CHARACTER SET utf8 COLLATE utf8_general_ci
74 ) Type=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci;
79 $sqlt = SQL::Translator->new(
86 my $out = $sqlt->translate(\$yaml_in)
87 or die "Translate error:".$sqlt->error;
88 ok $out ne "" ,"Produced something!";
89 eq_or_diff $out, $mysql_out ,"Output looks right";