UUDigitalHumanitieslab / EDPOP

A virtual research environment (VRE) that lets you collect, align and annotate bibliographical and biographical records from several online catalogs.
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Broken migration on develop #196

Closed jgonggrijp closed 1 month ago

jgonggrijp commented 1 month ago

Migration 6 from the vre app is preventing me from starting the docker-compose backend service:

2024-07-24 16:03:08 System check identified no issues (0 silenced).
2024-07-24 16:03:09 Operations to perform:
2024-07-24 16:03:09   Apply all migrations: admin, auth, authtoken, contenttypes, projects, sessions, vre
2024-07-24 16:03:09 Running migrations:
2024-07-24 16:03:09 Traceback (most recent call last):
2024-07-24 16:03:09   File "/usr/src/app/backend/manage.py", line 22, in <module>
2024-07-24 16:03:09     execute_from_command_line(sys.argv)
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
2024-07-24 16:03:09     utility.execute()
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 436, in execute
2024-07-24 16:03:09     self.fetch_command(subcommand).run_from_argv(self.argv)
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 412, in run_from_argv
2024-07-24 16:03:09     self.execute(*args, **cmd_options)
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 458, in execute
2024-07-24 16:03:09     output = self.handle(*args, **options)
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 106, in wrapper
2024-07-24 16:03:09     res = handle_func(*args, **kwargs)
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 356, in handle
2024-07-24 16:03:09     post_migrate_state = executor.migrate(
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 135, in migrate
2024-07-24 16:03:09     state = self._migrate_all_forwards(
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
2024-07-24 16:03:09     state = self.apply_migration(
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
2024-07-24 16:03:09     state = migration.apply(state, schema_editor)
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/db/migrations/migration.py", line 132, in apply
2024-07-24 16:03:09     operation.database_forwards(
2024-07-24 16:03:09   File "/usr/local/lib/python3.9/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
2024-07-24 16:03:09     self.code(from_state.apps, schema_editor)
2024-07-24 16:03:09   File "/usr/src/app/backend/vre/migrations/0006_annotation_context_collection_context.py", line 55, in save_collection_managing_group_as_context
2024-07-24 16:03:09     name=name_to_slug(obj.name),
2024-07-24 16:03:09 AttributeError: 'Collection' object has no attribute 'name'
2024-07-24 16:03:09   Applying vre.0006_annotation_context_collection_context...

@lukavdplas I think you wrote this migration, could you fix this?

lukavdplas commented 1 month ago

The migration referenced a field by the wrong name. I pushed the fix to develop (https://github.com/UUDigitalHumanitieslab/EDPOP/commit/7699af9895ad9b00af05bce410450a21f600072d). It should be fixed now, please re-open if it's not.

jgonggrijp commented 1 month ago

Yes, it is fixed now. Thanks!