diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2017-10-06 12:05:23 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2017-10-06 12:05:23 +0300 |
commit | ea023138bf5116a729e5accd5f81d4e586af6b02 (patch) | |
tree | 1257dcd21fc225476ce1af95ad6c9701e219dac7 /db/migrate/20171006090001_create_ci_build_trace_sections.rb | |
parent | 91f8e734fee1f9e7a16573f7185c48f442e3bb5e (diff) |
Repack migration correctly
Diffstat (limited to 'db/migrate/20171006090001_create_ci_build_trace_sections.rb')
-rw-r--r-- | db/migrate/20171006090001_create_ci_build_trace_sections.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20171006090001_create_ci_build_trace_sections.rb b/db/migrate/20171006090001_create_ci_build_trace_sections.rb new file mode 100644 index 00000000000..ab5ef319618 --- /dev/null +++ b/db/migrate/20171006090001_create_ci_build_trace_sections.rb @@ -0,0 +1,19 @@ +class CreateCiBuildTraceSections < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :ci_build_trace_sections do |t| + t.references :project, null: false, index: true, foreign_key: { on_delete: :cascade } + 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 |