Prevent Schema::Loader from overwriting unchanged schema files
authorAndrew Moore <amoore@cpan.org>
Fri, 19 Dec 2008 18:31:10 +0000 (18:31 +0000)
committerAndrew Moore <amoore@cpan.org>
Fri, 19 Dec 2008 18:31:10 +0000 (18:31 +0000)
commitfb01c1803bc2b4593b8cbac65bca897eabbee3de
tree921535e36f49cd021c3fd9e8a567b82afc4f76b6
parent32c696c66537f1289f0e7c6c916031d4c071e924
Prevent Schema::Loader from overwriting unchanged schema files

previously, the make_schema_at feature of Schema::Loader would overwrite
files in the dump_to_dir regardless of whether the underlying database
schema had changed or not. This patch causes Schema::Loader to check
the contents of the current file with the newly created schema from the
database. The file is only overwritten if the two differ. This means
that the old timestamp and creation date are preserved.
lib/DBIx/Class/Schema/Loader/Base.pm
t/23dumpmore.t