Download & Extend

Unknown column 'reverse' in 'field list' query: INSERT INTO nodequeue_queue

Project:Nodequeue
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:dww
Status:closed (fixed)

Issue Summary

You added the field in nodequeue_update_5203(). Here is the patch to add it to nodequeue_install() as well.
--
Olav

AttachmentSizeStatusTest resultOperations
nodequeue_1.patch540 bytesIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» needs work

You forgot the pgsql case in hook_install(). Otherwise, good catch.

#2

Status:needs work» needs review

As far as I know, this will fail on pgsql:

db_add_column($ret, 'nodequeue_queue', 'reverse', 'int(1)');

pgsql doesn't understand "int". Furthermore, these "(N)" declarations don't do what you expect for all cases except varchar. You really should stop using them.

Attached patch does the following:
- uses tinyint for this field on mysql
- uses smallint for this field on pgsql
- fixes update 5203 to get this right on both engines

I haven't actually tested any of this, yet. ;) Also, not sure how you want to handle this in terms of sites that already tried to run 5203? Should we clean all of this up in 5204 and just make 5203 silently do nothing for pgsql?

AttachmentSizeStatusTest resultOperations
nodequeue_update_5203_patch.txt1.58 KBIgnored: Check issue status.NoneNone

#3

I would agree that 5203 should silently fail for pgsql and then fix everything in 5204.

Using int(x) is just habit, really; I'm perfectly ok with fixing them all to just int, honestly.

#4

Assigned to:Anonymous» dww
Status:needs review» needs work

#5

Status:needs work» needs review

Tested this one on MySQL and I didn't break anything. Sadly, my PgSQL test site has fallen out of disrepair, so if we can find someone who can test this more easily, that'd be great.

p.s. Do you really want this column to allow (and default to) NULL? Just curious. This would be a good time to fix that if that'd not what you had in mind.

AttachmentSizeStatusTest resultOperations
nodequeue_update_5203_patch_2.txt1.87 KBIgnored: Check issue status.NoneNone

#6

Status:needs review» reviewed & tested by the community

tested on pgsql. works as advertised.

note that there are several other bugs in the install/uninstall process:

  1. extra comma in table creation statement for {nodequeue_nodes}
  2. the nodequeue_queue_qid_seq needs to be dropped upon uninstall for pg.

#7

@hunmonk #6:
(1) http://drupal.org/node/182378
(2) http://drupal.org/node/182458

Thanks for the review and testing on this one...

#8

One problem in 5204 was that nodequeue_nodes was being referenced rather than nodequeue_queue; I fixed that and applied (along with the missing comma patch)

#9

Status:reviewed & tested by the community» fixed

#10

@merlinofchaos: ugh, sorry about that table-mismatch... i noticed that and fixed it locally, but apparently forgot to update the patch in here. :( thanks for catching it.

#11

Status:fixed» closed (fixed)
nobody click here