Drops the target table.
425299
def drop_table(self, cursor, target, options):
        ""
        sql = 'DROP TABLE IF EXISTS {0}'
        cursor.execute(sql.format(self.qualified_names[target]))
784767
public void dropTable(String tblName, Transaction tx) {
		// Remove the file
		RecordFile rf = getTableInfo(tblName, tx).open(tx, true);
		rf.remove();

		// Optimization: remove from the TableInfo map
		tiMap.remove(tblName);

		// remove the record from tblcat
		RecordFile tcatfile = tcatInfo.open(tx, true);
		tcatfile.beforeFirst();
		while (tcatfile.next()) {
			if (tcatfile.getVal(TCAT_TBLNAME).equals(new VarcharConstant(tblName))) {
				tcatfile.delete();
				break;
			}
		}
		tcatfile.close();

		// remove all records whose field FCAT_TBLNAME equals to tblName from fldcat
		RecordFile fcatfile = fcatInfo.open(tx, true);
		fcatfile.beforeFirst();
		while (fcatfile.next()) {
			if (fcatfile.getVal(FCAT_TBLNAME).equals(new VarcharConstant(tblName)))
				fcatfile.delete();
		}
		fcatfile.close();

		// remove corresponding indices
		List<IndexInfo> allIndexes = new LinkedList<IndexInfo>();
		Set<String> indexedFlds = VanillaDb.catalogMgr().getIndexedFields(tblName, tx);
		
		for (String indexedFld : indexedFlds) {
			List<IndexInfo> iis = VanillaDb.catalogMgr().getIndexInfo(tblName, indexedFld, tx);
			allIndexes.addAll(iis);
		}
		
		for (IndexInfo ii : allIndexes)
			VanillaDb.catalogMgr().dropIndex(ii.indexName(), tx);

		// remove corresponding views
		Collection<String> vnames = VanillaDb.catalogMgr().getViewNamesByTable(tblName, tx);
		Iterator<String> vnameiter = vnames.iterator();
		while (vnameiter.hasNext())
			VanillaDb.catalogMgr().dropView(vnameiter.next(), tx);
	}
379315
static void drop(CallInfo callInfo, DB db, String tableName) {
    String sql = String.format("DROP TABLE %s", tableName);
    db.access(callInfo, () -> {
      db.logSetup(callInfo, sql);
      try (WrappedStatement ws = db.compile(sql)) {
        PreparedStatement dropStmt = ws.getStatement();
        dropStmt.execute();
      }
      return 0; 
    });
  }
397935
@Override
    public void dropSchema()
    {
        // dropping all the tables in the Oracle NoSQL store
        if (operation != null && operation.equalsIgnoreCase("create-drop"))
        {
            for (TableInfo tableInfo : tableInfos)
            {
                try
                {
                    StatementResult result = tableAPI.executeSync("DROP TABLE IF EXISTS " + tableInfo.getTableName());
                    if (!result.isSuccessful())
                    {
                        throw new SchemaGenerationException("Unable to DROP TABLE " + tableInfo.getTableName());
                    }
                }
                catch (IllegalArgumentException e)
                {
                    logger.error("Invalid DROP TABLE Statement. Caused By: ", e);
                    throw new SchemaGenerationException(e, "Invalid DROP TABLE Statement. Caused By: ");
                }
                catch (FaultException e)
                {
                    logger.error("DROP TABLE Statement couldn't be executed. Caused By: ", e);
                    throw new SchemaGenerationException(e, "Invalid DROP TABLE Statement is executed. Caused By: ");
                }
            }
        }
    }
197153
def drop():
    
    # Ensure the connection is up
    _State.connection()
    _State.table.drop(checkfirst=True)
    _State.metadata.remove(_State.table)
    _State.table = None
    _State.new_transaction()
1359855
public function drop() {
        
        $conn = ConnectionManager::get('default');

        $stmt1 = $conn->execute('TRUNCATE TABLE aros_acos');
        $info1 = $stmt1->errorInfo();
        if ($info1[1] != null) {
            $this->log($info1, LOG_ERR);
            if(!empty($info1)) {
                $this->Flash->error($info1);
            }
        }
        
        $stmt2 = $conn->execute('TRUNCATE TABLE acos');
        $info2 = $stmt2->errorInfo();
        if ($info2[1] != null) {
            $this->log($info2, LOG_ERR);
            if(!empty($info2)) {
                $this->Flash->error($info2);
            }
        }
        
        $stmt3 = $conn->execute('TRUNCATE TABLE aros');
        $info3 = $stmt3->errorInfo();
        if ($info3[1] != null) {
            $this->log($info3, LOG_ERR);
            if(!empty($info3)) {
                $this->Flash->error($info3);
            }
        }

        $this->Flash->success(__("ACOs and AROs have been dropped."));
        $this->redirect(["action" => "index"]);
    }
752403
private function dropObsoleteRoutines(): void
  {
    // Make a lookup table from routine name to source.
    $lookup = [];
    foreach ($this->sources as $source)
    {
      $lookup[$source['routine_name']] = $source;
    }

    // Drop all routines not longer in sources.
    foreach ($this->rdbmsOldMetadata as $old_routine)
    {
      if (!isset($lookup[$old_routine['routine_name']]))
      {
        $this->io->logInfo('Dropping %s <dbo>%s</dbo>',
                           strtolower($old_routine['routine_type']),
                           $old_routine['routine_name']);

        DataLayer::dropRoutine($old_routine['routine_type'], $old_routine['routine_name']);
      }
    }
  }
1072985
def drop(self):
        
        Statement = self.get_model('statement')
        Tag = self.get_model('tag')

        Statement.objects.all().delete()
        Tag.objects.all().delete()
