summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-07 09:04:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-07 09:04:37 +0000
commit84d8453cf03e623f5df24bd55ffbeadb521a108b (patch)
tree346e751b6b5ebe81d6b449b3a3ae573027aed5c4 /db
parent41e1758b005abbf02defd015a2002d4189075a7c (diff)
downloadredmine-84d8453cf03e623f5df24bd55ffbeadb521a108b.tar.gz
redmine-84d8453cf03e623f5df24bd55ffbeadb521a108b.zip
Default admin user may not be crated in Redmine 3.0 (#18804).
Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@13968 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/001_setup.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb
index 3cea13591..1af42a783 100644
--- a/db/migrate/001_setup.rb
+++ b/db/migrate/001_setup.rb
@@ -288,14 +288,17 @@ class Setup < ActiveRecord::Migration
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
# create default administrator account
- user = User.create :login => "admin",
- :hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
- :admin => true,
- :firstname => "Redmine",
- :lastname => "Admin",
- :mail => "admin@example.net",
- :mail_notification => true,
- :status => 1
+ user = User.new :firstname => "Redmine",
+ :lastname => "Admin",
+ :mail => "admin@example.net",
+ :mail_notification => 'all',
+ :status => 1
+ user.login = 'admin'
+ user.hashed_password = "d033e22ae348aeb5660fc2140aec35850c4da997"
+ user.admin = true
+ user.save
+
+
end
def self.down