create all index tables for the field and drop tables no longer needed.
557824
public function CreateIndexTables()
    {
        $aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames();
        $aTmpIndex = array();
        foreach ($aIndexTableNames as $sTableName => $length) {
            $aTmpIndex['_tmp'.$sTableName] = $length;
        }
        $aIndexTableNames = $aTmpIndex;
        foreach ($aIndexTableNames as $sTableName => $iLength) {
            if (TCMSRecord::TableExists($sTableName)) {
                $query = "DROP TABLE `{$sTableName}`";
                MySqlLegacySupport::getInstance()->query($query);
            }
            $sPrimaryKey = '';
            $query = 'CREATE TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($sTableName)."` (
                    `shop_article_id` CHAR(36) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'the shop article',
                    `substring` CHAR( {$iLength} ) NOT NULL COMMENT 'the substring',
                    `cms_language_id` CHAR(36) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'language of substring',
                    `occurrences` INT NOT NULL COMMENT 'Number of times the substring occured in the field for that article',
                    `weight` FLOAT NOT NULL COMMENT 'calculated weight for the substring',
                    `shop_search_field_weight_id` CHAR(36) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'field for which the search term was made'
                    {$sPrimaryKey}
                  )";
            MySqlLegacySupport::getInstance()->query($query);
        }

        // drop index fields not needed
        $sBaseName = '_tmp'.self::INDEX_TBL_PREFIX;
        $query = "SHOW TABLES LIKE '".MySqlLegacySupport::getInstance()->real_escape_string($sBaseName)."%'";
        $rTableRes = MySqlLegacySupport::getInstance()->query($query);
        while ($aTableData = MySqlLegacySupport::getInstance()->fetch_row($rTableRes)) {
            if (!array_key_exists($aTableData[0], $aIndexTableNames)) {
                $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($aTableData[0]).'`';
                MySqlLegacySupport::getInstance()->query($query);
            }
        }
    }
337225
def drop_columns(records, slices):
    
    for record in records:
        # Generate a set of indices to remove
        drop = set(i for slice in slices
                   for i in range(*slice.indices(len(record))))
        keep = [i not in drop for i in range(len(record))]
        record.seq = Seq(''.join(itertools.compress(record.seq, keep)), record.seq.alphabet)
        yield record
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))
177023
def drop_table(self, model, cascade=True):
        
        del self.orm[model._meta.table_name]
        self.ops.append(self.migrator.drop_table(model, cascade))
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)
        );
    }
833620
public void dropIndex (Connection conn, String table, String index) throws SQLException
    {
        executeQuery(conn, "DROP INDEX " + columnSQL(index));
    }
381124
protected function dropTables()
    {
        $tables = $this->db->query(
            'SHOW FULL TABLES WHERE TABLE_TYPE LIKE "BASE_TABLE"',
            DbAdapter::QUERY_MODE_EXECUTE
        );

        // Disable foreign key checks -- we are wiping the database on purpose
        $this->db->query(
            'SET FOREIGN_KEY_CHECKS = 0',
            DbAdapter::QUERY_MODE_EXECUTE
        );

        foreach ($tables as $table) {
            $this->db->query(
                'DROP TABLE '.reset($table),
                DbAdapter::QUERY_MODE_EXECUTE
            );
        }

        // Re-enable foreign key checks
        $this->db->query(
            'SET FOREIGN_KEY_CHECKS = 1',
            DbAdapter::QUERY_MODE_EXECUTE
        );
    }
1190680
public void createTables( boolean makeIndexes ) throws Exception {
        database.executeInsertUpdateDeleteSql("DROP TABLE IF EXISTS " + TABLE_TILES);
        database.executeInsertUpdateDeleteSql("DROP TABLE IF EXISTS " + TABLE_METADATA);
        database.executeInsertUpdateDeleteSql(CREATE_TILES);
        database.executeInsertUpdateDeleteSql(CREATE_METADATA);
        if (makeIndexes) {
            createIndexes();
        }
    }
2154
def _drop_indices(self):
        """"""
        self._logger.info('Dropping database indices')
        self._conn.execute(constants.DROP_TEXTNGRAM_INDEX_SQL)
        self._logger.info('Finished dropping database indices')
1363647
def drop_index(self, table, column):
        """"""
        self.execute('ALTER TABLE {0} DROP INDEX {1}'.format(wrap(table), column))
        self._printer('\tDropped index from column {0}'.format(column))
782539
public function reset()
    {
        $this->tableNames = [];
        $this->databaseFields = [];
        $this->databaseIndexes = [];
        $this->defaultDatabaseIndexes = [];
        $this->compositeFields = [];
    }
1188808
public function deleteAll() {

        $tablenames = $this->getAllTableNames();
        foreach ($tablenames as $tablename) {
            $this->databaseConnection->query("DROP TABLE " . $tablename);
        }

    }
300113
public function dropAllTables()
    {
        if ($this->connection->getDatabaseName() !== ':memory:') {
            return $this->refreshDatabaseFile();
        }

        $this->connection->select($this->grammar->compileEnableWriteableSchema());

        $this->connection->select($this->grammar->compileDropAllTables());

        $this->connection->select($this->grammar->compileDisableWriteableSchema());

        $this->connection->select($this->grammar->compileRebuild());
    }
892676
protected function dropIndexes()
    {
        foreach ($this->sortedTables() as $table) {
            if ($table->exists()) {
                $table->save(HandlerInterface::DROP_INDEXES, false);
            }
        }
    }
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']);
      }
    }
  }
922326
public function down()
    {
    	Schema::drop('SL_Databases');
		Schema::drop('SL_Tables');
		Schema::drop('SL_Fields');
		Schema::drop('SL_Definitions');
		Schema::drop('SL_BusRules');
		Schema::drop('SL_Tree');
		Schema::drop('SL_Node');
		Schema::drop('SL_NodeResponses');
		Schema::drop('SL_Conditions');
		Schema::drop('SL_ConditionsVals');
		Schema::drop('SL_ConditionsNodes');
		Schema::drop('SL_ConditionsArticles');
		Schema::drop('SL_DataLoop');
		Schema::drop('SL_DataSubsets');
		Schema::drop('SL_DataHelpers');
		Schema::drop('SL_DataLinks');
		Schema::drop('SL_Images');
		Schema::drop('SL_SearchRecDump');
		Schema::drop('SL_DesignTweaks');
		Schema::drop('SL_Sess');
		Schema::drop('SL_SessLoops');
		Schema::drop('SL_NodeSavesPage');
		Schema::drop('SL_NodeSaves');
		Schema::drop('SL_SessEmojis');
		Schema::drop('SL_SessSite');
		Schema::drop('SL_SessPage');
		Schema::drop('SL_Tokens');
		Schema::drop('SL_UsersRoles');
		Schema::drop('SL_Contact');
		Schema::drop('SL_Emails');
		Schema::drop('SL_Emailed');
		Schema::drop('SL_UsersActivity');
		Schema::drop('SL_LogActions');
		Schema::drop('SL_Zips');
		Schema::drop('SL_AddyGeo');
		Schema::drop('SL_Uploads');
	
    }
1030429
protected function dropForeignKeys()
    {
        foreach ($this->sortedTables() as $table) {
            if ($table->exists()) {
                $table->save(HandlerInterface::DROP_FOREIGN_KEYS, false);
            }
        }
    }