(
connection: sqlalchemy.Connection, config: OrmarConfig
)
| 54 | |
| 55 | |
| 56 | def 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 | |
| 66 | def drop_schemas( |
no test coverage detected