I've talked with hannon -- i'll accept this change.



On Wed, Mar 13, 2013 at 10:45 AM, eslavich <notifications@github.com> wrote:

> In lib/partitioned/partitioned_base/sql_adapter.rb:
>
> > @@ -141,7 +141,8 @@ def create_partition_table(*partition_key_values)
> >                         :id => false,
> >                         :options => "INHERITS (#{configurator.parent_table_name(*partition_key_values)})"
> >                       }) do |t|
> > -          t.check_constraint configurator.check_constraint(*partition_key_values)
> > +          constraint = configurator.check_constraint(*partition_key_values)
> > +          t.check_constraint constraint if constraint
>
> Oh, sure. I don't think 'true' hurts me at all, it just looks goofy.
>
> I'm curious, though, why do you consider this to be a case of shenanigans?
> iphone_applications has many iphones, which in turn has many
> conversion_attributions. It seems reasonable to me to want to partition by
> a grouping of iphones (by iphone_application_id) rather than by iphone_id,
> since the number of iphone_ids is prohibitively large. It also doesn't seem
> like we should have to denormalize the table in order to make partitioned
> happy. Even if iphones wasn't itself partitioned, we'd still need to use a
> function if we wanted to make a meaningful check constraint.
>
> Anyway, that aside, I'll go ahead and change our check constraints for
> those tables to 'true'.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/fiksu/partitioned/pull/36/files#r3354961>
> .
>