Some Koha instances (24.11.06), regularly updated successfully to stable since 20.05 present hundreds of ALTER TABLE/DROP TABLE on Database audit tab.
On one hand, we have the warning: > Warning! These commands are only suggestions. They are not a replacement for the database update scripts run during installations and updates. > Review the database, the atomic update files and the table definitions in kohastructure.sql before running any of the commands below: It would be a huge task to review case by case. kohastructure.sql have thousand of rows. Also, shouldn't these queries be atomic? Applying some of them couldn't leave on an unstable state? On the other hand, we have Run the following SQL to fix the database: -- Convert schema '' to '':; BEGIN; ALTER TABLE ... COMMIT; If I just run this .sql I usually came across some errors: 1. Using reserved words such as `schema` (biblio_metadata) and `database` (`erm_usage_databases`) as column names without escaping them leads to syntax errors, specifically error 1064. 2. `ALTER TABLE erm_eholdings_packages DROP FOREIGN KEY erm_packages_ibfk_1`, but FK is `erm_eholdings_packages_ibfk_1`, not `erm_packages_ibfk_1`. But even being able to run .sql, after fixing those issues, database audit keeps suggesting hundreds of ALTER TABLE, changes which are already being made. It is not exactly the same list of queries. I diff between after/before. The ones which were done and not asked again are: - DROP FOREIGN KEYs - DROP/ADD INDEX - DROP TABLEs I'm doing something wrong, or should I file a bug? Furthermore, `bin/maintenance/audit_database.pl` don't find `kohastructure.sql`. Looking at the code, it seems is not meant to run on terminal, right? Regards, Pablo
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/