/** * Installs given table * * @access public * @return void */ public function install() { // Call parent install parent::install(); // Add indexes to table ee()->db->query("ALTER TABLE {$this->table()} ADD INDEX (`site_id`)"); }
/** * Installs given table * * @access public * @return void */ public function install() { // Call parent install parent::install(); // Add indexes to table foreach (array('site_id', 'group_id') as $key) { ee()->db->query("ALTER TABLE {$this->table()} ADD INDEX (`{$key}`)"); } }
/** * Installs given table and adds indexes to it * * @access public * @return void */ public function install() { // Call parent install parent::install(); // Force MyISAM ee()->db->query("ALTER TABLE {$this->table()} ENGINE = MYISAM"); // Add indexes to table ee()->db->query("ALTER TABLE {$this->table()} ADD INDEX (`collection_id`)"); ee()->db->query("ALTER TABLE {$this->table()} ADD INDEX (`site_id`)"); ee()->db->query("ALTER TABLE {$this->table()} ADD FULLTEXT (`index_text`)"); }