309031
def drop_table(self, table):
        
        job_id = self.submit("DROP TABLE %s"%table, context="MYDB")
        status = self.monitor(job_id)
        if status[0] != 5:
            raise Exception("Couldn't drop table %s"%table)
756632
public function down()
    {
        $this->db->createCommand("SET foreign_key_checks = 0")->execute();
        $this->dropTable('{{%property_property_group}}');

        $this->dropTable('{{%property_translation}}');
        $this->dropTable('{{%property}}');
        $this->dropTable('{{%property_group_translation}}');
        $this->dropTable('{{%property_group}}');

        $this->dropTable('{{%property_storage}}');

        $this->dropTable('{{%static_value_translation}}');
        $this->dropTable('{{%static_value}}');

        $this->dropTable(ApplicablePropertyModels::tableName());
        $this->dropTable('{{%property_handlers}}');
        $this->db->createCommand("SET foreign_key_checks = 1")->execute();
    }
157250
def _drop(self, table, existing_tables=None):
        """"""
        # Retrieve list of existing tables for comparison
        existing_tables = existing_tables if existing_tables else self.tables

        # Only drop table if it exists
        if table in existing_tables:
            # Set to avoid foreign key errorrs
            self.execute('SET FOREIGN_KEY_CHECKS = 0')

            query = 'DROP TABLE {0}'.format(wrap(table))
            self.execute(query)

            # Set again
            self.execute('SET FOREIGN_KEY_CHECKS = 1')
            self._printer('\tDropped table {0}'.format(table))
1225054
public void dropSchema()
    {
        if (operation != null && operation.equalsIgnoreCase("create-drop"))
        {
            try
            {
                HTableDescriptor hTableDescriptor = null;
                if (admin.isTableAvailable(databaseName))
                {
                    if (admin.isTableEnabled(databaseName))
                    {
                        hTableDescriptor = admin.getTableDescriptor(databaseName.getBytes());
                        admin.disableTable(databaseName);
                    }
                    for (TableInfo tableInfo : tableInfos)
                    {
                        if (tableInfo != null && tableInfo.getTableName() != null
                                && hTableDescriptor.getFamily(tableInfo.getTableName().getBytes()) != null)
                        {
                            admin.deleteColumn(databaseName, tableInfo.getTableName());
                        }
                    }
                }
            }
            catch (TableNotFoundException tnfe)
            {
                logger.error("Table doesn't exist, Caused by ", tnfe);
                throw new SchemaGenerationException(tnfe, "Hbase");
            }
            catch (IOException ioe)
            {
                logger.error("Table isn't in enabled state, Caused by", ioe);
                throw new SchemaGenerationException(ioe, "Hbase");
            }
            finally
            {
                try
                {
                    admin.enableTable(databaseName);
                }
                catch (IOException ioe)
                {
                    logger.error("Table isn't in enabled state, Caused by", ioe);
                    throw new SchemaGenerationException(ioe, "Hbase");
                }
            }
        }
        operation = null;
        admin = null;
    }
390838
public function dropAllTables()
    {
        $tables = [];

        $excludedTables = ['spatial_ref_sys'];

        foreach ($this->getAllTables() as $row) {
            $row = (array) $row;

            $table = reset($row);

            if (! in_array($table, $excludedTables)) {
                $tables[] = $table;
            }
        }

        if (empty($tables)) {
            return;
        }

        $this->connection->statement(
            $this->grammar->compileDropAllTables($tables)
        );
    }
928541
def DropTables(self):
    """"""

    rows, _ = self.ExecuteQuery(
        "SELECT table_name FROM information_schema.tables "
        "WHERE table_schema='%s'" % self.database_name)
    for row in rows:
      self.ExecuteQuery("DROP TABLE `%s`" % row["table_name"])
360151
public function down()
    {
        if ( ! $this->hasConnection()) {
            Schema::dropIfExists($this->getTableName());

            return;
        }

        Schema::connection($this->getConnection())->dropIfExists($this->getTableName());
    }
492622
public function dropAllTables()
    {
        $tables = [];

        foreach ($this->getAllTables() as $row) {
            $row = (array) $row;

            $tables[] = reset($row);
        }

        if (empty($tables)) {
            return;
        }

        $this->disableForeignKeyConstraints();

        $this->connection->statement(
            $this->grammar->compileDropAllTables($tables)
        );

        $this->enableForeignKeyConstraints();
    }
1250400
public function down()
    {
        // remove DB Table:
        $manager = $this->modx->getManager();

        // the class table object name
        $table_class = $this->blender->getBlendClassObject();
        //foreach ($this->blender_table_classes as $table_class) {
            if ($manager->removeObjectContainer($table_class)) {
                $this->blender->out($table_class.' table class has been dropped');

            } else {
                $this->blender->out($table_class.' table class was not dropped', true);
            }
        //}

        // remove events:
        foreach ($this->blender_events as $event_name) {
            $this->removeSystemEvents($event_name);
        }

        /** @var \LCI\Blend\Blendable\SystemSetting $systemSetting */
        $systemSetting = $this->blender->getBlendableLoader()->getBlendableSystemSetting('blend.version');
        $systemSetting
            ->setSeedsDir($this->getSeedsDir())
            ->revertBlend();

        foreach ($this->empty_settings as $key) {
            /** @var \LCI\Blend\Blendable\SystemSetting $systemSetting */
            $systemSetting = $this->blender->getBlendableLoader()->getBlendableSystemSetting($key);
            $systemSetting
                ->setSeedsDir($this->getSeedsDir())
                ->revertBlend();
        }

        $this->modx->cacheManager->refresh();
    }