+### DB init, read list of tables
+print "Reading database information.\n";
+my $DBHandle = InitDB(\%Conf,1);
+my %TablesInDB =
+ %{$DBHandle->table_info('%', '%', '%', 'TABLE')->fetchall_hashref('TABLE_NAME')};
+
+if (!$OptUpdate) {
+ ##### installation mode
+ print "----------\nStarting database table generation.\n";
+ # check for tables and create them, if they don't exist yet
+ foreach my $Table (keys %DBCreate) {
+ &CreateTable($Table);
+ };
+ print "Database table generation done.\n";
+
+ # Display install instructions
+ print $Install;
+} else {
+ ##### upgrade mode
+ print "----------\nStarting upgrade process.\n";
+ $PackageVersion = '0.03';
+ if ($OptUpdate < $PackageVersion) {
+ if ($OptUpdate < 0.02) {
+ # 0.01 -> 0.02
+ # &DoMySQL('...;');
+ # print "v0.02: Database upgrades ...\n";
+ # &PrintInstructions('0.02',<<" INSTRUCTIONS");
+ # INSTRUCTIONS
+ };
+ };
+ # Display general upgrade instructions
+ print $Upgrade;
+};