Skip to content

Instantly share code, notes, and snippets.

@bnymn
Created March 21, 2017 11:42
Show Gist options
  • Save bnymn/2f7ab92d7461e1665f000638f0cf76bf to your computer and use it in GitHub Desktop.
Save bnymn/2f7ab92d7461e1665f000638f0cf76bf to your computer and use it in GitHub Desktop.
class AddApprovedToUser < ActiveRecord::Migration
def self.up
add_column :spree_users, :approved, :boolean, :default => false, :null => false
add_index :spree_users, :approved
end
def self.down
remove_index :spree_users, :approved
remove_column :spree_users, :approved
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment