Class: SetupLockTable

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/db/migrate/002_setup_lock_table.rb

Instance Method Summary collapse

Instance Method Details

#downObject



12
13
14
# File 'lib/db/migrate/002_setup_lock_table.rb', line 12

def down
  drop_table :deploy_locks
end

#upObject



2
3
4
5
6
7
8
9
10
# File 'lib/db/migrate/002_setup_lock_table.rb', line 2

def up
  create_table :deploy_locks do |t|
    t.string  :host
    t.string  :job_name
    t.integer :created_at, :limit => 8
  end

  add_index :deploy_locks, [:job_name], unique: true
end