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

Method create_all

lib/sqlalchemy/sql/schema.py:5905–5931  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

5903 util.warn(f"Skipping table {name}: {uerr}")
5904
5905 def create_all(
5906 self,
5907 bind: _CreateDropBind,
5908 tables: Optional[_typing_Sequence[Table]] = None,
5909 checkfirst: bool = True,
5910 ) -> None:
5911 """Create all tables stored in this metadata.
5912
5913 Conditional by default, will not attempt to recreate tables already
5914 present in the target database.
5915
5916 :param bind:
5917 A :class:`.Connection` or :class:`.Engine` used to access the
5918 database.
5919
5920 :param tables:
5921 Optional list of ``Table`` objects, which is a subset of the total
5922 tables in the ``MetaData`` (others are ignored).
5923
5924 :param checkfirst:
5925 Defaults to True, don't issue CREATEs for tables already present
5926 in the target database.
5927
5928 """
5929 bind._run_ddl_visitor(
5930 ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
5931 )
5932
5933 def drop_all(
5934 self,

Callers 15

test_cycle_named_fksMethod · 0.95
test_use_alterMethod · 0.95
test_ddl_hastableMethod · 0.95
test_via_engineMethod · 0.95
test_execute_eventsMethod · 0.95
test_basicMethod · 0.95
_make_tablesMethod · 0.95

Calls 1

_run_ddl_visitorMethod · 0.45

Tested by 15

test_cycle_named_fksMethod · 0.76
test_use_alterMethod · 0.76
test_ddl_hastableMethod · 0.76
test_via_engineMethod · 0.76
test_execute_eventsMethod · 0.76
test_basicMethod · 0.76
_make_tablesMethod · 0.76