Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion When will Active Record be really Rails-independent? Concern about migrations
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ChuckE  
View profile  
 More options Oct 15 2012, 12:04 pm
From: ChuckE <honeyryderch...@gmail.com>
Date: Mon, 15 Oct 2012 09:04:21 -0700 (PDT)
Local: Mon, Oct 15 2012 12:04 pm
Subject: When will Active Record be really Rails-independent? Concern about migrations

Hi,

I found a special ActiveRecord case which messes a bit one requirement. I
have two applications sharing the same DB. For this reason we found wise to
share the DB mapping logic among both applications, namely, our
activerecord models. After extracting them into a gem and bundling them
into the two applications, everything went well.

Now, we found out it would also be wise to share the migrations, schema,
config, etc., maybe "delegate" such rake tasks as create migration and
schema dump to that shared repo, which would contain also this part of the
logic. Thing is, the use of the Rails class throughout all the rake tasks
concerning migrations make that impossible. Specially the load_config rake
task, which is apparently run before each and every rake task. This one
basically overwrites any rewrite I might have had done on the
ActiveRecord::Migrator.migration_paths with the local 'db/migrate' folder.
Which in my case would be empty in both application trees and full on the
shared repo. Because of that, I can't wisely set a new migration path
without entering a world of hurt and non-stop monkey patch. Which I'll
avoid by now. But basically, that load_config rake_task is messing up my
plans.

Another concern is the use of the Rails class itself. It could be the case
that I would be talking about two rails applications, but one of them
happens to be Sinatra, which doesn't own (or shouldn't own) any Rails
class. I've seen how they extended the migrations part for their version of
active record. Also a very limiting solution. So, I guess the solution will
probably not come from the frameworks readapting their needs to
activerecord, but activerecord having a consistent solution in its box,
making it then more extendable for other frameworks (I don't know how Merb
handles this, I might investigate into that).

So, I'd like to open the debate on the subject. Or maybe it has been opened
previously. I'd much like to hear your opinion.

Regards,
Tiago


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.