0

In my dev database (SQLite) i have some tables (like vocabularies) which i need on production (PostgreSQL, MySQL). Is there some method to migrate table with data?

korywka
  • 7,537
  • 2
  • 26
  • 48

1 Answers1

1

Rails doesn't provide any way to dump the data out of a database but the database itself can. Through rails you can only dump the schema which already available in db/schema.rb. However, I would suggest you to dump the data in a CSV file and import from that CSV file into whatever database you wish.

To dump data into a CSV file follow this SO question and Sqlite3 Doc or Sqlite3 Administrator.

Community
  • 1
  • 1
Syed Aslam
  • 8,707
  • 5
  • 40
  • 54