Forum: Ruby on Rails creating migrations

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9f4a65c520a69cd357d830661e172272?d=identicon&s=25 JannaB (Guest)
on 2009-06-06 00:01
(Received via mailing list)
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
D188e591eac11021329b8821a5f954c7?d=identicon&s=25 Ar Chron (railsdog)
on 2009-06-06 00:16
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)?
46f52c33235283752423837b91c581dd?d=identicon&s=25 Norm (Guest)
on 2009-06-06 00:31
(Received via mailing list)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
JannaB wrote:
<blockquote
 cite="mid:d0257662-863c-4875-bc8d-179acb495a9b@21g2000vbk.googlegroups.com"
 type="cite">
  <pre wrap="">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
  </pre>
</blockquote>
The purpose of migrations is to create the database tables.&nbsp; They
are
not really needed for anything else.&nbsp; If you do not need them to
recreate the tables you do not need the migrations.<br>
<br>
--~--~---------~--~----~------------~-------~--~----~<br>
You received this message because you are subscribed to the Google
Groups &quot;Ruby on Rails: Talk&quot; group. <br> To post to this
group, send email to rubyonrails-talk@googlegroups.com <br> To
unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com <br> For more options,
visit this group at
http://groups.google.com/group/rubyonrails-talk?hl...
-~----------~----~----~----~------~----~------~--~---<br>
</body>
</html>
<br>
9f4a65c520a69cd357d830661e172272?d=identicon&s=25 JannaB (Guest)
on 2009-06-06 04:26
(Received via mailing list)
So, I guess the answer to my question -- can I create migrations from
a given sql schema, is no?
A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-06-06 05:35
(Received via mailing list)
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)
9f4a65c520a69cd357d830661e172272?d=identicon&s=25 JannaB (Guest)
on 2009-06-06 05:45
(Received via mailing list)
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 <mauricio.linha...@gmail.com>
This topic is locked and can not be replied to.