Class: CreateInstitutionsForUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/bpluser/templates/migrations/create_institutions_for_users.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/bpluser/templates/migrations/create_institutions_for_users.rb', line 13

def self.down
  drop_table :user_institutions
end

.upObject



3
4
5
6
7
8
9
10
11
# File 'lib/generators/bpluser/templates/migrations/create_institutions_for_users.rb', line 3

def self.up
  create_table :user_institutions do |t|
    t.string :pid
    t.references :user

    t.timestamps
  end
  add_index :user_institutions, :user_id
end