Project

General

Profile

Actions

Defect #5335

closed

Error on db:migrate with table prefix set (hardcoded name in principal.rb)

Added by Michael Eberlein over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Database
Target version:
Start date:
2010-04-16
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Principal.rb has hardcoded table name on first line (set_table_name 'users'). This error prevents the use of table_name_prefix (config.active_record.table_name_prefix).

Error:
AddUserPreferencesTimeZone: migrating ===================================
-- add_column(:user_preferences, :time_zone, :string)
-> 0.0041s
AddUserPreferencesTimeZone: migrated (0.0042s) ==========================

AddUsersType: migrating =================================================
-- add_column(:users, :type, :string)
-> 0.0048s
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: Table 'redmine.users' doesn't exist: SHOW FIELDS FROM `users`

Application's environment:
Ruby version 1.8.7 (i686-linux)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /var/lib/redmine
Environment production
Database adapter mysql
Database schema version 0

Actions

Also available in: Atom PDF