2013-07-31 13:20:30 +01:00
|
|
|
class CreateProjectStatistics < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :project_statistics do |t|
|
2014-01-21 04:51:49 +00:00
|
|
|
t.integer :average_build_time, null: false, default: 0
|
|
|
|
t.integer :build_count, null: false, default: 0
|
|
|
|
t.integer :arch_id, null: false
|
|
|
|
t.integer :project_id, null: false
|
2013-07-31 13:20:30 +01:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
2014-01-21 04:51:49 +00:00
|
|
|
add_index :project_statistics, [:project_id, :arch_id], unique: true
|
2013-07-31 13:20:30 +01:00
|
|
|
end
|
|
|
|
end
|