mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-14 20:48:41 +00:00
Use default database connection
This commit is contained in:
parent
775ecbd641
commit
a0b3020e4a
|
|
@ -38,10 +38,10 @@ class Installer extends InstallerAbstract
|
||||||
{
|
{
|
||||||
parent::install(__DIR__ . '/..', $dbPool, $info);
|
parent::install(__DIR__ . '/..', $dbPool, $info);
|
||||||
|
|
||||||
switch ($dbPool->get('core')->getType()) {
|
switch ($dbPool->get()->getType()) {
|
||||||
case DatabaseType::MYSQL:
|
case DatabaseType::MYSQL:
|
||||||
$dbPool->get('core')->con->prepare(
|
$dbPool->get()->con->prepare(
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'auditor_audit` (
|
'CREATE TABLE if NOT EXISTS `' . $dbPool->get()->prefix . 'auditor_audit` (
|
||||||
`auditor_audit_id` int(11) NOT NULL AUTO_INCREMENT,
|
`auditor_audit_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`auditor_audit_module` int(11) NOT NULL,
|
`auditor_audit_module` int(11) NOT NULL,
|
||||||
`auditor_audit_ref` int(11) NOT NULL,
|
`auditor_audit_ref` int(11) NOT NULL,
|
||||||
|
|
@ -58,9 +58,9 @@ class Installer extends InstallerAbstract
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
||||||
)->execute();
|
)->execute();
|
||||||
|
|
||||||
$dbPool->get('core')->con->prepare(
|
$dbPool->get()->con->prepare(
|
||||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'auditor_audit`
|
'ALTER TABLE `' . $dbPool->get()->prefix . 'auditor_audit`
|
||||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'auditor_audit_ibfk_1` FOREIGN KEY (`auditor_audit_created_by`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);'
|
ADD CONSTRAINT `' . $dbPool->get()->prefix . 'auditor_audit_ibfk_1` FOREIGN KEY (`auditor_audit_created_by`) REFERENCES `' . $dbPool->get()->prefix . 'account` (`account_id`);'
|
||||||
)->execute();
|
)->execute();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user