MCPcopy
hub / github.com/ormar-orm/ormar / create_schemas

Function create_schemas

tests/lifespan.py:56–63  ·  view source on GitHub ↗
(
    connection: sqlalchemy.Connection, config: OrmarConfig
)

Source from the content-addressed store, hash-verified

54
55
56def create_schemas(
57 connection: sqlalchemy.Connection, config: OrmarConfig
58) -> None: # pragma: no cover
59 schemas = collect_schemas(config.metadata)
60 if connection.dialect.name not in ("postgresql", "mysql"):
61 return
62 for schema in schemas:
63 connection.execute(CreateSchema(schema, if_not_exists=True))
64
65
66def drop_schemas(

Callers 1

setup_tablesFunction · 0.85

Calls 2

collect_schemasFunction · 0.85
executeMethod · 0.80

Tested by

no test coverage detected