commit 4eab0ccf297f5e2643c51782c118061278df58f5
Author: Moritz Bunkus <m.bunkus@linet.de>
Date:   Fri Feb 10 15:05:21 2017 +0100

    Auth-DB-Upgrades alle nach SL::DBUpgrade2::Auth verschieben
    
    Das verhindert eine Warnung wegen Umdefinition der Funktion
    »SL::DBUpgrade2::clients::run« während der Tests, weil es das Script
    »clients.pl« sowohl für die Auth-DB als auch für die Haupt-DB gibt.

diff --git a/SL/DBUpgrade2/Base.pm b/SL/DBUpgrade2/Base.pm
index 024282f65..5d0d26c9b 100644
--- a/SL/DBUpgrade2/Base.pm
+++ b/SL/DBUpgrade2/Base.pm
@@ -30,9 +30,10 @@ sub execute_script {
     die $EVAL_ERROR;
   }
 
+  my $auth    =  $file_name =~ m{/Pg-upgrade2-auth/} ? 'Auth::' : '';
   my $package =  delete $params{tag};
   $package    =~ s/[^a-zA-Z0-9_]+/_/g;
-  $package    =  "SL::DBUpgrade2::${package}";
+  $package    =  "SL::DBUpgrade2::${auth}${package}";
 
   $package->new(%params)->run;
 }
diff --git a/sql/Pg-upgrade2-auth/auth_schema_normalization_1.pl b/sql/Pg-upgrade2-auth/auth_schema_normalization_1.pl
index 2b0e28bb5..c39b97d50 100644
--- a/sql/Pg-upgrade2-auth/auth_schema_normalization_1.pl
+++ b/sql/Pg-upgrade2-auth/auth_schema_normalization_1.pl
@@ -1,7 +1,7 @@
 # @tag: auth_schema_normalization_1
 # @description: Auth-Datenbankschema Normalisierungen Teil 1
 # @depends:
-package SL::DBUpgrade2::auth_schema_normalization_1;
+package SL::DBUpgrade2::Auth::auth_schema_normalization_1;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/bank_transaction_rights.pl b/sql/Pg-upgrade2-auth/bank_transaction_rights.pl
index e3e048a13..2f175ac49 100644
--- a/sql/Pg-upgrade2-auth/bank_transaction_rights.pl
+++ b/sql/Pg-upgrade2-auth/bank_transaction_rights.pl
@@ -1,7 +1,7 @@
 # @tag: bank_transaction_rights
 # @description: Setzt das neue Recht die Bankerweiterung zu nutzen (für Gruppen die auch Recht Kontenabgleich haben)
 # @depends: release_3_2_0
-package SL::DBUpgrade2::bank_transaction_rights;
+package SL::DBUpgrade2::Auth::bank_transaction_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/clients.pl b/sql/Pg-upgrade2-auth/clients.pl
index 4288546d3..4791823db 100644
--- a/sql/Pg-upgrade2-auth/clients.pl
+++ b/sql/Pg-upgrade2-auth/clients.pl
@@ -2,7 +2,7 @@
 # @description: Einführung von Mandanten
 # @depends: release_3_0_0
 # @ignore: 0
-package SL::DBUpgrade2::clients;
+package SL::DBUpgrade2::Auth::clients;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/clients_webdav.pl b/sql/Pg-upgrade2-auth/clients_webdav.pl
index 6f73f216b..68650e7a5 100644
--- a/sql/Pg-upgrade2-auth/clients_webdav.pl
+++ b/sql/Pg-upgrade2-auth/clients_webdav.pl
@@ -2,7 +2,7 @@
 # @description: WebDAV-Migration für Mandanten
 # @depends: clients
 # @ignore: 0
