l4d.tools/db/migrate/20260118200001_create_job_logs.rb
2026-01-18 18:50:31 +01:00

22 lines
537 B
Ruby

class CreateJobLogs < ActiveRecord::Migration[8.1]
def change
create_table :job_logs do |t|
t.string :job_class
t.string :job_id
t.text :arguments
t.integer :server_id
t.text :log_output
t.integer :status, default: 0, null: false
t.datetime :started_at
t.datetime :finished_at
t.text :error_message
t.timestamps
end
add_index :job_logs, :server_id
add_index :job_logs, :job_id
add_index :job_logs, :status
add_index :job_logs, :created_at
end
end