Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20140823225019_create_commits_from_builds.rb « migrate « ci « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 15f84b1151163edb72c935a7f862f8eb33f1f4c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class CreateCommitsFromBuilds < ActiveRecord::Migration
  def change
    create_table :commits do |t|
      t.integer :project_id
      t.string  :ref,        nil: false
      t.string  :sha,        nil: false
      t.string  :before_sha, nil: false
      t.text    :push_data,  nil: false

      t.timestamps
    end

    add_column :builds, :commit_id, :integer

    # Remove commit data from builds
    #remove_column :builds, :project_id, :integer
    #remove_column :builds, :ref,        :string
    #remove_column :builds, :sha,        :string
    #remove_column :builds, :before_sha, :string
    #remove_column :builds, :push_data,  :text
  end
end