This was mentioned in the (now closed) upgrade meta-issue but I haven't seen it mentioned elsewhere.

Upgrading my d6 site I get the following errors:

filter module
Update #7004
* Failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-0' for key 'PRIMARY'

system module
Update #7035
* Failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'

contact module
Update #7002
* Failed: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'machine_name' in 'field list'

Comments

sun’s picture

Priority: Normal » Critical
starkos’s picture

Is there any other information I can provide to help fix this? Just let me know.

ctmattice1’s picture

Check your database filters table. the index's are prabably missing and you'll still have a field called delta which is suppose to be converted to name.

I have a issue open on this #730920: db_change_field() FAILS using $keys_new argument directed to the database system. Apparently what I've found is on a clean install of D7 everything runs as expected. On a update it fails and does not warn you of the failure. Traced the issue to db_change_field()

starkos’s picture

After the update, the filter table looks like this:

mysql> show fields from filter;
+--------+-------------+------+-----+---------+-------+
| Field  | Type        | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| format | int(11)     | NO   | PRI | 0       |       |
| module | varchar(64) | NO   | PRI |         |       |
| name   | varchar(32) | NO   | PRI |         |       |
| weight | tinyint(4)  | NO   |     | 0       |       |
+--------+-------------+------+-----+---------+-------+

So it looks like this might be a different problem? Is there something else I should check? Here's the contents of the table:

mysql> select * from filter;
+--------+--------------+----------------------+--------+
| format | module       | name                 | weight |
+--------+--------------+----------------------+--------+
|      1 | filter       | filter_html          |      0 |
|      1 | geshifilter  | 0                    |      1 |
|      1 | filter       | filter_url           |      3 |
|      1 | filter       | filter_autop         |      4 |
|      1 | filter       | filter_htmlcorrector |     10 |
|      1 | pathologic   | 0                    |     10 |
|      2 | php          | php_code             |      0 |
|      3 | geshifilter  | 0                    |      0 |
|      3 | filter       | filter_url           |      2 |
|      3 | filter       | filter_autop         |      3 |
|      3 | table_altrow | 0                    |      4 |
|      3 | lightbox2    | 0                    |     10 |
|      3 | pathologic   | 0                    |     10 |
|      4 | filter       | filter_html          |    -10 |
|      4 | geshifilter  | 0                    |     -9 |
|      4 | markdown     | 0                    |     -8 |
|      4 | filter       | filter_url           |     -7 |
|      4 | filter       | filter_autop         |     -6 |
|      4 | table_altrow | 0                    |     -5 |
|      4 | filter       | filter_htmlcorrector |     -4 |
|      4 | pathologic   | 0                    |     10 |
+--------+--------------+----------------------+--------+
scor’s picture

I get the same errors. noob question: I would expect db_add_primary_key('filter', array('format', 'name')); from filter_update_7004() to throw an exception since there is already a primary key on that table and I can't find anywhere where this primary is being removed. The function db_drop_primary_key() is not used anywhere in HEAD.

scor’s picture

Check your database filters table. the index's are prabably missing and you'll still have a field called delta which is suppose to be converted to name.

just reporting I cannot reproduce this particular issue: 'delta' properly renamed to 'name' on my setup.

However I do have the same
filter module
Update #7004
* Failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3-0' for key 'PRIMARY'

system module
Update #7035
* Failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY'

but I believe this comes from the previous update 7003, see #685486: filter_update_7003() doesn't work for contrib modules

catch’s picture

Status: Active » Closed (duplicate)

Marking as duplicate of #685486: filter_update_7003() doesn't work for contrib modules, once that's sorted, so should this be.