Developers, Don't you think it's quite disturbing to see that all Koha schema files appear as modified in your git status when you ran update_dbix_class_files.pl script to get the one related to the table you've just created ? If yes, here is a patch that add the ability to specify a table name to this script, so test and sign.
Created attachment 59584 [details] [review] Bug 18000 - Add --tablename option to misc/devel/update_dbix_class_files.pl script
Created attachment 59585 [details] [review] Bug 18000 - Add --tablename option to misc/devel/update_dbix_class_files.pl script
I think this is fixed in new version of DBIx::Class::Schema::Loader, I have 0.07042
(In reply to Jonathan Druart from comment #3) > I think this is fixed in new version of DBIx::Class::Schema::Loader, I have > 0.07042 Tested with version 0.07046 and it's better but i still got about thirty files modified. I keep thinking this feature could be nice to avoid that.
It would be good to pass several tables. It seems that we can pass a regexp, so I tried: --tablename='*borro*' And got: \A* matches null string many times in regex; marked by <-- HERE in m/\A* <-- HERE borro*\z/ at misc/devel/update_dbix_class_files.pl line 59.
Created attachment 60919 [details] [review] Bug 18000 - Add --tablename option to misc/devel/update_dbix_class_files.pl script Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Makes life working with DBIx::Class less miserable. perl misc/devel/update_dbix_class_files.pl --tablename issuingrules Works as advertised.
This is a much needed improvement. Typically we only alter one table at a time so multiple table updating is not very important for most developers. If you are a RM, you prolly use this without --tablename. See Bug 18229 to make this even more approachable.
This does not seem to work. I tested table virtualshelves (added a column). The results between running with table only and on the whole db are different. If you run only on one table, you loose has_many and belongs_to etc. Seems quite dangerous..