Sha256: a9965c32d6d24759b24eb6fc59cc9546bf6a649820811979d42d7783afe57b23
Contents?: true
Size: 1 KB
Versions: 4
Compression:
Stored size: 1 KB
Contents
class DeviseInvitableAddToAdminUsers < ActiveRecord::Migration def up change_table :admin_users do |t| t.string :invitation_token t.datetime :invitation_created_at t.datetime :invitation_sent_at t.datetime :invitation_accepted_at t.integer :invitation_limit t.references :invited_by, :polymorphic => true t.integer :invitations_count, default: 0 t.index :invitations_count t.index :invitation_token, :unique => true # for invitable t.index :invited_by_id end # And allow null encrypted_password and password_salt: change_column_null :admin_users, :encrypted_password, true end def down change_table :admin_users do |t| t.remove_references :invited_by, :polymorphic => true t.remove :invitations_count, :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token, :invitation_created_at end change_column_null :admin_users, :encrypted_password, false end end
Version data entries
4 entries across 4 versions & 1 rubygems