Error in performupgrade migration to 4.0rc1 (MySQL/MariaDB)

When things don't work as they should.
Post Reply
lsmoker
Posts: 25
Joined: Wed Sep 05, 2018 3:52 pm

Error in performupgrade migration to 4.0rc1 (MySQL/MariaDB)

Post by lsmoker »

MySQL/MariaDB doesn't like double-quotes around identifier names (expects backticks or nothing)...

Code: Select all

Operations to perform:
  Apply all migrations: acls, actstream, admin, announcements, appearance, auth, authtoken, autoadmin, cabinets, checkouts, common, contenttypes, converter, django_celery_beat, django_gpg, document_comments, document_indexing, document_parsing, document_signatures, document_states, documents, duplicates, dynamic_search, events, file_caching, file_metadata, linking, locales, lock_manager, logging, mailer, mayan_statistics, messaging, metadata, motd, ocr, permissions, quotas, sessions, sites, sources, storage, tags, user_management, web_links
Running migrations:
  Applying acls.0004_auto_20210130_0322... OK
  Applying announcements.0001_initial... OK
  Applying announcements.0002_auto_20210212_1022... OK
  Applying documents.0056_auto_20200916_0959... OK
CommandError: Error during signal_pre_upgrade signal: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'"documents_documentversion_timestamp_30bada95"\' at line 1'), <class 'django.db.utils.ProgrammingError'>
  Applying documents.0057_auto_20200916_1057...(mayan-edms)
The code is here -> https://gitlab.com/mayan-edms/mayan-edm ... 057.py#L16

Edit: In addition, my database does not have indexes named "documents_documentversion_timestamp_30bada95" and "documents_documentversion_document_id_42757b7a" so it still errors with backticks.
---
LeVon Smoker
lsmoker
Posts: 25
Joined: Wed Sep 05, 2018 3:52 pm

Re: Error in performupgrade migration to 4.0rc1 (MySQL/MariaDB)

Post by lsmoker »

Another error:

Code: Select all

  Applying duplicates.0001_initial... OK
CommandError: Error during signal_pre_upgrade signal: 'NoneType' object is not subscriptable, <class 'TypeError'>
  Applying duplicates.0002_auto_20201130_0342...(mayan-edms)
Edit: My workaround for this error was to delete all rows from the "documents_duplicateddocument" and "documents_duplicateddocument_documents" tables first.
---
LeVon Smoker
User avatar
michael
Developer
Developer
Posts: 94
Joined: Sun Apr 19, 2020 6:21 am

Re: Error in performupgrade migration to 4.0rc1 (MySQL/MariaDB)

Post by michael »

Thanks for the reporting.

4.0rc2 is being prepared for release and includes fixes for the migrations when using MySQL.

https://gitlab.com/mayan-edms/mayan-edm ... /289932189

Once the build pipeline is complete, the new image should be available at: docker pull registry.gitlab.com/mayan-edms/mayan-edms:4.0rc2

Cheers!
lsmoker
Posts: 25
Joined: Wed Sep 05, 2018 3:52 pm

Re: Error in performupgrade migration to 4.0rc1 (MySQL/MariaDB)

Post by lsmoker »

Thanks!
---
LeVon Smoker
Post Reply