budu / lobos

A library to create and manipulate SQL database schemas with migrations support.
http://budu.github.com/lobos/
267 stars 56 forks source link

how to remove a column constraint #59

Open mylesmegyesi opened 11 years ago

mylesmegyesi commented 11 years ago

Currently, I have a column that has a "NOT NULL" constraint and I need to remove it. So far, I haven't found a way to this using the DSL. The only solution I have found is to execute raw SQL like so:

(raw-update "ALTER TABLE table_name ALTER COLUMN column_name DROP NOT NULL")

Is there a way to do this through the DSL that I have missed?

sthomp commented 9 years ago

How did you get (raw-update ...) working? When I use it I get an error java.lang.Exception: no current database connection.

mylesmegyesi commented 9 years ago

Honestly, its been years since I worked with lobos and don't even have access to the offending code anymore. So, I won't be able to provide much help in reproducing the error anymore.