Skip to content

Bug: MySQL/MariaDB error with typeclasses tag migration 0007 #1184

@vincent-lg

Description

@vincent-lg

Brief summary of issue / Description of requested feature:

Since the new migration, 'evennia migrate' hangs. See traceback below.

  Applying typeclasses.0007_tag_migrations_may_be_slow...Traceback (most recent call last):
  File "c:\users\vincent\pyenv\Scripts\evennia_launcher.py", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "C:\Users\Vincent\evennia\bin\windows\evennia_launcher.py", line 16, in <module>
    main()
  File "c:\users\vincent\evennia\evennia\server\evennia_launcher.py", line 1360, in main
    django.core.management.call_command(*args, **kwargs)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\core\management\__init__.py", line 119, in call_command
    return command.execute(*args, **defaults)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\core\management\base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\core\management\commands\migrate.py", line 200, in handle
    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\migrations\executor.py", line 92, in migrate
    self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\migrations\executor.py", line 121, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\migrations\executor.py", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\migrations\migration.py", line 123, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\migrations\operations\models.py", line 359, in database_forwards
    getattr(new_model._meta, self.option_name, set()),
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\backends\base\schema.py", line 318, in alter_unique_together
    self._delete_composed_index(model, fields, {'unique': True}, self.sql_delete_unique)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\backends\mysql\schema.py", line 87, in _delete_composed_index
    return super(DatabaseSchemaEditor, self)._delete_composed_index(model, fields, *args)
  File "c:\users\vincent\pyenv\Lib\site-packages\django\db\backends\base\schema.py", line 347, in _delete_composed_index
    ", ".join(columns),
ValueError: Found wrong number (0) of constraints for typeclasses_tag(db_key, db_category, db_tagtype)

Steps to reproduce the issue / Reasons for adding feature:

I am using MySQL to host the evennia database. Everything worked until I pulled and installed a new, clean database.

  1. I git pull-ed the Evennia repository.
  2. I drop my old MySQL database after dumping it, and created a new one.
  3. I deleted the auto-generated file in evennia typeclasses/migrations/008...
  4. Back in my MYD directory, I 'evennia makemigrations'
  5. And 'evennia migrate' which gave me the traceback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn actual error or unwanted behavior.more info neededCan't continue resolving without more info.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions