Sha256: 8f5965a1ece1327eb27b716d058f7885c65df8e074e7dc85cf6eead3a7bb1bc0
Contents?: true
Size: 926 Bytes
Versions: 4
Compression:
Stored size: 926 Bytes
Contents
# This migration comes from spree (originally 20091015153048) class AddOpenidFieldToUsers < ActiveRecord::Migration def up add_column :users, :openid_identifier, :string add_index :users, :openid_identifier change_column :users, :login, :string, :default => nil, :null => true change_column :users, :crypted_password, :string, :default => nil, :null => true change_column :users, :salt, :string, :default => nil, :null => true end def down remove_column :users, :openid_identifier # Due to namespacing change, temporarily set the table back to users Spree::User.table_name = 'users' [:login, :crypted_password, :salt].each do |field| Spree::User.where(field => nil).each { |user| user.update_column(field, '') if user.send(field).nil? } change_column :users, field, :string, :default => '', :null => false end Spree::User.table_name = 'spree_users' end end
Version data entries
4 entries across 4 versions & 1 rubygems