update with latest dev version (2009-May-28) results in errors:

user warning: Unknown column 'm.selfcheckout' in 'field list' query: SELECT nt.type, nt.name, m.type_setting, m.max_hours_per_reservation, m.allow_overnight, m.allow_weekends, m.late_fee_per_hour, m.rate_per_hour, m.fee_free_hours, m.status, m.spare_items, m.min_cancel_hours, m.autocheckout, m.autocheckin, m.selfcheckout FROM node_type nt INNER JOIN merci_node_type m ON nt.type = m.type WHERE m.type_setting = 'bucket' ORDER BY nt.name in /Volumes/Data/film/modules/merci/merci.module on line 1062.

etc.

Have done database update, didn't help.

Comments

kreynen’s picture

Status: Active » Fixed

This was my fault. Still not used to testing the .install update functions.

The version of MERCI Darrick was using in Davis had a typo in the .install.

  $ret[] = update_sql("ALTER TABLE {merci_node_type} ADD autocheckout TINYINT NOT NULL DEFAULT '0', ADD autocheckin TINYINT NOT NULL DEFAULT '0', ADD slefcheckout TINYINT NOT NULL DEFAULT '0';");

slefcheckout should be selfcheckout

You can correct that using phpmyadmin or my reinstalling, but merci_update_3() will only run once unless you roll it back in the schema_version column for the merci record in the system table.

darrick’s picture

Shouldn't we just roll out a merci_update_4() to fix this error? That way futzing with the database isn't required.

coderdan’s picture

I updated the merci.install file with the proposed spelling change, changed the schema version of MERCI to (2) in the system table and ran update.php. It correctly found the next version (3) and updated with some errors. I expected that since most of the schema changes were already done via the last update, but I didn't grab a screenshot of it unfortunately.

I'm still getting the "Unknown column 'm.selfcheckout' " error when EDITING or CREATING reservations after performing the above steps. Would my best course of action be to completely uninstall MERCI and reinstall, or did I miss something? Will uninstalling MERCI delete existing MERCI content types? Please advise.

kreynen’s picture

I fixed this on PCM's server.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.