Sha256: 722c1f8debd6f3e282e55f193ffe63c67ec4f792ef95683a436725c231ef5644
Contents?: true
Size: 878 Bytes
Versions: 6
Compression:
Stored size: 878 Bytes
Contents
class DeviseInvitableAddTo<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %> def up change_table :<%= table_name %> 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 end def down change_table :<%= table_name %> 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 end end
Version data entries
6 entries across 6 versions & 1 rubygems