[Dbix-class] Re: Backcompat tests for the dev version of DBIx::Class::Schema::Loader

Zbigniew Lukasiak zzbbyy at gmail.com
Thu Oct 8 15:55:04 GMT 2009


Hi,

I am now trying again to make it work and I am really sorry but even
after all those IRC discussions I am still a bit puzzled about how the
backcompat layer is supposed to work.  So once again - I understand
that the scenario is like that:

I have an old schema
I use the new Loader to load a new one
the backcompat reads the old schema and notices that it is old and it
switches itself on
the loaded schema is compatible with the old one
then I call dump_to_dir - and it is dumped
the old schema is overwritten with the new one (but compatible)

Is that what you have in mind?

If the answer is yes - then there are two questions

1. Should there be any changes between the old schema and the new one?
 If there are any then how to decide what changes are compatible and
what are not.  And if there should not be any change - then what is
the purpose of overwriting one schema with an identical one?  Wouldn't
it be simpler to just refuse overwriting old schemas?

2. If we are overwriting with the compatibility adjustments - then we
need to mark the new schema somehow, so that subsequent re-dumping
will leave these adjustments.

Initially I imagined that the backcompat is needed for dynamic
loading, then there is no old schema, so I was not thinking about
these problems, but in the IRC conversations someone said that dynamic
loading is not important.

Cheers,
Zbigniew
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/



More information about the DBIx-Class mailing list