Class: CreateJobs

Inherits:
Debci::DB::LEGACY_MIGRATION
  • Object
show all
Defined in:
lib/debci/db/migrations/201712290143_create_jobs.rb

Instance Method Summary collapse

Instance Method Details

#downObject



19
20
21
# File 'lib/debci/db/migrations/201712290143_create_jobs.rb', line 19

def down
  drop_table :jobs
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/debci/db/migrations/201712290143_create_jobs.rb', line 2

def up
  create_table(:jobs, primary_key: 'run_id') do |t|
    t.timestamps(null: false)
    t.string  :suite, limit: 100
    t.string  :arch, limit: 100
    t.string  :package, limit: 100
    t.string  :version, limit: 100
    t.string  :trigger
    t.string  :status, limit: 25
    t.string  :requestor, limit: 256, index: true
    t.text    :pin_packages
    t.string  :worker
  end
  add_index :jobs, :created_at
  add_index :jobs, :updated_at
end