open-lms-open-source / moodle-mod_lightboxgallery

Lightbox Gallery resource module for Moodle 2.0
GNU General Public License v3.0
30 stars 37 forks source link

upgrade to new version 2024012301 -> database error #109

Open prosserg opened 7 months ago

prosserg commented 7 months ago

Upgrading to new version 2024012301 from 2022102800

mod_lightboxgallery

DDL sql execution error

More information about this error

Debug info: Unknown column 'introformat' in 'mdl_lightboxgallery'

ALTER TABLE mdl_lightboxgallery ADD sortby SMALLINT(4) NOT NULL DEFAULT 0 AFTER introformat

Error code: ddlexecuteerror

Stack trace:

line 500 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown

line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()

line 1107 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()

line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()

line 547 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()

line 295 of /mod/lightboxgallery/db/upgrade.php: call to database_manager->add_field()

line 934 of /lib/upgradelib.php: call to xmldb_lightboxgallery_upgrade()

line 677 of /lib/upgradelib.php: call to upgrade_plugins_modules()

line 1953 of /lib/upgradelib.php: call to upgrade_plugins()

line 721 of /admin/index.php: call to upgrade_noncore()

our server is running Debian Bookwork and PHP 7.4 moodle version 4.1.9

aolley commented 7 months ago

Hmm curious. That field was added way back in 2011. I'd recommend adding it to the table manually if it's actually missing and you're on a version from 2022

sensibleandy commented 7 months ago

Can you tell me what the format of the 'introformat' field is please?

prosserg commented 7 months ago

That DB table had NO column of that name. I'm afraid I had to take quick action as the moodle needed to be taken out of maintenance mode ie remove the plugin on the basis that there was no data in any of the tables belonging to that plugin. Thank you for your prompt responses.

sensibleandy commented 7 months ago

Hi [aolley] - can you come back to us with what the format of the 'introformat' field is please as I have a Moodle that is currently sitting in maintenance mode and needs to go live asap.

Thanks