class GoodJobExecutionLogLinesCollections < ActiveRecord::Migration[7.2]
  def change
    create_table :good_job_execution_log_lines_collections do |t|
      t.uuid :good_job_execution_id, null: false
      t.jsonb :log_lines
      t.timestamps
    end

    add_index :good_job_execution_log_lines_collections,
              :good_job_execution_id,
              unique: true
    add_foreign_key :good_job_execution_log_lines_collections,
                    :good_job_executions,
                    column: :good_job_execution_id,
                    on_delete: :cascade
  end
end
