Checking the existance of a NOT NULL constraint from Active

Hi,

I’d like to check the existance of a NOT NULL constraint for a given
attribute using ActiveRecord. Is this possible or do I have to
painstakingly query the information_schema myself? I need this for
some reflection in a custom association.

Thanks,

  • Rowan

do a,

puts MyTable.columns.inspect

and you should see what you need.
[Hint: look for @null]

It works. I now know where to look for this and related information.

Thanks a lot!

  • Rowan