2016-06-09 08:39:16 -04:00
|
|
|
# rubocop:disable all
|
2014-01-22 07:22:47 -05:00
|
|
|
class CreateMergeRequestDiffs < ActiveRecord::Migration
|
2016-11-30 10:15:02 -05:00
|
|
|
DOWNTIME = false
|
|
|
|
|
2015-12-09 03:08:53 -05:00
|
|
|
def up
|
2014-01-22 07:22:47 -05:00
|
|
|
create_table :merge_request_diffs do |t|
|
2014-01-22 08:17:41 -05:00
|
|
|
t.string :state, null: false, default: 'collected'
|
2015-12-07 13:06:28 -05:00
|
|
|
t.text :st_commits, null: true
|
|
|
|
t.text :st_diffs, null: true
|
2014-01-22 07:22:47 -05:00
|
|
|
t.integer :merge_request_id, null: false
|
|
|
|
|
2016-11-28 10:45:08 -05:00
|
|
|
t.timestamps null: true
|
2014-01-22 07:22:47 -05:00
|
|
|
end
|
2015-12-07 13:06:28 -05:00
|
|
|
|
|
|
|
if ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/
|
|
|
|
change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647
|
|
|
|
change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647
|
|
|
|
end
|
2014-01-22 07:22:47 -05:00
|
|
|
end
|
2015-12-09 03:08:53 -05:00
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :merge_request_diffs
|
|
|
|
end
|
2014-01-22 07:22:47 -05:00
|
|
|
end
|