PHP Schema::createIndex Examples

PHP Schema::createIndex - 2 examples found. These are the top rated real world PHP examples of Schema::createIndex extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 /**
  * Temporary hack to set up the compound index, since we can't do
  * it yet through regular Schema interface. (Coming for 1.0...)
  *
  * @param Schema $schema
  * @return void
  */
 static function fixIndexes($schema)
 {
     try {
         $schema->createIndex('submirror', array('subscribed', 'subscriber'));
     } catch (Exception $e) {
         common_log(LOG_ERR, __METHOD__ . ': ' . $e->getMessage());
     }
 }
 /**
  * Temporary hack to set up the compound index, since we can't do
  * it yet through regular Schema interface. (Coming for 1.0...)
  *
  * @param Schema $schema
  * @return void
  */
 static function fixIndexes($schema)
 {
     try {
         // @fixme this won't be a unique index... SIGH
         $schema->createIndex('profile_detail', array('profile_id', 'field', 'field_index'));
     } catch (Exception $e) {
         common_log(LOG_ERR, __METHOD__ . ': ' . $e->getMessage());
     }
 }