X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=sql%2FPg-upgrade2%2Fcp_greeting_migration.pl;h=176516572fbe8064e3d1e3068434a74778eda1e0;hb=92d28f856f4dd9eee0b35f30bbf876744b9426aa;hp=43d83e1ad04f0cf1044cb94eddd29b0c7752564e;hpb=b65a230d60e86d2c18a3ab7222379905aea5ecd7;p=kivitendo-erp.git diff --git a/sql/Pg-upgrade2/cp_greeting_migration.pl b/sql/Pg-upgrade2/cp_greeting_migration.pl index 43d83e1ad..176516572 100644 --- a/sql/Pg-upgrade2/cp_greeting_migration.pl +++ b/sql/Pg-upgrade2/cp_greeting_migration.pl @@ -85,13 +85,25 @@ sub print_question { print $main::form->parse_html_template("dbupgrade/cp_greeting_update_form"); } +sub alter_schema_only { + my $sqlcode = <do($sqlcode); +} + sub do_update { # main function # Do not ask the user anything if there are no entries in the # contacts table. my ($data_exists) = $dbh->selectrow_array("SELECT * FROM contacts LIMIT 1"); - return 1 if !$data_exists; + if (!$data_exists) { + alter_schema_only(); + return 1; + } # first of all check if gender.sql was already run and thus cp_gender exists # if it exists there is no need for this update anymore, so return