summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-01-02 20:57:41 +0000
committerRobert Speicher <rspeicher@gmail.com>2019-01-02 20:57:41 +0000
commit2d7c3dbf5c768ecddff9b6c1c897357ab2b923ff (patch)
tree57118153ec6568d6d7b1e8b5c95f9d0f7f43cd80
parent6a8b89d9086cbe1a083641b4747c5acba1e3c2c6 (diff)
parent01185be027bf46c0ff348e9d0b92282fcbf4dab9 (diff)
downloadgitlab-ce-2d7c3dbf5c768ecddff9b6c1c897357ab2b923ff.tar.gz
Merge branch 'deprecated-insert-sql' into 'master'
Fix deprecation: insert_sql is deprecated and will be removed See merge request gitlab-org/gitlab-ce!23944
-rw-r--r--changelogs/unreleased/deprecated-insert-sql.yml5
-rw-r--r--db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/deprecated-insert-sql.yml b/changelogs/unreleased/deprecated-insert-sql.yml
new file mode 100644
index 00000000000..ad21fbd9dde
--- /dev/null
+++ b/changelogs/unreleased/deprecated-insert-sql.yml
@@ -0,0 +1,5 @@
+---
+title: 'Fix deprecation: insert_sql is deprecated and will be removed'
+merge_request: 23944
+author: Jasper Maes
+type: other
diff --git a/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb b/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb
index 90d869a8c10..8de8b3bcc2e 100644
--- a/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb
+++ b/db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb
@@ -46,7 +46,7 @@ class CreateMissingNamespaceForInternalUsers < ActiveRecord::Migration[4.2]
end
insert_query = "INSERT INTO namespaces(owner_id, path, name, created_at, updated_at) VALUES(#{user_id}, '#{path}', '#{path}', NOW(), NOW())"
- namespace_id = connection.insert_sql(insert_query)
+ namespace_id = connection.insert(insert_query)
create_route(namespace_id)
end