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;
41 mysql_collate: latin1_danish_ci
62 mysql_collate: utf8_general_ci
66 my $mysql_out = <<EOSQL;
67 SET foreign_key_checks=0;
71 swedish_name varchar(32) CHARACTER SET swe7,
72 description text CHARACTER SET utf8 COLLATE utf8_general_ci
73 ) DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci;
78 $sqlt = SQL::Translator->new(
88 open(FILE, "/home/grommit/src/sqlfairy/test.yml") or die "$!";
93 open(FILE, "/home/grommit/src/sqlfairy/test.sql") or die "$!";
97 $out = $sqlt->translate(\$yaml_in) or die "Translate error:".$sqlt->error;
98 ok $out ne "" ,"Produced something!";
99 eq_or_diff $out, $mysql_out ,"Output looks right";