So I've been working on the dev server code of some Catalyst application for a while. I decided to deploy it to a nginx instance and 'install' it properly. All went fine until I needed to make some database updates and needed to regenerate all Result classes. I ran
script/foo_create.pl model DB DBIC::Schema Foo::Schema create=static dbi:mysql:foo root password quote_names=1 like I had been before to regenerate the classes. Unfortunately, now I got a whole bunch of errors like below for pretty much all tables in the database.
**********************************************************************
+*****
DBIx::Class::Relationship::ManyToMany::many_to_many():
**********************************************************************
+*****
The many-to-many relationship 'users' is trying to create a utility me
+thod
called users_rs.
This will completely overwrite one such already existing method on cla
+ss
Foo::Schema::Result::Role.
You almost certainly want to rename your method or the many-to-many
relationship, as the functionality of the original method will not be
accessible anymore.
To disable this warning set to a true value the environment variable
DBIC_OVERWRITE_HELPER_METHODS_OK
**********************************************************************
+*****
exists "/home/hendrik/Foo/script/../lib/Foo/Model/DB.pm".
I understand this is triggered by a specific setting for DBIx::Class::Schema::Loader but I can't seem to find how I set that flag. I did try to add it as an argument to the create script or add it to the base class in the package config method. The Result classes are containing all methods twice as they're being loaded through 'existing' instances in @INC. Any hints?
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-02-17 22:44:4
+1
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bMzHYuEZzJ2A0eJIDbbqVA
# These lines were loaded from '/usr/local/share/perl/5.18.2/Foo/Schem
+a/Result/User.pm' found in @INC.
# They are now part of the custom portion of this file
# for you to hand-edit. If you do not either delete
# this section or remove that file from @INC, this section
# will be repeated redundantly when you re-create this
# file again via Loader! See skip_load_external to disable
# this feature.
Greetz
Beatnik
... I'm belgian but I don't play one on TV.