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


PHP OC_DB::dropTable方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     if (OC_DB::tableExists('encryption_test')) {
         OC_DB::dropTable('encryption_test');
     }
     $this->assertTableNotExist('encryption_test');
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:7,代码来源:migration.php

示例2: tearDown

 protected function tearDown()
 {
     // do not drop the table for Oracle as it will create a bogus transaction
     // that will break the following test suites requiring transactions
     if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') !== 'oci') {
         \OC_DB::dropTable('table');
     }
     parent::tearDown();
 }
开发者ID:evanjt,项目名称:core,代码行数:9,代码来源:mdb2schemamanager.php

示例3: setUp

 public function setUp()
 {
     $this->loginHelper(self::TEST_ENCRYPTION_MIGRATION_USER1);
     $this->view = new \OC\Files\View();
     $this->public_share_key_id = \OCA\Files_Encryption\Helper::getPublicShareKeyId();
     $this->recovery_key_id = \OCA\Files_Encryption\Helper::getRecoveryKeyId();
     if (\OC_DB::tableExists('encryption_test')) {
         \OC_DB::dropTable('encryption_test');
     }
     $this->assertTableNotExist('encryption_test');
 }
开发者ID:yheric455042,项目名称:owncloud82,代码行数:11,代码来源:migration.php

示例4: dropTableEncryption

 public function dropTableEncryption()
 {
     $tableName = $this->tableName;
     if (!\OC_DB::tableExists($tableName)) {
         return;
     }
     $sql = "select `uid`, max(`recovery_enabled`) as `recovery_enabled`, min(`migration_status`) as `migration_status` from `*PREFIX*{$tableName}` group by `uid`";
     $query = \OCP\DB::prepare($sql);
     $result = $query->execute(array())->fetchAll();
     foreach ($result as $row) {
         \OC_Preferences::setValue($row['uid'], 'files_encryption', 'recovery_enabled', $row['recovery_enabled']);
         \OC_Preferences::setValue($row['uid'], 'files_encryption', 'migration_status', $row['migration_status']);
     }
     \OC_DB::dropTable($tableName);
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:15,代码来源:migration.php

示例5:

<?php

/**
 * @author Björn Schießle <schiessle@owncloud.com>
 * @author Christopher Schäpers <kondou@ts.unde.re>
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 *
 * @copyright Copyright (c) 2015, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
$installedVersion = OCP\Config::getAppValue('files_trashbin', 'installed_version');
if (version_compare($installedVersion, '0.6', '<')) {
    //size of the trash bin could be incorrect, remove it for all users to
    //enforce a recalculation during next usage.
    \OC_DB::dropTable('files_trashsize');
}
开发者ID:brunomilet,项目名称:owncloud-core,代码行数:30,代码来源:update.php

示例6:

<?php

/**
 * @author Björn Schießle <schiessle@owncloud.com>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 * @author Victor Dubiniuk <dubiniuk@owncloud.com>
 *
 * @copyright Copyright (c) 2015, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
$installedVersion = OCP\Config::getAppValue('files_versions', 'installed_version');
// move versions to new directory
if (version_compare($installedVersion, '1.0.4', '<')) {
    \OC_DB::dropTable("files_versions");
}
// Cron job for deleting expired trash items
\OC::$server->getJobList()->add('OCA\\Files_Versions\\BackgroundJob\\ExpireVersions');
开发者ID:evanjt,项目名称:core,代码行数:30,代码来源:update.php

示例7: dropTestTable

 protected static function dropTestTable()
 {
     if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') !== 'oci') {
         \OC_DB::dropTable('table');
     }
 }
开发者ID:evanjt,项目名称:core,代码行数:6,代码来源:connection.php

示例8: tearDown

 public function tearDown()
 {
     \OC_DB::dropTable('table');
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:4,代码来源:mdb2schemamanager.php


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