Hi Jeremy,

On Sun, Feb 15, 2015 at 08:59:56AM -0800, Jeremy Evans wrote:
> On Sunday, February 15, 2015 at 12:58:04 AM UTC-8, Matt Palmer wrote:
> > On Sat, Feb 14, 2015 at 11:04:46PM -0800, Jeremy Evans wrote: 
> > > 6) Instead of overriding generator methods to recognize the :comment 
> > > option, override the Database schema methods (e.g. 
> > > Database#create_table_indexes_from_generator, which you are already 
> > > overriding) to check for the :comment option.  That would probably 
> > simplify 
> > > things quite a bit. 
> >
> > I'm not sure what you mean here, but I'll cogitate on it a little and I'm 
> > sure it'll come to me. 
> 
> Basically, in create_table_indexes_from_generator, just examine 
> generator.indexes, generator.columns, and generator.constraints and look 
> for the :comment options, instead of overriding generator methods to 
> recognize them and all handle them roughly the same way.  For alter table, 
> you can override apply_alter_table_generator or apply_alter_table to the 
> same effect.

I came to roughly the same conclusion as I was dropping off to sleep last
night.  I wasn't 100% sure that was what you meant though, since I couldn't
be confident, with my head on a pillow, that the indexes/columns/constraints
list actually contained all of the original options passed in.  So, thanks
for confirming for me that that will work.  It'll gut a huge amount of the
most gnarly and unhappy code in the plugin.

- Matt

-- 
<Igloo> I remember going to my first tutorial in room 404. I was most upset
when I found it.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to