On Saturday, September 23, 2017 at 9:03:05 AM UTC-7, Tim Uckun wrote:
>
> I want to create my models with an "id" column but I want to set the 
> defaults to them myself using a function I wrote like this.
>
> CREATE TABLE public.blah
> (
> id bigint NOT NULL DEFAULT lib.id_generator(),
> ....
>
> Is there a way to write a migration in  sequel DSL to do this? 
>

create_table(Sequel[:public][:blah]) do
  Bignum :id, null: false, default: Sequel.function('lib.id_generator')
end
 
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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to