<?php

User_Permission_Definition::create('deployment');
<?php

$db = \Pimcore\Resource::get();
$db->query("CREATE TABLE IF NOT EXISTS `application_logs` (\n`id` bigint(20) NOT NULL AUTO_INCREMENT,\n  `timestamp` datetime NOT NULL,\n  `message` varchar(1024) DEFAULT NULL,\n  `priority` int(10) DEFAULT NULL,\n  `fileobject` varchar(1024) DEFAULT NULL,\n  `info` varchar(1024) DEFAULT NULL,\n  `component` varchar(255) DEFAULT NULL,\n  `source` varchar(255) DEFAULT NULL,\n  `relatedobject` bigint(20) DEFAULT NULL,\n  `relatedobjecttype` enum('object','document','asset') DEFAULT NULL,\n  `maintenanceChecked` tinyint(4) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `component` (`component`),\n  KEY `timestamp` (`timestamp`),\n  KEY `relatedobject` (`relatedobject`),\n  KEY `priority` (`priority`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
User_Permission_Definition::create('application_logging');
Esempio n. 3
0
 /**
  * install pricing rule system
  *
  * @return bool
  */
 private static function installPricingRules()
 {
     // PricingRules
     \Pimcore\Resource::get()->query("\n            CREATE TABLE IF NOT EXISTS `plugin_onlineshop_pricing_rule` (\n            `id` INT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n            `name` VARCHAR(50) NULL DEFAULT NULL,\n            `label` TEXT NULL,\n            `description` TEXT NULL,\n            `behavior` ENUM('additiv','stopExecute') NULL DEFAULT NULL,\n            `active` TINYINT(1) UNSIGNED NULL DEFAULT NULL,\n            `prio` TINYINT(3) UNSIGNED NOT NULL,\n            `condition` TEXT NOT NULL COMMENT 'configuration der condition',\n            `actions` TEXT NOT NULL COMMENT 'configuration der action',\n            PRIMARY KEY (`id`),\n            UNIQUE INDEX `name` (`name`),\n            INDEX `active` (`active`)\n        )\n        ENGINE=InnoDB\n        AUTO_INCREMENT=0;\n        ");
     // create permission key
     $key = 'plugin_onlineshop_pricing_rules';
     $permission = new User_Permission_Definition();
     $permission->setKey($key);
     $res = new User_Permission_Definition_Resource();
     $res->configure(\Pimcore\Resource::get());
     $res->setModel($permission);
     $res->save();
     return true;
 }