Hi,

This is an offshoot from another issue. The patch makes ensures that UNSIGNED fields are consistent throughout the table. Some index fields have also been assigned the UNSIGNED attribute.

Not sure how to make a patch for this, so I've just added it to updates.inc. The dates etc. might have to be changed. I'm also unsure if pgSQL will also require an update..

Cheers
Karthik.

CommentFileSizeAuthor
#6 updates_6.patch4.46 KBZen
#5 database.mysql_9.patch6.15 KBZen
updates_5.patch5.21 KBZen

Comments

Zen’s picture

And just to clarify, the AUTO_INCREMENTs have been left in as is.. :)

-K

Cvbge’s picture

If you're sure you're only adding UNSIGNED and not changing any other column propriety, then it's ok from postgresql point of view. Postgresql does not have UNSIGNED at all.

If you're updating database in updates.inc, shouldn't you provide a patch to update database.mysql* too?

Zen’s picture

If you're updating database in updates.inc, shouldn't you provide a patch to update database.mysql* too?

I thought about that, but then decided against it as I thought it would be better practice to apply this update on a central database and then take a dump from it to update database.mysql. I'm not sure how consistent mysql dumps are between versions etc...

If needed, I'll be happy to make one though :)
Cheers
-K

dries’s picture

database.mysql needs to be updated too

Zen’s picture

StatusFileSize
new6.15 KB

database.mysql patch attached.

-K
P.S Just a quick note supporting my previous statement as to why I don't like patching the SQL file:
While I was patching the file I noticed -
a) Something introduced in updates.inc was not added to database.mysql [an UNSIGNED, so corrected]
b) Tables are not in alphabetical order.
c) Reserved words are not capitalised.

and I'm sure there are more. This is a needless step that doubles the possibility of inconsistency. IMO the patch should be applied to the base MySQL DB that Drupal supports, and then the dump should be taken. This should then be diff-ed with the existing database.mysql file and a patch should be created. This should obviously only be done at a central point..

My 0.02..

Zen’s picture

StatusFileSize
new4.46 KB

updates.inc patch also updated.

-K

drumm’s picture

Status: Needs review » Needs work

No longer applies.

wim leers’s picture

Version: x.y.z » 7.x-dev
Status: Needs work » Closed (fixed)

The schema module in Drupal 6 has rendered this obsolete.