Hi,
in my DB schema I previously created a constraint using
constraint_validations using
Sequel.migration do
up do
create_table :repos do
validate do
format URL_RX, :url, :name => "url_is_simple"
end; end; end; end
I now need to modify the schema so that it allows NULL's for url. I am not
sure what the right way using constraint_validations is. My attempt was to
drop and recreate the constraint:
Sequel.migration do
up do
alter_table :repos do
validate do
drop 'url_is_simple'
format URL_RX, :url, :name => "url_is_simple", :allow_nil => true
end; end; end; end
After migrating, the repos table has the correct constraint; unfortunately,
the url_is_simple validation is missing from sequel_constraint_validations.
Is there another way to achieve this ?
David
--
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.