コード例 #1
0
 /**
  * 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`)");
 }
コード例 #2
0
 /**
  * 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}`)");
     }
 }
コード例 #3
0
 /**
  * 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`)");
 }