Move schema to json

This commit is contained in:
Dennis Eichhorn 2018-12-23 20:30:11 +01:00
parent 9ce3487838
commit cfbe9f0629

View File

@ -17,7 +17,6 @@ namespace Modules\Exchange\Admin;
use Modules\Exchange\Models\InterfaceManager;
use Modules\Exchange\Models\InterfaceManagerMapper;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\DataStorage\Database\DatabaseType;
use phpOMS\Module\InfoManager;
use phpOMS\Module\InstallerAbstract;
@ -40,29 +39,6 @@ class Installer extends InstallerAbstract
{
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');
foreach ($interfaces as $interface) {