X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Frose_auto_create_model.pl;h=409ae56539e62305473194b1030623506a0eab43;hb=505322c4b9b99beb3c0f1246edbfc54ff3a36790;hp=09f49611c1a002190e2c8a423eee4626ba7e3ace;hpb=b946ca81cf055a3ed3e9ce45768e2f7e00a11ed4;p=kivitendo-erp.git diff --git a/scripts/rose_auto_create_model.pl b/scripts/rose_auto_create_model.pl index 09f49611c..409ae5653 100755 --- a/scripts/rose_auto_create_model.pl +++ b/scripts/rose_auto_create_model.pl @@ -15,6 +15,7 @@ use English qw( -no_match_vars ); use Getopt::Long; use List::MoreUtils qw(none); use Pod::Usage; +use Rose::DB::Object 0.809; use Term::ANSIColor; use SL::Auth; @@ -53,6 +54,7 @@ our %foreign_key_name_map = ( orderitems => { parts => 'part', trans => 'order', }, delivery_order_items => { parts => 'part' }, invoice => { parts => 'part' }, + follow_ups => { 'employee_obj' => 'created_for' }, periodic_invoices_configs => { oe => 'order' }, ); @@ -184,7 +186,7 @@ CODE my $old_md5 = md5_hex($orig_file); my $new_size = length $full_definition; my $new_md5 = md5_hex($full_definition); - if ($old_size == $new_size && $old_md5 == $new_md5) { + if ($old_size == $new_size && $old_md5 eq $new_md5) { notice("No changes in $meta_file, skipping.") unless $config{quiet}; return; } @@ -331,20 +333,20 @@ rose_auto_create_model - mana Rose::DB::Object classes for kivitendo =head1 SYNOPSIS - scripts/rose_create_model.pl --client name-or-id table1 [table2 ...] - scripts/rose_create_model.pl --client name-or-id [--all|-a] + scripts/rose_auto_create_model.pl --client name-or-id table1 [table2 ...] + scripts/rose_auto_create_model.pl --client name-or-id [--all|-a] # updates all models - scripts/rose_create_model.pl --client name-or-id --all + scripts/rose_auto_create_model.pl --client name-or-id --all # updates only customer table, login taken from config - scripts/rose_create_model.pl customer + scripts/rose_auto_create_model.pl customer # updates only parts table, package will be Part - scripts/rose_create_model.pl parts=Part + scripts/rose_auto_create_model.pl parts=Part # try to update parts, but don't do it. tell what would happen in detail - scripts/rose_create_model.pl --no-commit parts + scripts/rose_auto_create_model.pl --no-commit parts =head1 DESCRIPTION