Sha256: e5a69a4c839e3139962e96b7909d83216a65ad75426fb51e408d6ebe86736ca8
Contents?: true
Size: 706 Bytes
Versions: 3
Compression:
Stored size: 706 Bytes
Contents
class DeviseInvitableAddTo<%= table_name.camelize %> < ActiveRecord::Migration def self.up change_table :<%= table_name %> do |t| t.string :invitation_token, :limit => 60 t.datetime :invitation_sent_at t.index :invitation_token # for invitable end # And allow null encrypted_password and password_salt: change_column_null :<%= table_name %>, :encrypted_password, true <% if class_name.constantize.columns_hash['password_salt'] -%> change_column_null :<%= table_name %>, :password_salt, true <% end -%> end def self.down remove_column :<%= table_name %>, :invitation_sent_at remove_column :<%= table_name %>, :invitation_token end end
Version data entries
3 entries across 3 versions & 3 rubygems