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

[Bug]: Setting views fails when migrating from 208 to 217 #31

Closed
daanvaningen opened this issue Jul 25, 2023 · 0 comments · Fixed by #32
Closed

[Bug]: Setting views fails when migrating from 208 to 217 #31

daanvaningen opened this issue Jul 25, 2023 · 0 comments · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@daanvaningen
Copy link
Contributor

daanvaningen commented Jul 25, 2023

Contact Details

daan.vaningen@nelen-schuurmans.nl

Complexity

moderate

Priority

medium prio

What happened?

threedi_schema -s ../threedigrid-builder/threedigrid_builder/tests/data/v2_bergermeer_spatialite4.sqlite migrate

The current schema revision is: 208
Running alembic upgrade script...
Traceback (most recent call last):
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/bin/threedi_schema", line 33, in <module>
    sys.exit(load_entry_point('threedi-schema', 'console_scripts', 'threedi_schema')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/threedi_schema/scripts.py", line 38, in migrate
    schema.upgrade(
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/threedi_schema/application/schema.py", line 130, in upgrade
    self.set_views()
  File "/home/daan/code/threedigrid-builder/.venv-py3-11/lib/python3.11/site-packages/threedi_schema/application/schema.py", line 163, in set_views
    raise MigrationMissingError(
threedi_schema.application.errors.MigrationMissingError: Setting views requires schema version 217. Current version: 208.

How to Reproduce?

Python 3.11

threedi_schema -s ../threedigrid-builder/threedigrid_builder/tests/data/v2_bergermeer_spatialite4.sqlite migrate

What did you expect and what was the actual result?

Successful migrations from 208 to 217 including the views

Add screenshots, video's etc

The maximum size for files is 25MB and the maximum size for images is 10MB.

Relevant log output

No response

Additional info

Anything else you would like to share?

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.

3 participants