Possible Duplicate:
Database Specific Migration Code
So I run MySQL locally since it’s what I have installed and it makes sense to me.
But Heroku uses Postgre and it doesn’t have the same field types.
I.e. I use longblob locally and it becomes bytea in my production environment.
I use tinytext locally which becomes just text
How do I specify different environments inside of my migrations so I don’t have to edit my migrations just for pushing to heroku? (I would like to keep them syntactically correct for my local machine)
Any other suggestions?
I understand wanting to run what you’re used to locally, as it’s easier. Plus, IMO, setting up Postgres locally has always been a pain in the past. However, it really is important to run your development on the same DB as your production server. If you’re a Mac user there’s a good solution now, brought to you by none other than the Heroku postgres team:
http://postgresapp.com/
Use that and you don’t have to worry about this. Otherwise, follow the answer posted by Mu, which will let you do the evil two database thing 🙂