-package SL::DBUpgrade2::clients_webdav;
+package SL::DBUpgrade2::Auth::clients_webdav;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/delivery_plan_rights.pl b/sql/Pg-upgrade2-auth/delivery_plan_rights.pl
index f28b6f507..75de329c5 100644
--- a/sql/Pg-upgrade2-auth/delivery_plan_rights.pl
+++ b/sql/Pg-upgrade2-auth/delivery_plan_rights.pl
@@ -1,7 +1,7 @@
 # @tag: delivery_plan_rights
 # @description: Setzt das neue Recht den Lieferplan anzuzeigen
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::delivery_plan_rights;
+package SL::DBUpgrade2::Auth::delivery_plan_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/delivery_process_value.pl b/sql/Pg-upgrade2-auth/delivery_process_value.pl
index e0ff4b66b..51379e205 100644
--- a/sql/Pg-upgrade2-auth/delivery_process_value.pl
+++ b/sql/Pg-upgrade2-auth/delivery_process_value.pl
@@ -1,7 +1,7 @@
 # @tag: delivery_process_value
 # @description: Setzt das neue Recht den Lieferstatus mit Warenwert zu sehen
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::delivery_process_value;
+package SL::DBUpgrade2::Auth::delivery_process_value;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/details_and_report_of_parts.pl b/sql/Pg-upgrade2-auth/details_and_report_of_parts.pl
index 90fc16acd..f116b841c 100644
--- a/sql/Pg-upgrade2-auth/details_and_report_of_parts.pl
+++ b/sql/Pg-upgrade2-auth/details_and_report_of_parts.pl
@@ -1,7 +1,7 @@
 # @tag: details_and_report_of_parts
 # @description: Setzt das Recht zur Anzeige von Details und Berichten von Waren, Dienstleistungen und Erzeugnissen
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::details_and_report_of_parts;
+package SL::DBUpgrade2::Auth::details_and_report_of_parts;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/foreign_key_constraints_on_delete.pl b/sql/Pg-upgrade2-auth/foreign_key_constraints_on_delete.pl
index 5423e91c2..f60148d57 100644
--- a/sql/Pg-upgrade2-auth/foreign_key_constraints_on_delete.pl
+++ b/sql/Pg-upgrade2-auth/foreign_key_constraints_on_delete.pl
@@ -2,7 +2,7 @@
 # @description: Ändert "FOREIGN KEY" constraints auf "ON DELETE CASCADE"
 # @depends: clients
 # @ignore: 0
-package SL::DBUpgrade2::foreign_key_constraints_on_delete;
+package SL::DBUpgrade2::Auth::foreign_key_constraints_on_delete;
 
 use Data::Dumper;
 
diff --git a/sql/Pg-upgrade2-auth/mail_journal_rights.pl b/sql/Pg-upgrade2-auth/mail_journal_rights.pl
index 7d2bacbac..1476b663a 100644
--- a/sql/Pg-upgrade2-auth/mail_journal_rights.pl
+++ b/sql/Pg-upgrade2-auth/mail_journal_rights.pl
@@ -4,7 +4,7 @@
 # @locales: E-Mail-Journal
 # @locales: Read all employee e-mails
 
-package SL::DBUpgrade2::mail_journal_rights;
+package SL::DBUpgrade2::Auth::mail_journal_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/productivity_rights.pl b/sql/Pg-upgrade2-auth/productivity_rights.pl
index 7f287119f..067a9d97e 100644
--- a/sql/Pg-upgrade2-auth/productivity_rights.pl
+++ b/sql/Pg-upgrade2-auth/productivity_rights.pl
@@ -1,7 +1,7 @@
 # @tag: productivity_rights
 # @description: Setzt das Recht die Produktivität einzusehen und das Recht den Link zum Admin-Menü anzuzeigen wieder wie vorher
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::productivity_rights;
+package SL::DBUpgrade2::Auth::productivity_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/purchase_letter_rights.pl b/sql/Pg-upgrade2-auth/purchase_letter_rights.pl
index 9339dc08e..8987f1f4f 100644
--- a/sql/Pg-upgrade2-auth/purchase_letter_rights.pl
+++ b/sql/Pg-upgrade2-auth/purchase_letter_rights.pl
@@ -3,7 +3,7 @@
 # @depends: release_3_2_0 sales_letter_rights
 # @locales: Edit purchase letters
 # @locales: Show purchase letters report
