1

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?

4
  • Why do you want to downgrade? Commented Jun 2, 2015 at 13:05
  • This answer should help you: stackoverflow.com/questions/24237034/… Commented Jun 2, 2015 at 13:13
  • 2
    This 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. Commented Jun 2, 2015 at 13:15
  • Better don't change as there are many changes which spree has in regards to both the databases . Commented Jun 2, 2015 at 14:06

1 Answer 1

0

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?

Sign up to request clarification or add additional context in comments.

1 Comment

True , even i was confused about the same . I have seen ppl migrating from mysql to postgresql but not the other way , this is a first .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.