static function install(Migration $migration) { global $DB; // Table no longer needed in GLPI 0.85+; drop it. Needed for upgrades $migration->dropTable(getTableForItemType(__CLASS__)); PluginSimcardProfile::createFirstAccess($_SESSION['glpiactiveprofile']['id']); }
static function install(Migration $migration) { global $DB; $table = getTableForItemType(__CLASS__); if (!TableExists($table)) { $query = "CREATE TABLE IF NOT EXISTS `{$table}` (\n `id` int(11) NOT NULL auto_increment,\n `profiles_id` int(11) NOT NULL default '0' COMMENT 'RELATION to glpi_profiles (id)',\n `simcard` char(1) collate utf8_unicode_ci default NULL,\n `open_ticket` char(1) collate utf8_unicode_ci default NULL,\n PRIMARY KEY (`id`),\n KEY `profiles_id` (`profiles_id`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; $DB->query($query) or die($DB->error()); } PluginSimcardProfile::createFirstAccess($_SESSION['glpiactiveprofile']['id']); self::changeProfile(); }
static function install(Migration $migration) { global $DB; PluginSimcardProfile::createFirstAccess($_SESSION['glpiactiveprofile']['id']); }