22 lines
537 B
Ruby
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
|