diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-19 19:39:10 +0100 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2019-01-02 19:47:50 +0100 |
commit | 01185be027bf46c0ff348e9d0b92282fcbf4dab9 (patch) | |
tree | 91964c9462d1495271709bcc7d0248d71298ef77 | |
parent | bf38936fb34e18e18cb4ed81f4fb35ac9420bfd6 (diff) | |
download | gitlab-ce-01185be027bf46c0ff348e9d0b92282fcbf4dab9.tar.gz |
Fix deprecation: insert_sql is deprecated and will be removed
-rw-r--r-- | changelogs/unreleased/deprecated-insert-sql.yml | 5 | ||||
-rw-r--r-- | db/migrate/20180413022611_create_missing_namespace_for_internal_users.rb | 2 |
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 |