First I created a CharField: ('currency', models.CharField(max_length=30)),
In a later migration I changed it to a foreign key field: field=models.ForeignKey(to='web.Currency'), It worked on a local MySql instance, but not on Postgres on Heroku: django.db.utils.ProgrammingError: column "currency_id" cannot be cast automatically to type integer HINT: Specify a USING expression to perform the conversion. If I do the following manually, I can continue: alter table web_financialdata drop column currency; alter table web_financialdata add column currency integer; Should I add this via RunSQL between the migrations. If so, how? Or is there a better way? Thanks, Martin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bdde39c8-a81a-4228-bb68-cbebb675d729%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.