mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-02-13 16:28:41 +00:00
Move schema to json
This commit is contained in:
parent
9ce3487838
commit
cfbe9f0629
|
|
@ -17,7 +17,6 @@ namespace Modules\Exchange\Admin;
|
||||||
use Modules\Exchange\Models\InterfaceManager;
|
use Modules\Exchange\Models\InterfaceManager;
|
||||||
use Modules\Exchange\Models\InterfaceManagerMapper;
|
use Modules\Exchange\Models\InterfaceManagerMapper;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
|
||||||
use phpOMS\Module\InfoManager;
|
use phpOMS\Module\InfoManager;
|
||||||
|
|
||||||
use phpOMS\Module\InstallerAbstract;
|
use phpOMS\Module\InstallerAbstract;
|
||||||
|
|
@ -40,29 +39,6 @@ class Installer extends InstallerAbstract
|
||||||
{
|
{
|
||||||
parent::install($dbPool, $info);
|
parent::install($dbPool, $info);
|
||||||
|
|
||||||
switch ($dbPool->get()->getType()) {
|
|
||||||
case DatabaseType::MYSQL:
|
|
||||||
$dbPool->get()->con->beginTransaction();
|
|
||||||
|
|
||||||
$dbPool->get()->con->prepare(
|
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get()->prefix . 'exchange` (
|
|
||||||
`exchange_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`exchange_title` varchar(255) DEFAULT NULL,
|
|
||||||
`exchange_path` text NOT NULL,
|
|
||||||
`exchange_import` tinyint(1) NOT NULL,
|
|
||||||
`exchange_export` tinyint(1) NOT NULL,
|
|
||||||
`exchange_version` varchar(255) NOT NULL,
|
|
||||||
`exchange_website` varchar(255) NOT NULL,
|
|
||||||
`exchange_created_by` int(11) DEFAULT NULL,
|
|
||||||
`exchange_created_at` datetime DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`exchange_id`)
|
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
|
||||||
)->execute();
|
|
||||||
|
|
||||||
$dbPool->get()->con->commit();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$interfaces = Directory::list(__DIR__ . '/../Interfaces', '.*interface\.json');
|
$interfaces = Directory::list(__DIR__ . '/../Interfaces', '.*interface\.json');
|
||||||
|
|
||||||
foreach ($interfaces as $interface) {
|
foreach ($interfaces as $interface) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user