Drop all gauged tables
969900
def drop_schema(self):
        """"""
        try:
            self.cursor.execute("""
                DROP TABLE IF EXISTS gauged_data;
                DROP TABLE IF EXISTS gauged_keys;
                DROP TABLE IF EXISTS gauged_writer_history;
                DROP TABLE IF EXISTS gauged_cache;
                DROP TABLE IF EXISTS gauged_statistics;
                DROP TABLE IF EXISTS gauged_metadata""")
            self.db.commit()
        except self.psycopg2.InternalError:  # pragma: no cover
            self.db.rollback()
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']);
      }
    }
  }
195784
public function dropAllTables()
    {
        $this->disableForeignKeyConstraints();

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

        $this->enableForeignKeyConstraints();
    }
1261502
def drop_table(self, tablename: str) -> int:
        """"""
        sql = "DROP TABLE IF EXISTS {}".format(tablename)
        log.info("Dropping table " + tablename + " (ignore any warning here)")
        return self.db_exec_literal(sql)
574049
def drop(self, table):
        
        blueprint = self._create_blueprint(table)

        blueprint.drop()

        self._build(blueprint)
43168
public void dropAllTracks() {
		tracksUnused.addAll(tracksDormant);
		tracksUnused.addAll(tracksPureKlt);
		tracksUnused.addAll(tracksReactivated);

		tracksSpawned.clear();
		tracksPureKlt.clear();
		tracksReactivated.clear();
		tracksSpawned.clear();
		tracksDormant.clear();
	}
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: ");
                }
            }
        }
    }
425299
def drop_table(self, cursor, target, options):
        ""
        sql = 'DROP TABLE IF EXISTS {0}'
        cursor.execute(sql.format(self.qualified_names[target]))
976946
def drop_all(self):
        '''  '''
        self.drop(self.get_table_names())
        if self.persistent:
            with self._lock:
                try:
                    dbfolder = os.path.join(self.root_dir, self.name)
                    if os.path.exists(dbfolder) and not os.listdir(dbfolder):
                        rmtree(dbfolder)
                except (IOError, WindowsError):
                    self._print('Failed to delete folder %s when dropping database' % self.name)
                finally:
                    del self
712429
def drop_columns(self, model, *names, **kwargs):
        """"""
        fields = [field for field in model._meta.fields.values() if field.name in names]
        cascade = kwargs.pop('cascade', True)
        for field in fields:
            self.__del_field__(model, field)
            if field.unique:
                index_name = make_index_name(model._meta.table_name, [field.column_name])
                self.ops.append(self.migrator.drop_index(model._meta.table_name, index_name))
            self.ops.append(
                self.migrator.drop_column(
                    model._meta.table_name, field.column_name, cascade=cascade))
        return model
868641
def teardown(self):
        """"""
        for table_spec in reversed(self._table_specs):
            with self._conn:
                table_spec.teardown(self._conn)
1262936
def drop_table(self, model_class):
        '''
        
        '''
        if model_class.is_system_model():
            raise DatabaseException("You can't drop system table")
        self._send(model_class.drop_table_sql(self))
892676
protected function dropIndexes()
    {
        foreach ($this->sortedTables() as $table) {
            if ($table->exists()) {
                $table->save(HandlerInterface::DROP_INDEXES, false);
            }
        }
    }
440135
private static void removeAll(Connection conn, ArrayList<String> usedTables) {
	int len = usedTables.size();

	for (int i = 0; i < len; i++) {

	    String tableName = usedTables.get(i).toString();
	    // print.out("remove:"+tableName);
	    try {
		removeTable(conn, tableName);
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	}
    }
1374288
def UninstallTrump(RemoveDataTables=True, RemoveOverrides=True, RemoveFailsafes=True):
    
    
    ts = ['_symbols', '_symbol_validity', '_symbol_tags', '_symbol_aliases', 
          '_feeds', '_feed_munging', '_feed_munging_args', '_feed_sourcing', 
          '_feed_validity', '_feed_meta', '_feed_tags', '_feed_handle', 
          '_index_kwargs', '_indicies', '_symbol_handle', '_symboldatadef']
    
    if RemoveOverrides:
        ts.append('_overrides')
        
    if RemoveFailsafes:
        ts.append('_failsafes')

    engine = create_engine(ENGINE_STR)
       
    if RemoveDataTables:
        results = engine.execute("SELECT name FROM _symbols;")
        datatables = [row['name'] for row in results]
        ts = ts + datatables
    
    drops = "".join(['DROP TABLE IF EXISTS "{}" CASCADE;'.format(t) for t in ts])
    
    engine.execute(drops)
1195143
public function cleanup_tables()
    {

        logger()->info('Performing table maintenance');

        // Prune the failed jobs table
        FailedJob::where('id', '<', (FailedJob::max('id') - 100))->delete();

        // Prune the server statuses older than a week.
        ServerStatus::where('created_at', '<', carbon('now')->subWeek(1))->delete();

        // Prune ESI statuses older than a week
        EsiStatus::where('created_at', '<', carbon('now')->subWeek(1))->delete();

        // Remove groups with no users
        Group::doesntHave('users')->delete();
    }
1300785
def _drop(self, tree):
        
        tablename = tree.table
        kwargs = {}
        try:
            ret = self.connection.delete_table(tablename, **kwargs)
        except DynamoDBError as e:
            if e.kwargs["Code"] == "ResourceNotFoundException" and tree.exists:
                return False
            raise
        return True