summaryrefslogtreecommitdiff
path: root/db/migrate/20111104141002_create_tasks.rb
blob: d7539bc523d538907a56d9de5c28260c236ef1bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class CreateTasks < ActiveRecord::Migration
  def self.up
    create_table :tasks, :id => false do |t|
      t.integer :task_id,                         :primary => true
      t.string  :task_desc,       :limit=>'4096'
      t.string  :task_group,      :limit=>'1024'
      t.integer :task_sql_manager
      t.string  :hostname,        :limit=>'256'
    end
    add_index :tasks, [ :hostname, :task_id ], :unique => true, :name => 'tasks1'
  end

  def self.down
    drop_table :tasks
  end
end