[LRUG] Multiple databases, migration, integration...
Riccardo Tacconi
rtacconi at gmail.com
Fri Jan 8 04:29:37 PST 2010
Ok guys,
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:
create_table "posts", :force => false do |t|
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.
On Fri, Jan 8, 2010 at 12:13 PM, David Salgado <david at digitalronin.com>wrote:
> > I am still not understanding how you manage your migrations. How do you
> 'I
> > just make sure all
> > migrations happen from within the Rails codebase'? Is there a way to
> exclude
> > legacy tables from a Rails environment?
>
> No, I just don't consider them to be 'legacy' tables. I just treat
> them in exactly the same way as any other table in a rails app.
>
> I have a git project for the rails app. and a git project for the PHP
> app. Both use the same database. I only ever allow migrations in the
> rails app., even if the migration is for something in the PHP app.
> That way, the schema_migrations records in the rails app. are always
> consistent, and I don't have to worry about managing migrations that
> could have happened from PHP-land as well, which would be a nightmare.
>
> David
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
--
Riccardo Tacconi
VIRTUELOGIC LIMITED
http://www.linkedin.com/in/riccardotacconi
http://riccardotacconi.blogspot.com/
http://twitter.com/rtacconi
Linux user: #400461
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20100108/6bf36002/attachment-0003.html>
More information about the Chat
mailing list