Opened 10 years ago

Closed 9 years ago

#287 closed task (fixed)

DB update - localhost broken

Reported by: lemon-head Owned by:
Priority: critical Milestone: 0.1.4
Component: BW General Keywords:
Cc:

Description

After the latest update from trunk, I get the following error when trying to view any page in the BW part. (MyTB part works fine). The problem does not occur on trunk. The bw part of my local branch is the same as on the server.

updating DB to version 27 
#0 debug(
query problem with
ALTER TABLE `cryptedfields` DROP PRIMARY KEY mysql_error: Can't DROP 'PRIMARY'; check that column/key exists
) called at [C:\wamp\www\bw-trunk\htdocs\bw\lib\bwdb.php:120] #1 sql_query(ALTER TABLE `cryptedfields` DROP PRIMARY KEY) called at [C:\wamp\www\bw-trunk\htdocs\bw\lib\dbupdate.php:160] #2 DBUpdateCheck() called at [C:\wamp\www\bw-trunk\htdocs\bw\lib\bwdb.php:65] #3 DBConnect() called at [C:\wamp\www\bw-trunk\htdocs\bw\lib\init.php:49] #4 init() called at [C:\wamp\www\bw-trunk\htdocs\bw\lib\init.php:72] #5 require_once(C:\wamp\www\bw-trunk\htdocs\bw\lib\init.php) called at [C:\wamp\www\bw-trunk\htdocs\bw\groups.php:24] 
query problem with
ALTER TABLE `cryptedfields` DROP PRIMARY KEY mysql_error: Can't DROP 'PRIMARY'; check that column/key exists


Notice: Undefined index: DISABLEERRORS in C:\wamp\www\bw-trunk\htdocs\bw\lib\FunctionsTools.php on line 834
System error: [1199525570] bw_error for unknownmember : /bw-trunk/htdocs/bw/groups.php :

Change History (5)

comment:1 Changed 10 years ago by lemon-head

  • Type changed from bug to job

The solution is:

  • delete all the entries in the DB-table 'cryptedfields' that had the id "0"
  • set "id" as the primary key for this table.

New task:

  • Explain this solution on BW-dev-announce?
    Others might have the same or similar problem after the DB update.

comment:2 Changed 10 years ago by quitelost

Here are the commands I needed to execute. The third line was needed, because an upgrade to version 34 of the db generated an error when adding a UNIQUE constrain on Username column in members table (it removes a duplicate username "irinka").

DELETE FROM cryptedfields WHERE id=0
ALTER TABLE cryptedfields ADD PRIMARY KEY(id)
DELETE FROM members WHERE id=119

Should I made a new dump of this database and check in as hcvoltest.sql.gz?

comment:3 Changed 10 years ago by jeanyves

  • freq_reported set to 1
  • Resolution set to wontfix
  • show_on_bw set to 0
  • Status changed from new to closed

I guess this is fixed since sometime beacuse we are now in version 50+

comment:4 Changed 9 years ago by lemon-head

  • Resolution wontfix deleted
  • Status changed from closed to reopened

It is no fixed or people who want to update an older DB.

Should we modify the dbupdate.php ? Or provide a new db for download?

comment:5 Changed 9 years ago by micha

  • Milestone set to 0.1.4 - improving userinterface for members and volunteers and start work on big 0.2 tasks
  • Resolution set to fixed
  • Status changed from reopened to closed

Obviously it got fixed by Anu in rev. [4532]

Note: See TracTickets for help on using tickets.