On Monday, July 29, 2013 4:16:32 PM UTC-7, Jeremy Evans wrote:
>
> Another (unrelated) issue we had was creating a table that inherits from
>> another one. We solved it via:
>> def create_table_from_generator(name, generator, options)
>> sql = create_table_sql(name, generator, options)
>>
>> if options.has_key? :inherits
>> sql = "#{ sql } INHERITS (#{
>> quote_schema_table(options[:inherits]) })"
>> end
>> execute_ddl(sql)
>> end
>>
>> but I'm not sure that is the best solution or if it would make sense to
>> be changed somewhere postgres specific. Not a big deal anyway.
>>
>
> That change should definitely be in the postgres shared adapter file, as
> the syntax is PostgreSQL-specific. I can probably take care of that.
>
Here's a diff for the :inherits option: http://pastie.org/8188247
Please test it out and let me know what you think. It's similar to your
diff but handles inheriting from multiple tables.
Thanks,
Jeremy
--
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/groups/opt_out.