Class: CreateArUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/models/activerecord_user.rb

Class Method Summary collapse

Class Method Details

.downObject



17
18
19
20
# File 'lib/models/activerecord_user.rb', line 17

def self.down
  remove_index :ar_users, :email
  drop_table :ar_users
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/models/activerecord_user.rb', line 3

def self.up
  create_table :ar_users do |t|
    t.string :email
    t.string :hashed_password
    t.string :salt
    t.integer :permission_level
    t.string :fb_uid

    t.timestamps
  end

  add_index :ar_users, :email, :unique => true
end