Class: CreateGroups

Inherits:
PeakFlowUtils::ApplicationMigration show all
Defined in:
lib/peak_flow_utils/migrations/20150907070909_create_groups.rb

Instance Method Summary collapse

Methods inherited from PeakFlowUtils::ApplicationMigration

#connection

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/peak_flow_utils/migrations/20150907070909_create_groups.rb', line 2

def change
  create_table :peak_flow_utils_groups do |t|
    t.references :handler, null: false
    t.string :identifier, index: true
    t.string :name
    t.timestamps
  end

  add_foreign_key :peak_flow_utils_groups, :peak_flow_utils_handlers, column: "handler_id"
end