예제 #1
0
 /**
  * Run repair step.
  * Must throw exception on error.
  *
  * @throws \Exception in case of failure
  */
 public function run()
 {
     foreach ($this->oldDatabaseTables() as $tableName) {
         if ($this->connection->tableExists($tableName)) {
             $this->emit('\\OC\\Repair', 'info', [sprintf('Table %s has been deleted', $tableName)]);
             $this->connection->dropTable($tableName);
         }
     }
 }
예제 #2
0
 /**
  * Run repair step.
  * Must throw exception on error.
  *
  * @throws \Exception in case of failure
  */
 public function run(IOutput $output)
 {
     $tables = $this->oldDatabaseTables();
     $output->startProgress(count($tables));
     foreach ($this->oldDatabaseTables() as $tableName) {
         if ($this->connection->tableExists($tableName)) {
             $this->connection->dropTable($tableName);
         }
         $output->advance(1, "Drop old database table: {$tableName}");
     }
     $output->finishProgress();
 }
예제 #3
0
 /**
  * @depends testTableExists
  */
 public function testDropTable()
 {
     $this->makeTestTable();
     $this->assertTableExist('table');
     $this->connection->dropTable('table');
     $this->assertTableNotExist('table');
 }
예제 #4
0
파일: connection.php 프로젝트: gvde/core
 public function testSetValuesOverWritePrecondition()
 {
     $this->makeTestTable();
     $this->connection->setValues('table', ['integerfield' => 1], ['textfield' => 'foo', 'booleanfield' => true, 'clobfield' => 'not_null']);
     $this->connection->setValues('table', ['integerfield' => 1], ['textfield' => 'bar'], ['booleanfield' => true]);
     $this->assertEquals('bar', $this->getTextValueByIntergerField(1));
     $this->connection->dropTable('table');
 }
예제 #5
0
파일: db.php 프로젝트: farukuzun/core-1
 /**
  * Drop a table from the database if it exists
  *
  * @param string $table table name without the prefix
  */
 public function dropTable($table)
 {
     $this->connection->dropTable($table);
 }
예제 #6
0
 public function tearDown()
 {
     $this->db->dropTable('contacts_addressbooks');
     $this->db->dropTable('contacts_cards');
     parent::tearDown();
 }
예제 #7
0
 public function tearDown()
 {
     $this->db->dropTable('clndr_calendars');
     $this->db->dropTable('clndr_objects');
     parent::tearDown();
 }