class RemoveNullConstraintsFromSpreeTables < ActiveRecord::Migration
  def up
    change_column :spree_properties, :presentation, :string, null: true
    change_column :spree_taxonomies, :name,         :string, null: true
    change_column :spree_taxons,     :name,         :string, null: true
  end

  def down
    change_column :spree_properties, :presentation, :string, null: false
    change_column :spree_taxonomies, :name,         :string, null: false
    change_column :spree_taxons,     :name,         :string, null: false
  end
end

Remove the null constraint on several spree tables
Remove the null constraint on several spree tables

As with globalize 5.0 the original table column won't be updated
anymore (https://github.com/globalize/globalize/pull/396#issuecomment-70192861),
we need to remove the null constraints from the `spree_taxonomies.name`
`spree_taxons.name` and `spree_properties.presentation` columns.

Otherwise writing to the database fails with NOT NULL errors.

Fixes #513
