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