La forma más sencilla de transferir un modelo de datos a la migración de Rails

I have designed a data model which has almost 24 tables. I have finished specifying the relations and all the data types are finalized. Now, I want to convert it to migrations in Rails.

I have all the scripts ready for it to be created in MySQL. Is there any tool that converts all the table creation queries into a single Rails migration file?

Muchas Gracias

preguntado el 09 de enero de 11 a las 12:01

1 Respuestas

I haven't done it myself but according to this post on the ruby forums

rake db:schema:dump

should be sufficient (delete the schema.rb beforehand).

The almost same question here on SO: Ruby / Rails - Migración inversa - DDL a código Ruby

contestado el 23 de mayo de 17 a las 15:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.