I am building an e-commerce application using spree in rails. The application uses PostgreSQL as database. I want it to be changed to MySQL. How do I achieve this?
-
Why do you want to downgrade?user330315– user3303152015-06-02 13:05:02 +00:00Commented Jun 2, 2015 at 13:05
-
This answer should help you: stackoverflow.com/questions/24237034/…RichardAE– RichardAE2015-06-02 13:13:00 +00:00Commented Jun 2, 2015 at 13:13
-
2This is more of a google question than a StackOverflow question. Come back to SO when you get stuck with the solution you found on google.Max Williams– Max Williams2015-06-02 13:15:52 +00:00Commented Jun 2, 2015 at 13:15
-
Better don't change as there are many changes which spree has in regards to both the databases .Caffeine Coder– Caffeine Coder2015-06-02 14:06:28 +00:00Commented Jun 2, 2015 at 14:06
1 Answer
The short answer is, you don't. I've been through three Spree migrations where we were either using legacy data, or switching databases and trust me; you want nothing to do with this.
If you don't need to take the old data with you, you should be fine just running the migrations on a fresh MySQL database. If you need the legacy data, God be with you...
Converting Spree database schema is nothing nice, and it's hard to just pull what you need out of the database since because almost every data model depends on a foreign key from another. There are dental procedures I would go through voluntarily before attempting what you are proposing. This also begs the question; why do you need to go to MySQL from Postgres?