поля? я поменял с CharField на SlugField и добавил unique=True. makemigrations это нашел а вот migrate выдал следующую ошибку: Operations to perform:
Apply all migrations: admin, api, auth, contenttypes, documentation, sessions
Running migrations:
Applying api.0002_auto_20190820_1417...Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\core\management\__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\core\management\base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\core\management\base.py", line 364, in execute
output = self.handle(*args, **options)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\core\management\base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\core\management\commands\migrate.py", line 234, in handle
fake_initial=fake_initial,
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\migrations\executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\migrations\executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\migrations\executor.py", line 245, in apply_migration
state = migration.apply(state, schema_editor)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\migrations\migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\migrations\operations\fields.py", line 249, in database_forwards
schema_editor.alter_field(from_model, from_field, to_field)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\backends\base\schema.py", line 535, in alter_field
old_db_params, new_db_params, strict)
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\backends\base\schema.py", line 603, in _alter_field
exclude=meta_index_names,
File "C:\Projects\hfmc-api\venv\lib\site-packages\django\db\backends\base\schema.py", line 1129, in _constraint_names
if type_ is not None and infodict['type'] != type_:
KeyError: 'type'
Кто может помочь?
Обсуждают сегодня