Class: CreatePhoneAccessCards

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/project/db/migrate/14_create_phone_access_cards.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/project/db/migrate/14_create_phone_access_cards.rb', line 2

def change
  create_table :phone_access_cards do |t|
    t.belongs_to :user_card, index: true, null: false, foreign_key: true

    t.string :value, null: true, index: true, unique: true, limit: 24
    t.integer :verified, null: true, index: true, limit: 1, default: 0
    t.boolean :active

    t.timestamps
  end

  add_index :phone_access_cards, :value, name: :ivalue, type: :fulltext

end