django-cms / djangocms-frontend

django CMS frontend is a plugin bundle for django CMS providing several components for the frontend, currently implemented with the popular Bootstrap 5 framework.
Other
43 stars 20 forks source link

migration failed KeyError: ('frontend_forms', 'captchafield') #31

Closed TLuesebrinck closed 2 years ago

TLuesebrinck commented 2 years ago

File "..\env\lib\site-packages\django\db\migrations\operations\models.py", line 264, in state_forwards
state.remove_model(app_label, self.name_lower) File "..\env\lib\site-packages\django\db\migrations\state.py", line 98, in remove_model del self.models[app_label, model_name] KeyError: ('frontend_forms', 'captchafield')

Is it something new in version 0.9.2 or did I broke something, it worked before with build 0.9.1

fsbraun commented 2 years ago

Can you share when this error occurred?

TLuesebrinck commented 2 years ago

python manage.py migrate Running migrations: . . Applying frontend_forms.0002_auto_20220429_1150...Traceback (most recent call last):

fsbraun commented 2 years ago

There were buggy migrations in 0.9.2. I've yanked the release. Please use 0.9.3. Thank you for pointing this out!

TLuesebrinck commented 2 years ago

I still have problems with the fontend_forms: Successfully installed djangocms-frontend-0.9.3 (env) PS > python manage.py migrate Traceback (most recent call last): File ".\manage.py", line 22, in main() File ".\manage.py", line 18, in main execute_from_command_line(sys.argv) File ".\env\lib\site-packages\django\core\management__init.py", line 419, in execute_from_command_line utility.execute() File ".\env\lib\site-packages\django\core\management__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File ".\env\lib\site-packages\django\core\management\base.py", line 354, in run_from_argv self.execute(*args, cmd_options) File ".\env\lib\site-packages\django\core\management\base.py", line 398, in execute output = self.handle(*args, *options) File ".\env\lib\site-packages\django\core\management\base.py", line 89, in wrapped res = handle_func(args, kwargs) File ".\env\lib\site-packages\django\core\management\commands\migrate.py", line 92, in handle executor = MigrationExecutor(connection, self.migration_progress_callback) File ".\env\lib\site-packages\django\db\migrations\executor.py", line 18, in init self.loader = MigrationLoader(self.connection) File ".\env\lib\site-packages\django\db\migrations\loader.py", line 53, in init__ self.build_graph() File ".\env\lib\site-packages\django\db\migrations\loader.py", line 259, in build_graph self.graph.validate_consistency() File ".\env\lib\site-packages\django\db\migrations\graph.py", line 195, in validate_consistency [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)] File ".\env\lib\site-packages\django\db\migrations\graph.py", line 195, in [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)] File ".\env\lib\site-packages\django\db\migrations\graph.py", line 58, in raise_error raise NodeNotFoundError(self.error_message, self.key, origin=self.origin) django.db.migrations.exceptions.NodeNotFoundError: Migration frontend_forms.0003_merge_0002_auto_20220429_1150_0002_auto_20220510_1223 dependencies reference nonexistent parent node ('frontend_forms', '0002_auto_20220429_1150')

Am Di., 10. Mai 2022 um 21:55 Uhr schrieb Fabian Braun < @.***>:

Closed #31 https://github.com/django-cms/djangocms-frontend/issues/31.

— Reply to this email directly, view it on GitHub https://github.com/django-cms/djangocms-frontend/issues/31#event-6584785307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMV5NUMSG666QEYMC2RSTLVJK5M3ANCNFSM5VRZX32Q . You are receiving this because you authored the thread.Message ID: @.***>

fsbraun commented 2 years ago

There seem to be leftover migrations from 0.9.2. Can you try uninstall and then reinstall 0.9.3?

Is it possible that frontend_forms.0003_merge_0002_auto_20220429_1150_0002_auto_20220510_12 was created locally somewhere in the process? If so, please delete. Each frontend app should only have an initial migration.

TLuesebrinck commented 2 years ago

how can I delete this? is it a file? where it is located?

Am Mi., 11. Mai 2022 um 12:15 Uhr schrieb Fabian Braun < @.***>:

There seem to be leftover migrations from 0.9.2. Can you try uninstall and then reinstall 0.9.3?

Is it possible that frontend_forms.0003_merge_0002_auto_20220429_1150_0002_auto_20220510_12 was created locally somewhere in the process? If so, please delete. Each frontend app should only have an initial migration.

— Reply to this email directly, view it on GitHub https://github.com/django-cms/djangocms-frontend/issues/31#issuecomment-1123513870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMV5NVDGMO462LWQ5NIA7DVJOCDNANCNFSM5VRZX32Q . You are receiving this because you authored the thread.Message ID: @.***>

TLuesebrinck commented 2 years ago

ok found it. After deleting the old migration file it works fine.

Am Mi., 11. Mai 2022 um 13:13 Uhr schrieb Thiemo Lüsebrinck < @.***>:

how can I delete this? is it a file? where it is located?

Am Mi., 11. Mai 2022 um 12:15 Uhr schrieb Fabian Braun < @.***>:

There seem to be leftover migrations from 0.9.2. Can you try uninstall and then reinstall 0.9.3?

Is it possible that frontend_forms.0003_merge_0002_auto_20220429_1150_0002_auto_20220510_12 was created locally somewhere in the process? If so, please delete. Each frontend app should only have an initial migration.

— Reply to this email directly, view it on GitHub https://github.com/django-cms/djangocms-frontend/issues/31#issuecomment-1123513870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMV5NVDGMO462LWQ5NIA7DVJOCDNANCNFSM5VRZX32Q . You are receiving this because you authored the thread.Message ID: @.***>

fsbraun commented 2 years ago

That's good news! 👍