MenuManager

A plugin to enable management of menus within October CMS

Back to MenuManager Support

dominic.baranski10718
dominic.baranski10718

While installing the module it explodes with:

"SQLSTATE[HY000]: General error: 1 near "MODIFY": syntax error (SQL: ALTER TABLE benfreke_menumanager_menus MODIFY nest_left INTEGER UNSIGNED NULL;)" on line 624 of /vagrant/october/vendor/laravel/framework/src/Illuminate/Database/Connection.php

Because

"Only the RENAME TABLE and ADD COLUMN variants of the ALTER TABLE command are supported. Other kinds of ALTER TABLE operations such as DROP COLUMN, ALTER COLUMN, ADD CONSTRAINT, and so forth are omitted."

(taken from http://www.sqlite.org/omitted.html)

benfreke
benfreke

Fascinating. Thanks for pointing this out!

According to this stackoverflow question, it should be a fairly simple re-write. Can you see any issues with doing it this way? I'm assuming you've had some experience with sqlite ...

I'll be adding sqlite testing in the future, thanks for taking the time to report it :)

dominic.baranski10718
dominic.baranski10718

That would seem to solve the problem! I would have even suggested that 99.9% of the time people would see this issue is during an install only. Hence maybe just detect if the db is sqlite and there are 0 rows and drop/add the table.

But I like your solution better :)

1-3 of 3