# frozen_string_literal: true

class RemoveLangFromUsers < ActiveRecord::Migration
  def change
    remove_column :users, :lang, :string, limit: 4, null: false
  end
end

# frozen_string_literal: true

class RemoveLangFromUsers < ActiveRecord::Migration
  def up
    remove_column :users, :lang, :string, limit: 4, null: false
  end

  def down
    add_column :users, :lang, :string, limit: 4

    execute "UPDATE users SET lang = 'es'"

    change_column_null :users, :lang, false
  end
end

Fix migration not being properly reversible
Fix migration not being properly reversible
