/** * 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); } } }
/** * 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(); }
/** * @depends testTableExists */ public function testDropTable() { $this->makeTestTable(); $this->assertTableExist('table'); $this->connection->dropTable('table'); $this->assertTableNotExist('table'); }
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'); }
/** * 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); }
public function tearDown() { $this->db->dropTable('contacts_addressbooks'); $this->db->dropTable('contacts_cards'); parent::tearDown(); }
public function tearDown() { $this->db->dropTable('clndr_calendars'); $this->db->dropTable('clndr_objects'); parent::tearDown(); }