Hi I use - DBIx::Class::Schema::Loader v0.07012 - MySQL 5.1.66 - Ubuntu 10.04.3 and I have a weird issue.
In different machines (with (apparently) the same configuration DBIx, MySQL, Ubuntu) when I "extract" a DB schema with DBIx::Class::Schema::Loader and make_schema_at on it, I have different output. The difference is only one field (datetime_undef_if_invalid) and whether it's surrounded by double quotes or not.
Test case:1) import the table in DBpersist_test.sql (overwriting the `test`.`t1` table is commented out just in case someone doesn't notice it)
2) run the DBpersist_test.pl script (you will probably need to modify the username/password to connect to the DB)
Then in DB/Schema/Test/Result/T1.pm the schema is dumped. From the different machines I get the following diff on the T1.pm
======================================================== 52c52 < datetime_undef_if_invalid => 1, --- > "datetime_undef_if_invalid" => 1, 70,71c70,71 < # Created by DBIx::Class::Schema::Loader v0.07012 @ 2012-12-21 17:49:11 < # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:K5kjYz6eJLymsTF42VTI7A --- > # Created by DBIx::Class::Schema::Loader v0.07012 @ 2012-12-21 17:25:25 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:coXmk2LUywq4BLTik7fb4Q ========================================================This the difference doesn't cause any functional issues. The problem is that the md5sum of the dumped schemas are different making it hard on people to work together...
Any ideas how to approach the issue? What kind of configuration option in DBIx, perl, or somewhere else, could lead to such a difference in behavior?
Regards Vangelis
DBpersist_test.pl
Description: Perl program
use test; --DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `timestamp` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk