Creating migrations


#1

I have a legacy db I need to write a project around. Can someone tell
me how I can create my migrations from the table structure. Can this
even be done, or must I create my migrations by hand? Thanks, Janna


#2

JannaB wrote:

I have a legacy db I need to write a project around. Can someone tell
me how I can create my migrations from the table structure. Can this
even be done, or must I create my migrations by hand? Thanks, Janna

If you already have a legacy DB, why do you need migrations (aside from
making future modifications)?


#3
JannaB wrote:
I have a legacy db I need to write a project around. Can 
someone tell
me how I can create my migrations from the table structure. Can this
even be done, or must I create my migrations by hand? Thanks, Janna
  
The purpose of migrations is to create the database tables.  They are not really needed for anything else.  If you do not need them to recreate the tables you do not need the migrations.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to removed_email_address@domain.invalid
To unsubscribe from this group, send email to removed_email_address@domain.invalid
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


#4

So, I guess the answer to my question – can I create migrations from
a given sql schema, is no?


#5

Configure this legacy database in your database.yml file and then:

rake db:schema:dump

The schema.rb file will contain the legacy database structure.

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) |
http://codeshooter.wordpress.com/ (en)


#6

Thank you. I need this to move it from one db type to another. -Janna
B.

On Jun 5, 11:34 pm, Maurício Linhares removed_email_address@domain.invalid