You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be possible to add a safe_make_column_not_nullable method, source
I think something like:
defsafe_make_column_not_nullable(table,column)unsafe_execute"ALTER TABLE #{table} ADD CONSTRAINT tmp_not_null_constraint CHECK (#{column} IS NOT NULL) NOT VALID"unsafe_execute"ALTER TABLE #{table} VALIDATE CONSTRAINT tmp_not_null_constraint"unsafe_execute"ALTER TABLE #{table} ALTER COLUMN #{column} SET NOT NULL"unsafe_execute"ALTER TABLE #{table} DROP CONSTRAINT tmp_not_null_constraint"end
The text was updated successfully, but these errors were encountered:
I think it would be possible to add a safe_make_column_not_nullable method, source
I think something like:
The text was updated successfully, but these errors were encountered: