]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Error on db:migrate with table prefix set (#5335).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 17 Apr 2010 12:14:52 +0000 (12:14 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 17 Apr 2010 12:14:52 +0000 (12:14 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3678 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/principal.rb

index 8b46c7ff9165f0e2b65d0b1d4644728088cfabf4..58c3f0497a0d2440b1728652f0a92f1457c00acb 100644 (file)
@@ -16,7 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 class Principal < ActiveRecord::Base
-  set_table_name 'users'
+  set_table_name "#{table_name_prefix}users#{table_name_suffix}"
 
   has_many :members, :foreign_key => 'user_id', :dependent => :destroy
   has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}", :order => "#{Project.table_name}.name"