Fixed #1545: migration on fresh install fails (broken by r1592).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1595 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
75a5dbd01d
commit
fa88a592fd
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
class Setup < ActiveRecord::Migration
|
class Setup < ActiveRecord::Migration
|
||||||
|
|
||||||
|
class User < ActiveRecord::Base; end
|
||||||
# model removed
|
# model removed
|
||||||
class Permission < ActiveRecord::Base; end
|
class Permission < ActiveRecord::Base; end
|
||||||
|
|
||||||
|
@ -284,13 +285,15 @@ class Setup < ActiveRecord::Migration
|
||||||
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
|
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
|
||||||
|
|
||||||
# create default administrator account
|
# create default administrator account
|
||||||
user = User.create :firstname => "Redmine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en"
|
user = User.create :login => "admin",
|
||||||
user.login = "admin"
|
:hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||||
user.password = "admin"
|
:admin => true,
|
||||||
user.admin = true
|
:firstname => "Redmine",
|
||||||
user.save
|
:lastname => "Admin",
|
||||||
|
:mail => "admin@somenet.foo",
|
||||||
|
:mail_notification => true,
|
||||||
|
:language => "en",
|
||||||
|
:status => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
|
|
Loading…
Reference in New Issue