Задать вопрос
@denismatveyev7

GeoDjango — при команде migrate выдает ошибку?

Добрый день!

Проект GeoDjango, DB PostgreSQL 9.5, PostGIS 2.2.2

При миграции данных выдает ошибку:

Applying fl_app.0003_auto_20160613_1615...Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\core\management__init.py", line 354, in execute_from_command_line utility.execute() File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\core\management__init.py", line 346, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\core\management\base.py", line 394, in run_from_argv self.execute(*args, cmd_options) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\core\management\base.py", line 445, in execute output = self.handle(*args, options) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\core\management\commands\migrate.py", line 222, in handle executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\migrations\executor.py", line 110, in migrate self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\migrations\executor.py", line 148, in apply_migration state = migration.apply(state, schema_editor) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\migrations\migration.py", line 115, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\migrations\operations\fields.py", line 201, in database_forwards schema_editor.alter_field(from_model, from_field, to_field) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\backends\base\schema.py", line 484, in alter_field old_db_params, new_db_params, strict) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\backends\base\schema.py", line 636, in _alter_field params, File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\backends\base\schema.py", line 111, in execute cursor.execute(sql, params) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\backends\utils.py", line 79, in execute return super(CursorDebugWrapper, self).execute(sql, params) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\backends\utils.py", line 64, in execute return self.cursor.execute(sql, params) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\utils.py", line 98, in exit six.reraise(dj_exc_type, dj_exc_value, traceback) File "C:\commercial_projects\fl-g-maps\lib\site-packages\django\db\backends\utils.py", line 64, in execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: ╨Ю╨и╨Ш╨С╨Ъ╨Р: ╤Б╤В╨╛╨╗╨▒╨╡╤Ж "coords" ╨╜╨╡╨╗╤М╨╖╤П ╨░╨▓╤В╨╛╨╝╨░╤В╨╕╤З╨╡╤Б╨║╨╕ ╨┐╤А╨╕╨▓╨╡╤Б╤В╨╕ ╨║ ╤В╨╕╨┐╤Г geometry HINT: ╨Т╨╛╨╖╨╝╨╛╨╢╨╜╨╛, ╨╜╨╡╨╛╨▒╤Е╨╛╨┤╨╕╨╝╨╛ ╤Г╨║╨░╨╖╨░╤В╤М "USING coords::geometry(Point,4326)".

Спасибо огромное за помощь!
  • Вопрос задан
  • 357 просмотров
Подписаться 1 Оценить Комментировать
Решения вопроса 1
@marazmiki
Укротитель питонов
Это Постгрес так ругается:
ОШИБКА: столбец "coords" нельзя автоматически привести к типу geometry HINT: Возможно, необходимо указать "USING coords::geometry(Point,4326)".


Что там в тех миграциях?
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы