WIP: force remove index for package_extent

This commit is contained in:
Taro Matsuzawa 2021-01-07 13:45:33 +09:00
parent 12eb8c05e0
commit 77558ec3bf
1 changed files with 8 additions and 8 deletions

View File

@ -71,13 +71,13 @@ def spatial_setup():
if not table.exists():
create_postgis_tables()
# When running the tests with the --reset-db option for some
# reason the metadata holds a reference to the `package_extent`
# table after being deleted, causing an InvalidRequestError
# exception when trying to recreate it further on
if "package_extent" in meta.metadata.tables:
meta.metadata.remove(meta.metadata.tables["package_extent"])
Session.execute("DROP INDEX idx_package_extent_the_geom")
Session.commit()
# When running the tests with the --reset-db option for some
# reason the metadata holds a reference to the `package_extent`
# table after being deleted, causing an InvalidRequestError
# exception when trying to recreate it further on
if "package_extent" in meta.metadata.tables:
meta.metadata.remove(meta.metadata.tables["package_extent"])
Session.execute("DROP INDEX idx_package_extent_the_geom")
Session.commit()
spatial_db_setup()