Ok guys,<br><br>Sorry if I have created some confusion but I am not yet an expert in migrations. I will need to read and write tables, although I might use read_only_model in the future. My fear is to modifying schema of old tables, not the data. I suppose that a table that is not defined in schema.rb will not be touched by Rails and by using:<br>
<br><pre><font size="4">create_table "posts", :force => false do |t|</font><br></pre>Any migration will modify that table (:force set to false). Since I consider myself new to Rails, I do not know all the magic things happening behind the scenes.<br>
<br><div class="gmail_quote">On Fri, Jan 8, 2010 at 12:13 PM, David Salgado <span dir="ltr"><<a href="mailto:david@digitalronin.com">david@digitalronin.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> I am still not understanding how you manage your migrations. How do you 'I<br>
> just make sure all<br>
> migrations happen from within the Rails codebase'? Is there a way to exclude<br>
> legacy tables from a Rails environment?<br>
<br>
</div>No, I just don't consider them to be 'legacy' tables. I just treat<br>
them in exactly the same way as any other table in a rails app.<br>
<br>
I have a git project for the rails app. and a git project for the PHP<br>
app. Both use the same database. I only ever allow migrations in the<br>
rails app., even if the migration is for something in the PHP app.<br>
That way, the schema_migrations records in the rails app. are always<br>
consistent, and I don't have to worry about managing migrations that<br>
could have happened from PHP-land as well, which would be a nightmare.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Riccardo Tacconi<br>VIRTUELOGIC LIMITED<br><br><a href="http://www.linkedin.com/in/riccardotacconi">http://www.linkedin.com/in/riccardotacconi</a><br><a href="http://riccardotacconi.blogspot.com/">http://riccardotacconi.blogspot.com/</a><br>
<a href="http://twitter.com/rtacconi">http://twitter.com/rtacconi</a><br>Linux user: #400461<br>