[Dbix-class] Regenerating schema following DBIC::Schema::Loader
dump_to_dir?
Chris Cole
chris at compbio.dundee.ac.uk
Tue May 26 08:21:14 GMT 2009
I'm guessing there's no way to do it, then?
The problem seems to be that the current schema is a DBIx::Class::Schema
object, but in order to update it needs to be a
DBIx::Class::Schema::Loader object. I can modify the base class to be a
Loader object, but then the it barfs because the md5sums are different.
I seem to be in a catch22. (I think) I need to change the files in order
to update them, but changing them stops them being updated. Help!
Chris Cole wrote:
> Hi all,
>
> I've generated a DB schema for a MySQL at DB/Schema using the following
> one-liner:
>
> perl -MDBIx::Class::Schema::Loader=dump_to_dir:DB/ -MDB::Schema -e1
>
> At the bottom of the Classes it has this text "# You can replace this
> text with custom content, and it will be preserved on regeneration",
> which I have done to add some methods for manipulating the data.
>
> Now that I need to update changes to the schema in the classes, how do I
> go about it? I have been able to create a new 'dump' at a new location,
> but all attempts to update the current 'dump' have been thwarted.
> Any pointers appreciated.
More information about the DBIx-Class
mailing list