MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / drop_all

Method drop_all

lib/sqlalchemy/sql/schema.py:5933–5959  ·  view source on GitHub ↗

Drop all tables stored in this metadata. Conditional by default, will not attempt to drop tables not present in the target database. :param bind: A :class:`.Connection` or :class:`.Engine` used to access the database. :param tables: Op

(
        self,
        bind: _CreateDropBind,
        tables: Optional[_typing_Sequence[Table]] = None,
        checkfirst: bool = True,
    )

Source from the content-addressed store, hash-verified

5931 )
5932
5933 def drop_all(
5934 self,
5935 bind: _CreateDropBind,
5936 tables: Optional[_typing_Sequence[Table]] = None,
5937 checkfirst: bool = True,
5938 ) -> None:
5939 """Drop all tables stored in this metadata.
5940
5941 Conditional by default, will not attempt to drop tables not present in
5942 the target database.
5943
5944 :param bind:
5945 A :class:`.Connection` or :class:`.Engine` used to access the
5946 database.
5947
5948 :param tables:
5949 Optional list of ``Table`` objects, which is a subset of the
5950 total tables in the ``MetaData`` (others are ignored).
5951
5952 :param checkfirst:
5953 Defaults to True, only issue DROPs for tables confirmed to be
5954 present in the target database.
5955
5956 """
5957 bind._run_ddl_visitor(
5958 ddl.SchemaDropper, self, checkfirst=checkfirst, tables=tables
5959 )
5960
5961
5962class Computed(FetchedValue, SchemaItem):

Callers 15

test_cycle_named_fksMethod · 0.95
test_use_alterMethod · 0.95
metadata_fixtureMethod · 0.95
test_ddl_hastableMethod · 0.95
test_execute_eventsMethod · 0.95
test_basicMethod · 0.95
_make_tablesMethod · 0.95
test_sessionMethod · 0.95
test_orm_many_enginesMethod · 0.95

Calls 1

_run_ddl_visitorMethod · 0.45

Tested by 15

test_cycle_named_fksMethod · 0.76
test_use_alterMethod · 0.76
metadata_fixtureMethod · 0.76
test_ddl_hastableMethod · 0.76
test_execute_eventsMethod · 0.76
test_basicMethod · 0.76
_make_tablesMethod · 0.76
test_sessionMethod · 0.76
test_orm_many_enginesMethod · 0.76