(cfg, eng)
| 275 | |
| 276 | |
| 277 | def drop_all_schema_objects(cfg, eng): |
| 278 | drop_all_schema_objects_pre_tables(cfg, eng) |
| 279 | |
| 280 | drop_views(cfg, eng) |
| 281 | |
| 282 | if config.requirements.materialized_views.enabled: |
| 283 | drop_materialized_views(cfg, eng) |
| 284 | |
| 285 | inspector = inspect(eng) |
| 286 | |
| 287 | consider_schemas = (None,) |
| 288 | if config.requirements.schemas.enabled_for_config(cfg): |
| 289 | consider_schemas += (cfg.test_schema, cfg.test_schema_2) |
| 290 | util.drop_all_tables(eng, inspector, consider_schemas=consider_schemas) |
| 291 | |
| 292 | drop_all_schema_objects_post_tables(cfg, eng) |
| 293 | |
| 294 | if config.requirements.sequences.enabled_for_config(cfg): |
| 295 | with eng.begin() as conn: |
| 296 | for seq in inspector.get_sequence_names(): |
| 297 | conn.execute(ddl.DropSequence(schema.Sequence(seq))) |
| 298 | if config.requirements.schemas.enabled_for_config(cfg): |
| 299 | for schema_name in [cfg.test_schema, cfg.test_schema_2]: |
| 300 | for seq in inspector.get_sequence_names( |
| 301 | schema=schema_name |
| 302 | ): |
| 303 | conn.execute( |
| 304 | ddl.DropSequence( |
| 305 | schema.Sequence(seq, schema=schema_name) |
| 306 | ) |
| 307 | ) |
| 308 | |
| 309 | |
| 310 | def drop_views(cfg, eng): |
nothing calls this directly
no test coverage detected