Skip to content
Snippets Groups Projects
Commit 9c0a76de authored by Bob Van Landuyt :neckbeard:'s avatar Bob Van Landuyt :neckbeard: :sunglasses:
Browse files

Resolve migration helper conflicts

From `master`
parent 0c6b8bf5
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -278,8 +278,6 @@ module Gitlab
raise 'rename_column_concurrently can not be run inside a transaction'
end
 
<<<<<<< HEAD
=======
old_col = column_for(table, old)
new_type = type || old_col.type
 
Loading
Loading
@@ -293,7 +291,6 @@ module Gitlab
# necessary since we copy over old values further down.
change_column_default(table, new, old_col.default) if old_col.default
 
>>>>>>> c53d06c4d8... Merge branch 'dm-rename-column-concurrently-with-null' into 'master'
trigger_name = rename_trigger_name(table, old, new)
quoted_table = quote_table_name(table)
quoted_old = quote_column_name(old)
Loading
Loading
@@ -307,16 +304,6 @@ module Gitlab
quoted_old, quoted_new)
end
 
old_col = column_for(table, old)
new_type = type || old_col.type
add_column(table, new, new_type,
limit: old_col.limit,
default: old_col.default,
null: old_col.null,
precision: old_col.precision,
scale: old_col.scale)
update_column_in_batches(table, new, Arel::Table.new(table)[old])
 
change_column_null(table, new, false) unless old_col.null
Loading
Loading
Loading
Loading
@@ -382,14 +382,12 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
expect(model).to receive(:add_column).
with(:users, :new, :integer,
limit: old_column.limit,
<<<<<<< HEAD
default: old_column.default,
null: old_column.null,
=======
>>>>>>> c53d06c4d8... Merge branch 'dm-rename-column-concurrently-with-null' into 'master'
precision: old_column.precision,
scale: old_column.scale)
 
expect(model).to receive(:change_column_default).
with(:users, :new, old_column.default)
expect(model).to receive(:update_column_in_batches)
 
expect(model).to receive(:change_column_null).with(:users, :new, false)
Loading
Loading
@@ -411,14 +409,12 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
expect(model).to receive(:add_column).
with(:users, :new, :integer,
limit: old_column.limit,
<<<<<<< HEAD
default: old_column.default,
null: old_column.null,
=======
>>>>>>> c53d06c4d8... Merge branch 'dm-rename-column-concurrently-with-null' into 'master'
precision: old_column.precision,
scale: old_column.scale)
 
expect(model).to receive(:change_column_default).
with(:users, :new, old_column.default)
expect(model).to receive(:update_column_in_batches)
 
expect(model).to receive(:change_column_null).with(:users, :new, false)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment