From 381520c8866a5f3be7e743e3ae16b6fb2988c495 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 21 Aug 2012 13:51:27 -0400
Subject: [PATCH] Implemented  FS#1448 - one database user name and multiple databases  Bugfix on db-Class (datalog Update)

---
 install/sql/ispconfig3.sql |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 58e0178..5777459 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1616,19 +1616,39 @@
   `parent_domain_id` int(11) unsigned NOT NULL DEFAULT  '0',
   `type` varchar(16) NOT NULL DEFAULT 'y',
   `database_name` varchar(64) DEFAULT NULL,
-  `database_user` varchar(64) DEFAULT NULL,
-  `database_password` varchar(64) DEFAULT NULL,
+  `database_user_id` int(11) unsigned DEFAULT NULL,
+  `database_ro_user_id` int(11) unsigned DEFAULT NULL,
   `database_charset` varchar(64) DEFAULT NULL,
   `remote_access` enum('n','y') NOT NULL DEFAULT 'y',
   `remote_ips` text NOT NULL,
   `backup_interval` VARCHAR( 255 ) NOT NULL DEFAULT 'none',
   `backup_copies` INT NOT NULL DEFAULT '1',
   `active` enum('n','y') NOT NULL DEFAULT 'y',
-  PRIMARY KEY (`database_id`)
+  PRIMARY KEY (`database_id`),
+  KEY `database_user_id` (`database_user_id`),
+  KEY `database_ro_user_id` (`database_ro_user_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
 -- --------------------------------------------------------
 
+--
+-- Tabellenstruktur für Tabelle `web_database_user`
+--
+
+CREATE TABLE IF NOT EXISTS `web_database_user` (
+  `database_user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
+  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
+  `sys_perm_user` varchar(5) DEFAULT NULL,
+  `sys_perm_group` varchar(5) DEFAULT NULL,
+  `sys_perm_other` varchar(5) DEFAULT NULL,
+  `database_user` varchar(64) DEFAULT NULL,
+  `database_password` varchar(64) DEFAULT NULL,
+  PRIMARY KEY (`database_user_id`)
+) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
 -- 
 -- Table structure for table  `web_domain`
 -- 

--
Gitblit v1.9.1