2016-06-16 23:09:34 +05:30
|
|
|
# rubocop:disable all
|
2014-09-02 18:07:02 +05:30
|
|
|
class CreateMergeRequestDiffs < ActiveRecord::Migration
|
2017-01-15 13:20:01 +05:30
|
|
|
DOWNTIME = false
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
def up
|
2014-09-02 18:07:02 +05:30
|
|
|
create_table :merge_request_diffs do |t|
|
|
|
|
t.string :state, null: false, default: 'collected'
|
2015-12-23 02:04:40 +05:30
|
|
|
t.text :st_commits, null: true
|
|
|
|
t.text :st_diffs, null: true
|
2014-09-02 18:07:02 +05:30
|
|
|
t.integer :merge_request_id, null: false
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
t.timestamps null: true
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
2015-12-23 02:04:40 +05:30
|
|
|
|
|
|
|
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
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :merge_request_diffs
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|