Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managing osm.pgosm_flex via Sqitch breaks ability to move/remove osm schema #318

Closed
rustprooflabs opened this issue May 2, 2023 · 2 comments · Fixed by #324
Closed

Managing osm.pgosm_flex via Sqitch breaks ability to move/remove osm schema #318

rustprooflabs opened this issue May 2, 2023 · 2 comments · Fixed by #324
Labels
bug Something isn't working
Milestone

Comments

@rustprooflabs
Copy link
Owner

What version of PgOSM Flex are you using?

0.8.0

What did you do exactly?

I loaded data to an external database, ran drop schema osm cascade; and re-ran import.

What did you expect to happen?

I expected the import to work.

What did happen instead?

The Sqitch deployment has no clue I dropped the osm schema, so does not try to create osm.pgosm_flex table. The insert into osm.pgosm_flex naturally fails...

2023-05-01 18:12:50,190:INFO:pgosm-flex:helpers:PgOSM Flex version:  0.8.0-8fb2621
Traceback (most recent call last):
  File "/app/docker/pgosm_flex.py", line 568, in <module>
    run_pgosm_flex()
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/app/docker/pgosm_flex.py", line 134, in run_pgosm_flex
    import_id = db.start_import(pgosm_region=helpers.get_region_combined(region, subregion),
  File "/app/docker/db.py", line 269, in start_import
    cur.execute(sql_raw, params=params)
  File "/usr/local/lib/python3.9/dist-packages/psycopg/cursor.py", line 723, in execute
    raise ex.with_traceback(None)
psycopg.errors.UndefinedTable: relation "osm.pgosm_flex" does not exist
LINE 2: INSERT INTO osm.pgosm_flex
                    ^

What did you do to try analyzing the problem?

I plan to create a .sql file to allow creating the osm.pgosm_flex table from Python when necessary.

@rustprooflabs rustprooflabs added the bug Something isn't working label May 2, 2023
@rustprooflabs rustprooflabs added this to the 0.8.1 milestone May 2, 2023
@rustprooflabs
Copy link
Owner Author

Caused by #312

@rustprooflabs rustprooflabs changed the title Managing osm.pgosm_flex via Sqitch breaks any ability to move/remove osm schema Managing osm.pgosm_flex via Sqitch breaks ability to move/remove osm schema May 2, 2023
@rustprooflabs
Copy link
Owner Author

Merged into main via #328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant