Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've been sifting through the database schema, and have come accross a couple of inconsistancies:
- The node
table has some keys that should be updated to reflect the versioning changes introduced with the addition of thenode_revisions
table. The primary key is nid and vid, which means we should also add an index for the nid column.
- nid in node_counter
was set to a value of int (11). In all other places the nid type is int (10), and I've heard rumors that mysql indices work better if the field lengths are the same.
Comment | File | Size | Author |
---|---|---|---|
#4 | postgresql_updates_180_181_182-62478.diff.txt | 4.06 KB | Cvbge |
schema-clean.patch | 3.51 KB | matt westgate | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks Matt!
Comment #2
Zen CreditAttribution: Zen commentedWhat about mysqli?
-K
Comment #3
fgmFWIW, alternate database schema available here.
Comment #4
Cvbge CreditAttribution: Cvbge commentedSome fixes from afterworld ;)
- add mysqli and postgresql support for update 180
- add forgotten not null and default for postgresql in update 181
- fix postgresql update 182
I've tested it in 90%, but it'd be nice if someone with postgresql could test it too.
Comment #5
Dries CreditAttribution: Dries commentedCode looks good to me, but I don't have a PostgreSQL installation to test it against.
Comment #6
drummLooks okay to me too. I don't think we should wait for antother Postgres tester, but not committing to be safe.
Comment #7
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedapplied to 4.7
Comment #8
Dries CreditAttribution: Dries commentedCommitted Cvbge's patch to CVS HEAD. All done.
Comment #9
killes@www.drop.org CreditAttribution: killes@www.drop.org commentednot all done, there was no index on vid in the node table that could be dropped. Patch attached, committed to 4.7.
Comment #10
Dries CreditAttribution: Dries commentedDoes not apply against CVS HEAD.
Comment #11
ax CreditAttribution: ax commentedthis patch (applied to both 4.7 and HEAD) introduces bugs/mysql errors: see http://drupal.org/node/65456 .
by the way: i don't think "the primary key [of the node table] is nid and vid" (it isn't in the referenced schema, neither). it still is nid only. there cannot be two rows with the same nid. the vid might change, but just references another row in node_revisions then.
Comment #12
catchGiving this a version, might well have been fixed by now but not marking as such.
Comment #13
dpearcefl CreditAttribution: dpearcefl commentedIs this still a problem in current D6?
Comment #14
fgmFWIW, this was a 4.7.x and 5.x-dev issue at the time.
In 6.x, ax' comment is correct: the PK of {node} is just nid, not nid/vid.
Comment #15
dpearcefl CreditAttribution: dpearcefl commentedConsidering this issue was reported on a non-release version and it is unknown if this issue even exists any more, I'm closing this ticket.