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?

bravedick
  • 7,030
  • 2
  • 23
  • 47

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,547
  • 5
  • 43
  • 53