From 6c0bc9abdd2542cc0951bd34b150a5824b987636 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 19 Jun 2019 11:06:47 -0700 Subject: Remove import columns from projects table In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21497, we migrated all project import data into a separate table, `project_import_data`. In addition, we also added: ``` ignore_column :import_status, :import_jid, :import_error ``` In https://gitlab.com/gitlab-com/gl-infra/production/issues/908, we observed some of these `import_error` columns consumed megabytes of error backtraces and caused slow loading of projects whenever a `SELECT * from projects` query loaded the row into memory. Since we have long migrated away from these columns, we can now drop these columns entirely. --- spec/lib/gitlab/database/migration_helpers_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb index 1e4c4c38f74..3cf3d032bf4 100644 --- a/spec/lib/gitlab/database/migration_helpers_spec.rb +++ b/spec/lib/gitlab/database/migration_helpers_spec.rb @@ -461,9 +461,9 @@ describe Gitlab::Database::MigrationHelpers do end it 'updates all the rows in a table' do - model.update_column_in_batches(:projects, :import_error, 'foo') + model.update_column_in_batches(:projects, :description_html, 'foo') - expect(Project.where(import_error: 'foo').count).to eq(5) + expect(Project.where(description_html: 'foo').count).to eq(5) end it 'updates boolean values correctly' do -- cgit v1.2.1