diff options
author | Sean McGivern <sean@gitlab.com> | 2017-06-09 14:48:25 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-06-16 20:30:01 +0300 |
commit | 9a73b634ab4220f68a8296ccb582a68293874489 (patch) | |
tree | f99d9eb55836dcdb54c18f72d4b1242a5d9acefa /lib/tasks/migrate | |
parent | 352a9ed56213b6f83a679e72f9554638a0aed1ee (diff) |
Add table for files in merge request diffs
This adds an ID-less table containing one row per file, per merge request
diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised
currently, with the advantage that we can easily query the attributes of this
new table.
It does not migrate existing data, so we have fallback code when the legacy
st_diffs column is present instead. For a merge request diff to be valid, it
should have at most one of:
* Rows in this new table, with the correct merge_request_diff_id.
* A non-NULL st_diffs column.
It may have neither, if the diff is empty.
Diffstat (limited to 'lib/tasks/migrate')
-rw-r--r-- | lib/tasks/migrate/add_limits_mysql.rake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tasks/migrate/add_limits_mysql.rake b/lib/tasks/migrate/add_limits_mysql.rake index 761f275d42a..151f42a2222 100644 --- a/lib/tasks/migrate/add_limits_mysql.rake +++ b/lib/tasks/migrate/add_limits_mysql.rake @@ -1,9 +1,11 @@ require Rails.root.join('db/migrate/limits_to_mysql') require Rails.root.join('db/migrate/markdown_cache_limits_to_mysql') +require Rails.root.join('db/migrate/merge_request_diff_file_limits_to_mysql') desc "GitLab | Add limits to strings in mysql database" task add_limits_mysql: :environment do puts "Adding limits to schema.rb for mysql" LimitsToMysql.new.up MarkdownCacheLimitsToMysql.new.up + MergeRequestDiffFileLimitsToMysql.new.up end |