Menu

#146 Database error suring update

V 2.5rc 2
closed-out-of-date
5
2010-04-01
2004-12-15
Anonymous
No

Got the following error message when updating dtabase
from 2.4 to 2.5. Using MySql V4.00.18-max, XP with
SP2.

PANIC!
Error during the update of the database.
Error: You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version
for the right syntax to use near '; ALTER TABLE projects
ADD hourly_rate float(10,2) NOT NULL de

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I got a similar error when I tried to upate the database from
    2.4 to 2.5. This was mysql 3.23.58 on Red Hat Linux 9. The
    erroer message was:

    PANIC!
    Error during the update of the database.
    Error: You have an error in your SQL syntax near '; ALTER
    TABLE projects ADD hourly_rate float(10,2) NOT NULL
    default '0.00'; AL' at line 1

     
  • Francesco Fullone

    • assigned_to: nobody --> bromer
     
  • Anonymous

    Anonymous - 2005-01-29

    Logged In: YES
    user_id=579549

    I got this error too. Here is how I fixed it:

    Replaces lines 319 - 329

    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}projects ADD invoicing $db_char1
    [$databaseType];
    ALTER TABLE {$tablePrefix}projects ADD hourly_rate $db_float
    [$databaseType];
    ALTER TABLE {$tablePrefix}organizations ADD hourly_rate
    $db_float[$databaseType];
    ALTER TABLE {$tablePrefix}tasks ADD invoicing $db_char1
    [$databaseType];
    ALTER TABLE {$tablePrefix}tasks ADD worked_hours $db_float
    [$databaseType];
    ALTER TABLE {$tablePrefix}sorting ADD invoices
    $db_varchar155[$databaseType];
    ALTER TABLE {$tablePrefix}sorting ADD newsdesk
    $db_varchar155[$databaseType];
    ALTER TABLE {$tablePrefix}calendar ADD broadcast $db_char1
    [$databaseType];
    ALTER TABLE {$tablePrefix}calendar ADD location
    $db_varchar155[$databaseType];
    STAMP;

    with:

    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}projects ADD invoicing $db_char1
    [$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}projects ADD hourly_rate $db_float
    [$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}organizations ADD hourly_rate
    $db_float[$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}tasks ADD invoicing $db_char1
    [$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}tasks ADD worked_hours $db_float
    [$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}sorting ADD invoices
    $db_varchar155[$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}sorting ADD newsdesk
    $db_varchar155[$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}calendar ADD broadcast $db_char1
    [$databaseType];
    STAMP;
    $SQL[] = <<<STAMP
    ALTER TABLE {$tablePrefix}calendar ADD location
    $db_varchar155[$databaseType];
    STAMP;

    Explanation of problem: mysql_query only allows you to send
    one query at a time to the server. My solution was simply to
    break it into multiple (as the server requires).

     
  • Mindblender

    Mindblender - 2010-04-01

    v2.4 no longer supported. Please reopen issue if it still exists in v2.5.

     
  • Mindblender

    Mindblender - 2010-04-01
    • status: open --> open-out-of-date
     
  • Mindblender

    Mindblender - 2010-04-01
    • status: open-out-of-date --> closed-out-of-date
     

Log in to post a comment.