当前位置: 首页>>代码示例>>PHP>>正文


PHP SimpleORMap::expireTableScheme方法代码示例

本文整理汇总了PHP中SimpleORMap::expireTableScheme方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleORMap::expireTableScheme方法的具体用法?PHP SimpleORMap::expireTableScheme怎么用?PHP SimpleORMap::expireTableScheme使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleORMap的用法示例。


在下文中一共展示了SimpleORMap::expireTableScheme方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: up

 function up()
 {
     $db = DbManager::get();
     $db->exec("ALTER TABLE `datafields` CHANGE `type` `type` ENUM('bool','textline','textarea','selectbox','date','time','email','phone','radio','combo','link','selectboxmultiple') NOT NULL DEFAULT 'textline'");
     $db->exec("ALTER TABLE `datafields` ADD `is_userfilter` TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER `is_required`");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:156_tic_5204_add_datafield_type.php

示例2: tearDown

 function tearDown()
 {
     SimpleORMap::expireTableScheme();
     Config::set(null);
     StudipCacheFactory::setConfig(null);
     $GLOBALS['CACHING_ENABLE'] = false;
 }
开发者ID:ratbird,项目名称:hope,代码行数:7,代码来源:CronjobScheduleTest.php

示例3: up

 function up()
 {
     $db = DBManager::get();
     $db->exec("ALTER TABLE `resources_requests` ADD `metadate_id` VARCHAR( 32 ) NOT NULL DEFAULT '' AFTER `termin_id`");
     $db->exec("ALTER TABLE `resources_requests` DROP INDEX  `closed` , ADD INDEX  `closed` (  `closed` ,  `request_id`, `resource_id` )");
     $db->exec("ALTER TABLE `resources_requests` ADD INDEX (  `metadate_id` )");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:8,代码来源:86_step_228_raumanfragen.php

示例4: up

 public function up()
 {
     DBManager::get()->exec("\n            ALTER TABLE `pluginmarket_plugins`\n            ADD `rating` DOUBLE NULL AFTER `language` ;\n        ");
     SimpleORMap::expireTableScheme();
     foreach (MarketPlugin::findBySQL("1=1") as $plugin) {
         $plugin['rating'] = $plugin->calculateRating();
         $plugin->store();
     }
 }
开发者ID:studip,项目名称:PluginMarket,代码行数:9,代码来源:04_add_rating_to_database.php

示例5: down

 public function down()
 {
     $query = "ALTER TABLE `seminare`\n                  DROP COLUMN `is_complete`";
     DBManager::get()->exec($query);
     SimpleORMap::expireTableScheme();
     $query = "DELETE FROM `config` WHERE `field` = :field";
     $statement = DBManager::get()->prepare($query);
     $statement->bindValue(':field', 'ADMIN_COURSES_SHOW_COMPLETE');
     $statement->execute();
 }
开发者ID:ratbird,项目名称:hope,代码行数:10,代码来源:180_add_seminar_is_complete_status.php

示例6: down

 function down()
 {
     $db = DBManager::get();
     $db->exec("ALTER TABLE `lock_rules` CHANGE `permission` `permission` ENUM( 'tutor', 'dozent', 'admin', 'root' ) NOT NULL DEFAULT 'dozent'");
     $db->exec("ALTER TABLE `lock_rules` DROP `object_type`");
     $db->exec("ALTER TABLE `lock_rules` DROP `user_id`");
     $db->exec("ALTER TABLE `user_info` DROP `lock_rule`");
     $db->exec("ALTER TABLE `Institute` DROP `lock_rule`");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:10,代码来源:77_step_00223_lockrules.php

示例7: down

 public function down()
 {
     $db = DBManager::get();
     $db->exec("ALTER TABLE scm CHANGE tab_name tab_name varchar(20) NOT NULL DEFAULT 'Info',\n                                   CHANGE content content text");
     $db->exec("ALTER TABLE user_info CHANGE lebenslauf lebenslauf text,\n                                         CHANGE publi publi text NOT NULL");
     $db->exec("ALTER TABLE wiki CHANGE keyword keyword varchar(128) BINARY NOT NULL DEFAULT '',\n                                    CHANGE body body text");
     $db->exec("ALTER TABLE wiki_links CHANGE from_keyword from_keyword char(128) BINARY NOT NULL DEFAULT '',\n                                          CHANGE to_keyword to_keyword char(128) BINARY NOT NULL DEFAULT ''");
     $db->exec("ALTER TABLE wiki_locks CHANGE keyword keyword varchar(128) BINARY NOT NULL DEFAULT ''");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:10,代码来源:181_extend_wiki_size.php

示例8: up

 function up()
 {
     $db = DBManager::get();
     $db->exec("ALTER TABLE `auth_user_md5` CHANGE `password` `password` VARBINARY( 64 ) NOT NULL DEFAULT ''");
     $hasher = UserManagement::getPwdHasher();
     $pwd_up = $db->prepare("UPDATE auth_user_md5 SET password=? WHERE user_id=?");
     foreach($db->query("SELECT user_id,password FROM auth_user_md5 WHERE auth_plugin='standard' AND password <> ''") as $row) {
         $new_pwd = $hasher->HashPassword($row['password']);
         $pwd_up->execute(array($new_pwd, $row['user_id']));
     }
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:133_tic_4072_new_password_hashing.php

示例9: up

 function up()
 {
     $this->tryExecute("ALTER TABLE personal_notifications ADD INDEX (html_id)");
     $this->tryExecute("ALTER TABLE personal_notifications ADD INDEX (url(256))");
     $this->tryExecute("ALTER TABLE admission_seminar_user CHANGE status status ENUM('awaiting','accepted') NOT NULL");
     $this->tryExecute("ALTER TABLE ex_termine DROP INDEX autor_id");
     $this->tryExecute("ALTER TABLE ex_termine ADD INDEX (date)");
     $this->tryExecute("ALTER TABLE termine ADD INDEX (date)");
     $this->tryExecute("ALTER TABLE termin_related_groups DROP INDEX `unique`");
     $this->tryExecute("ALTER TABLE termin_related_groups DROP INDEX termin_id");
     $this->tryExecute("ALTER TABLE termin_related_groups DROP INDEX statusgruppe_id");
     $this->tryExecute("ALTER TABLE termin_related_groups CHANGE statusgruppe_id statusgruppe_id VARCHAR(32) NOT NULL");
     $this->tryExecute("ALTER TABLE termin_related_groups ADD PRIMARY KEY( termin_id, statusgruppe_id)");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:15,代码来源:185_tic6025_performance.php

示例10: up

 function up()
 {
     DBManager::get()->exec("\n\t        CREATE TABLE IF NOT EXISTS `fleximport_processes` (\n                `process_id` varchar(32) NOT NULL DEFAULT '',\n                `name` varchar(100) NOT NULL DEFAULT '',\n                `description` TEXT NULL,\n                `triggered_by_cronjob` tinyint(11) DEFAULT NULL,\n                `chdate` int(11) NOT NULL,\n                `mkdate` int(11) NOT NULL,\n                PRIMARY KEY (`process_id`)\n            );\n\t    ");
     DBManager::get()->exec("\n            ALTER TABLE `fleximport_tables` ADD `process_id` VARCHAR(32) NULL AFTER `table_id`;\n        ");
     $statement = DBManager::get()->prepare("\n            SELECT COUNT(*) as number\n            FROM fleximport_tables\n        ");
     $statement->execute();
     if ($statement->fetch(PDO::FETCH_COLUMN, 0) > 0) {
         $process = new FleximportProcess();
         $process['name'] = "Import";
         $process['triggered_by_cronjob'] = 1;
         $process->store();
         $statement = DBManager::get()->prepare("\n                UPDATE `fleximport_tables`\n                SET process_id = :process_id\n            ");
         $statement->execute(array('process_id' => $process->getId()));
     }
     DBManager::get()->exec("\n            ALTER TABLE `fleximport_tables` CHANGE `source` \n                `source` enum('csv_upload','csv_weblink','csv_studipfile','database','extern','sqlview') NOT NULL DEFAULT 'csv_upload';\n        ");
     SimpleORMap::expireTableScheme();
 }
开发者ID:Krassmus,项目名称:Fleximport,代码行数:17,代码来源:06_init_processes.php

示例11: up

 function up()
 {
     $db = DbManager::get();
     $db->exec("ALTER TABLE `message` DROP `chat_id`, DROP `readed`");
     $db->exec("ALTER TABLE `message_user` DROP `confirmed_read`");
     try {
         $db->exec("ALTER TABLE `message_user` DROP COLUMN `dont_delete`");
     } catch (Exception $e) {
     }
     $db->exec("ALTER TABLE `user_info` DROP `guestbook`");
     $db->exec("DROP TABLE object_rate");
     $db->exec("DROP TABLE object_user");
     $db->exec("DROP TABLE px_topics");
     $db->exec("DROP TABLE rss_feeds");
     $db->exec("DELETE FROM user_visibility_settings WHERE plugin IS NOT NULL");
     $db->exec("DELETE FROM user_visibility_settings WHERE identifier = 'plugins'");
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:18,代码来源:155_tic_5170_clean_up.php

示例12: up

 public function up()
 {
     $db = DBManager::get();
     // Setup new table
     $db->exec("\n            CREATE TABLE IF NOT EXISTS `pluginmarket_plugin_usages` (\n  `usage_id` varchar(32) NOT NULL,\n  `plugin_id` varchar(32) NOT NULL,\n  `user_id` varchar(32) NOT NULL,\n  `name` varchar(128) NOT NULL,\n  `approved` tinyint(4) NOT NULL DEFAULT 0,\n  `chdate` int(11) NOT NULL,\n  `mkdate` int(11) NOT NULL,\n  PRIMARY KEY (`usage_id`),\n  KEY (`plugin_id`),\n  KEY (`user_id`),\n  KEY (`name`)\n) ENGINE=MyISAM\n        ");
     SimpleORMap::expireTableScheme();
     $stmt = $db->query("SELECT * FROM pluginmarket_plugins");
     while ($plugin = $stmt->fetch(PDO::FETCH_ASSOC)) {
         $hits = preg_split("/(?:\n|,|\t)/", $plugin['in_use']);
         $hits = array_map('trim', $hits);
         $hits = array_filter($hits);
         foreach ($hits as $hit) {
             MarketPluginUsage::create(array('plugin_id' => $plugin['plugin_id'], 'user_id' => $plugin['user_id'], 'name' => $hit));
         }
     }
     // Modify old table
     $db->exec("ALTER TABLE pluginmarket_plugins DROP COLUMN in_use");
 }
开发者ID:studip,项目名称:PluginMarket,代码行数:18,代码来源:05_usage_proposals.php

示例13: up

 function up()
 {
     $query = "ALTER TABLE `scm`\n                  ADD COLUMN `position` INT(11) UNSIGNED NOT NULL DEFAULT 0";
     DBManager::get()->exec($query);
     $query = "UPDATE scm\n                  SET position = :position\n                  WHERE range_id = :range_id AND scm_id = :scm_id";
     $update_statement = DBManager::get()->prepare($query);
     $query = "SELECT range_id, scm_id FROM scm ORDER BY range_id ASC, mkdate ASC";
     $statement = DBManager::get()->query($query);
     $last_range = null;
     foreach ($statement as $row) {
         if ($row['range_id'] != $last_range) {
             $position = 0;
             $last_range = $row['range_id'];
         } else {
             $position += 1;
         }
         $update_statement->bindValue(':position', $position, PDO::PARAM_INT);
         $update_statement->bindValue(':range_id', $row['range_id']);
         $update_statement->bindValue(':scm_id', $row['scm_id']);
         $update_statement->execute();
     }
     // Expire orm cache, so the change can take effect
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:24,代码来源:110_scm_add_position.php

示例14: down

 public function down()
 {
     $query = "ALTER TABLE `datafields` DROP COLUMN `system`";
     DBManager::get()->exec($query);
     SimpleORMap::expireTableScheme();
 }
开发者ID:ratbird,项目名称:hope,代码行数:6,代码来源:183_tic6000_datafields_visibility.php

示例15: down

 public function down()
 {
     DBManager::get()->exec("DROP TABLE scm_tabs");
     SimpleORMap::expireTableScheme();
 }
开发者ID:anantace,项目名称:SCMTabs,代码行数:5,代码来源:001_add_scm_tabs_tables.php


注:本文中的SimpleORMap::expireTableScheme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。