Class: CreateTasks

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

Class Method Summary (collapse)

Class Method Details

+ (Object) down



14
15
16
# File 'lib/db/migrate/20090515000100_create_tasks.rb', line 14

def self.down
  drop_table :tasks
end

+ (Object) up



3
4
5
6
7
8
9
10
11
12
# File 'lib/db/migrate/20090515000100_create_tasks.rb', line 3

def self.up
  create_table :tasks do |t|
    t.column :name, :string
    t.column :class_name, :string
    t.column :method_name, :string
    t.column :is_running, :boolean, :default => false
  end

  add_index :tasks, [:name], :unique => true, :name => :uq_tasks_name
end