プロジェクト

全般

プロフィール

Vote #64622

完了

Unable to create new role when custom table prefix is set

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
高め
担当者:
-
カテゴリ:
-
対象バージョン:
開始日:
2009/02/09
期日:
進捗率:

50%

予定工数:
category_id:
0
version_id:
7
issue_org_id:
2701
author_id:
3878
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

ActiveRecord::StatementInvalid (Mysql::Error: Table 'my_schema.workflows' doesn't exist: INSERT INTO workflows (tracker_id, old_status_id, new_status_id, role_id) SELECT tracker_id, old_status_id, new_status_id, 6 FROM workflows WHERE role_id = 4):
    /var/lib/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:188:in `log'
    /var/lib/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:309:in `execute'
    /var/lib/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:171:in `insert_sql'
    /var/lib/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:319:in `insert_sql'
    /var/lib/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
    /var/lib/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb:18:in `insert'
    /app/models/role.rb:34:in `copy'
    /app/controllers/roles_controller.rb:40:in `new'

by grepping for INSERT in app/modules it looks like tracker would be affected as well. Grepping for FROM reveals some DELETE statements that do not use table prefix in other files as well.


journals

attached is a patch

note: similar patches are needed for other files as well.
--------------------------------------------------------------------------------
Fixed in r2424. Please note that your patch is broken. Table name is @workflows@, but class name is @Workflow@, not @Workflows@.
--------------------------------------------------------------------------------
Merged in 0.8 branch in r2425.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • 対象バージョン0.8.1_7 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0