2017-09-25 12:54:08 -04:00
|
|
|
class CreateCiBuildTraceSections < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
|
|
|
create_table :ci_build_trace_sections do |t|
|
2017-10-06 05:05:23 -04:00
|
|
|
t.references :project, null: false, index: true, foreign_key: { on_delete: :cascade }
|
2017-09-25 12:54:08 -04:00
|
|
|
t.datetime_with_timezone :date_start, null: false
|
|
|
|
t.datetime_with_timezone :date_end, null: false
|
|
|
|
t.integer :byte_start, limit: 8, null: false
|
|
|
|
t.integer :byte_end, limit: 8, null: false
|
|
|
|
t.integer :build_id, null: false
|
|
|
|
t.integer :section_name_id, null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :ci_build_trace_sections, [:build_id, :section_name_id], unique: true
|
|
|
|
end
|
|
|
|
end
|