]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5918 Fix creation of admin user by setting table name in lowercase
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 15 Dec 2014 09:28:50 +0000 (10:28 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 15 Dec 2014 09:28:50 +0000 (10:28 +0100)
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/011_create_administrator.rb

index afadd45191a6922d0838e322ff4033da080f6b89..f674024e8623a047f6e9b65d4600983a07c4f33c 100644 (file)
@@ -21,7 +21,7 @@ class CreateAdministrator < ActiveRecord::Migration
 
   def self.up
     # Create the admin user with 'admin' password
-    ActiveRecord::Base.connection.execute("INSERT INTO USERS(LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) "+
+    ActiveRecord::Base.connection.execute("insert into users(login, name, email, crypted_password, salt, created_at, updated_at, remember_token, remember_token_expires_at) "+
       "VALUES ('admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '#{Time.now}', '#{Time.now}', null, null);")
   end