Hi John, i just installed multigtfs 0.3.1, started from a fresh PostGIS database, synced the database, and then ran python manage.py migrate multigtfs and got the following error
Running migrations for multigtfs:
- Migrating forwards to 0015_populate_field_route_geometry.
> multigtfs:0001_initial
> multigtfs:0002_auto__chg_field_fare_transfers
> multigtfs:0003_convert_fare_transfers
> multigtfs:0004_auto_add_geopoint_fields
> multigtfs:0005_migrate_lat_lon_to_point
> multigtfs:0006_auto_del_lat_lon_fields
> multigtfs:0007_rm_geography_points
FATAL ERROR - The following SQL query failed: ALTER TABLE "shape_point" ALTER COLUMN "point" TYPE geometry(POINT,4326), ALTER COLUMN "point" SET NOT NULL, ALTER COLUMN "point" DROP DEFAULT;
The error was: column "point" cannot be cast automatically to type geometry
HINT: Specify a USING expression to perform the conversion.
Error in migration: multigtfs:0007_rm_geography_points
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
ignore_ghosts = ignore_ghosts,
File "/usr/local/lib/python2.7/site-packages/south/migration/__init__.py", line 220, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 232, in migrate_many
result = migrator.__class__.migrate_many(migrator, target, migrations, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 307, in migrate_many
result = self.migrate(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 132, in migrate
result = self.run(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 116, in run
return self.run_migration(migration, database)
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 86, in run_migration
migration_function()
File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 62, in <lambda>
return (lambda: direction(orm))
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/multigtfs/migrations/0007_rm_geography_points.py", line 14, in forwards
db.alter_column('shape_point', 'point', self.gf('django.contrib.gis.db.models.fields.PointField')())
File "/usr/local/lib/python2.7/site-packages/south/db/generic.py", line 47, in _cache_clear
return func(self, table, *args, **opts)
File "/usr/local/lib/python2.7/site-packages/south/db/generic.py", line 536, in alter_column
flatten(values),
File "/usr/local/lib/python2.7/site-packages/south/db/generic.py", line 282, in execute
cursor.execute(sql, params)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/db/backends/util.py", line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/Users/araichev/.virtualenvs/gtfs_explorer_develop/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column "point" cannot be cast automatically to type geometry
HINT: Specify a USING expression to perform the conversion.
Hi John, i just installed multigtfs 0.3.1, started from a fresh PostGIS database, synced the database, and then ran
python manage.py migrate multigtfs
and got the following error