2018-03-01 02:12:32 +00:00
|
|
|
class CreateCiBuildsMetadataTable < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
2018-03-05 16:35:06 +00:00
|
|
|
create_table :ci_builds_metadata, id: false do |t|
|
2018-03-01 02:12:32 +00:00
|
|
|
t.integer :build_id, null: false
|
|
|
|
t.integer :used_timeout
|
2018-03-05 16:35:06 +00:00
|
|
|
t.integer :timeout_source, null: false, default: 1
|
|
|
|
|
|
|
|
t.primary_key :build_id
|
|
|
|
t.foreign_key :ci_builds, column: :build_id, on_delete: :cascade
|
2018-03-01 02:12:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|