Menu

DB Error: no such field

Help
2008-02-09
2013-04-16
  • Nobody/Anonymous

    After upgrading from 1.0.3 to 1.0.4 I get these errors:

    Logging in:
    DB Error: no such field
    select group_id, group_name from bugs_auth_group ag where ag.is_role=1 [nativecode=1054 ** Unknown column 'ag.is_role' in 'where clause']

    Click on a bug:
    DB Error: no such table
    select b.*, reporter.login as reporter, owner.login as owner, status_name, resolution_name from bugs_bug b left join bugs_auth_user owner on b.assigned_to = owner.user_id left join bugs_auth_user reporter on b.created_by = reporter.user_id left join bugs_bookmark bookmark on b.bug_id = bookmark.bug_id left join bugs_resolution r on b.resolution_id = r.resolution_id, bugs_severity sv, bugs_status st, bugs_site site, bugs_priority prio where b.bug_id = 269 and b.project_id not in (0) and b.site_id = site.site_id and b.severity_id = sv.severity_id and b.status_id = st.status_id and b.priority = prio.priority_id [nativecode=1146 ** Table 'server.bugs_bookmark' doesn't exist]

    I ran upgrade.php.

    How to solve this problem?

     
    • Bryce Nesbitt

      Bryce Nesbitt - 2008-02-09

      1.0.3 to 1.0.4 involved no changes to the database schema.  Sounds like you still have database problems.

      Maybe go to the mysql console and do "show tables". or "\d" in postgres?

      mysql> use bug_tracker;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A

      Database changed
      mysql> show tables;
      +---------------------------+
      | Tables_in_bug_tracker     |
      +---------------------------+
      | phpbt_attachment          |
      | phpbt_attachment_seq      |
      | phpbt_auth_group          |
      | phpbt_auth_group_seq      |
      | phpbt_auth_perm           |
      | phpbt_auth_user           |
      | phpbt_auth_user_seq       |
      | phpbt_bookmark            |
      | phpbt_bug                 |
      | phpbt_bug_cc              |
      | phpbt_bug_dependency      |
      | phpbt_bug_group           |
      | phpbt_bug_history         |
      | phpbt_bug_seq             |
      | phpbt_bug_vote            |
      | phpbt_comment             |
      | phpbt_comment_seq         |
      | phpbt_component           |
      | phpbt_component_seq       |
      | phpbt_configuration       |
      | phpbt_database_server     |
      | phpbt_database_server_seq |
      | phpbt_group_perm          |
      | phpbt_os                  |
      | phpbt_os_seq              |
      | phpbt_priority            |
      | phpbt_priority_seq        |
      | phpbt_project             |
      | phpbt_project_group       |
      | phpbt_project_perm        |
      | phpbt_project_seq         |
      | phpbt_resolution          |
      | phpbt_resolution_seq      |
      | phpbt_saved_query         |
      | phpbt_severity            |
      | phpbt_severity_seq        |
      | phpbt_site                |
      | phpbt_site_seq            |
      | phpbt_status              |
      | phpbt_status_seq          |
      | phpbt_user_group          |
      | phpbt_user_perm           |
      | phpbt_user_pref           |
      | phpbt_version             |
      | phpbt_version_seq         |
      +---------------------------+
      45 rows in set (0.00 sec)

      Also attach your config.php

       
    • Bryce Nesbitt

      Bryce Nesbitt - 2008-02-09

      mysql> describe phpbt_auth_group;
      +--------------------+---------------------+------+-----+---------+-------+
      | Field              | Type                | Null | Key | Default | Extra |
      +--------------------+---------------------+------+-----+---------+-------+
      | group_id           | int(10) unsigned    | NO   | PRI | 0       |       |
      | group_name         | varchar(80)         | NO   |     |         |       |
      | locked             | tinyint(1) unsigned | NO   |     | 0       |       |
      | assignable         | tinyint(1) unsigned | NO   |     | 0       |       |
      | created_by         | int(10) unsigned    | NO   |     | 0       |       |
      | created_date       | bigint(20) unsigned | NO   |     | 0       |       |
      | last_modified_by   | int(10) unsigned    | NO   |     | 0       |       |
      | last_modified_date | bigint(20) unsigned | NO   |     | 0       |       |
      | is_role            | tinyint(1) unsigned | NO   |     | 0       |       |
      +--------------------+---------------------+------+-----+---------+-------+
      9 rows in set (0.00 sec)

       
    • Nobody/Anonymous

      Hi Bryce,

      Thanks for your quick answer. These are my tables:

        bugs_attachment
        bugs_attachment_seq
        bugs_auth_group
        bugs_auth_group_seq
        bugs_auth_perm
        bugs_auth_user
        bugs_auth_user_seq
        bugs_bug
        bugs_bug_cc
        bugs_bug_dependency
        bugs_bug_group
        bugs_bug_history
        bugs_bug_seq
        bugs_bug_vote
        bugs_comment
        bugs_comment_seq
        bugs_component
        bugs_component_seq
        bugs_configuration
        bugs_database_server
        bugs_database_server_seq
        bugs_group_perm
        bugs_os
        bugs_os_seq
        bugs_project
        bugs_project_group
        bugs_project_perm
        bugs_project_seq
        bugs_resolution
        bugs_resolution_seq
        bugs_saved_query
        bugs_severity
        bugs_severity_seq
        bugs_site
        bugs_site_seq
        bugs_status
        bugs_status_seq
        bugs_user_group
        bugs_user_perm
        bugs_user_pref
        bugs_version
        bugs_version_seq

      I miss:
        phpbt_bookmark
        phpbt_priority
        phpbt_priority_seq

      My auth_group:

      CREATE TABLE `bugs_auth_group` (
        `group_id` int(10) unsigned NOT NULL default '0',
        `group_name` varchar(80) NOT NULL default '',
        `locked` tinyint(1) unsigned NOT NULL default '0',
        `assignable` tinyint(4) NOT NULL default '0',
        `created_by` int(10) unsigned NOT NULL default '0',
        `created_date` bigint(20) unsigned NOT NULL default '0',
        `last_modified_by` int(10) unsigned NOT NULL default '0',
        `last_modified_date` bigint(20) unsigned NOT NULL default '0',
        PRIMARY KEY  (`group_id`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

      Best regards,
      Bas

       
    • Nobody/Anonymous

      I fixed this problem! It was this line in config.php:

      define ('CUR_DB_VERSION', 5);  // The version of the database

      The version was 4 instead of 5.

      It is working again! Thanks for your support.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.