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
|