In Rails 4+ in order to remove not-null constraint, you can use change_column_null
:
change_column_null :users, :address, true
Not sure you can call t.address
? Anyway... I would use change_column
like so
change_column :users, :address, :string, :null => true
Docs... http://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/change_column
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With