-package SL::DBUpgrade2::purchase_letter_rights;
+package SL::DBUpgrade2::Auth::purchase_letter_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/record_links_rights.pl b/sql/Pg-upgrade2-auth/record_links_rights.pl
index 8e8073dac..5f855883c 100644
--- a/sql/Pg-upgrade2-auth/record_links_rights.pl
+++ b/sql/Pg-upgrade2-auth/record_links_rights.pl
@@ -1,7 +1,7 @@
 # @tag: record_links_rights
 # @description: Setzt das Recht um den Tab verknüpfte Belege zu sehen, per Default erlaubt (wie vorher auch)
 # @depends: release_3_4_0 master_rights_position_gaps
-package SL::DBUpgrade2::record_links_rights;
+package SL::DBUpgrade2::Auth::record_links_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/requirement_spec_rights.pl b/sql/Pg-upgrade2-auth/requirement_spec_rights.pl
index e93d4ba5b..5e12edbc8 100644
--- a/sql/Pg-upgrade2-auth/requirement_spec_rights.pl
+++ b/sql/Pg-upgrade2-auth/requirement_spec_rights.pl
@@ -1,7 +1,7 @@
 # @tag: requirement_spec_rights
 # @description: Neues Gruppenrecht für Pflichtenhefte
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::requirement_spec_rights;
+package SL::DBUpgrade2::Auth::requirement_spec_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/rights_for_showing_ar_and_ap_transactions.pl b/sql/Pg-upgrade2-auth/rights_for_showing_ar_and_ap_transactions.pl
index 523975ecf..1dc79506b 100644
--- a/sql/Pg-upgrade2-auth/rights_for_showing_ar_and_ap_transactions.pl
+++ b/sql/Pg-upgrade2-auth/rights_for_showing_ar_and_ap_transactions.pl
@@ -1,7 +1,7 @@
 # @tag: rights_for_showing_ar_and_ap_transactions
 # @description: Setzt das Recht zur Anzeige von Debitoren- und Kreditorenbuchungen im Rechnungsbericht
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::rights_for_showing_ar_and_ap_transactions;
+package SL::DBUpgrade2::Auth::rights_for_showing_ar_and_ap_transactions;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/sales_letter_rights.pl b/sql/Pg-upgrade2-auth/sales_letter_rights.pl
index f018317da..6a960f443 100644
--- a/sql/Pg-upgrade2-auth/sales_letter_rights.pl
+++ b/sql/Pg-upgrade2-auth/sales_letter_rights.pl
@@ -1,7 +1,7 @@
 # @tag: sales_letter_rights
 # @description: Setzt das neue Recht die Brieffunktion anzuzeigen
 # @depends: release_3_2_0 add_master_rights
-package SL::DBUpgrade2::sales_letter_rights;
+package SL::DBUpgrade2::Auth::sales_letter_rights;
 
 use strict;
 use utf8;
diff --git a/sql/Pg-upgrade2-auth/split_transaction_rights.pl b/sql/Pg-upgrade2-auth/split_transaction_rights.pl
index d6e829fd8..e0a56b362 100644
--- a/sql/Pg-upgrade2-auth/split_transaction_rights.pl
+++ b/sql/Pg-upgrade2-auth/split_transaction_rights.pl
@@ -7,7 +7,7 @@
 # @locales: AP Transactions
 
 
-package SL::DBUpgrade2::split_transaction_rights;
+package SL::DBUpgrade2::Auth::split_transaction_rights;
 
 use strict;
 use utf8;
@@ -37,4 +37,3 @@ sub run {
 } # end run
 
 1;
-
