nextcloud / polls

🗳️ Polls app for Nextcloud
https://apps.nextcloud.com/apps/polls
GNU Affero General Public License v3.0
255 stars 73 forks source link

Upradging NC 29.0.7 -> 29.0.8 causes migration error in 060100Date20240209073304 #3754

Open weberhofer opened 2 days ago

weberhofer commented 2 days ago

⚠️ This issue respects the following points: ⚠️

What went wrong, what did you observe?

The following error has been reported on update:

Error: Database error when running migration 060100Date20240209073304 for app polls
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1832 Cannot change column 'poll_id': used in a foreign key constraint 'FK_A20806F93C947C0F'

I think, there might be wrong entries in the database which must be cleaned up before doing the change.

What did you expect, how polls should behave instead?

No error message

What steps does it need to replay this bug?

Update NC/Poll.

Installation method

Installed/updated from the appstore (Apps section of your site)

Installation type

Updated from a minor version within same major version (i.e. 4.0.0 to 4.1.1)

Affected polls version

7.2.4

Which browser did you use, when experiencing the bug?

Other browser

command line update

Add your browser log here

No response

Additional client environment information

No response

NC version

Nextcloud 29

Other Nextcloud version

No response

PHP engine version

PHP 8.2

Other PHP version

No response

Database engine

MariaDB

Database Engine version or other Database

No response

Which user-backends are you using?

Add your nextcloud server log here

No response

Additional environment informations

No response

Configuration report

{ "system": { "instanceid": "REMOVED SENSITIVE VALUE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": [ "cloud.staatendokumentation.at" ], "datadirectory": "REMOVED SENSITIVE VALUE", "default_phoneregion": "AT", "dbtype": "mysql", "version": "29.0.8.1", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbport": "", "dbtableprefix": "oc", "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true, "maintenance": false, "maintenance_window_start": 1, "memcache.local": "\OC\Memcache\Redis", "memcache.locking": "\OC\Memcache\Redis", "memcache.distributed": "\OC\Memcache\Redis", "redis": { "host": "REMOVED SENSITIVE VALUE", "password": "REMOVED SENSITIVE VALUE", "port": 6380 }, "trusted_proxies": "REMOVED SENSITIVE VALUE", "loglevel": 2, "debug": false, "mysql.utf8mb4": true, "app_install_overwrite": [ "apporder", "admin_notifications", "fulltextsearch_elasticsearch", "fulltextsearch", "bookmarks_fulltextsearch", "files_fulltextsearch", "bbb" ], "updater.server.url": "REMOVED SENSITIVE VALUE", "theme": "", "overwritehost": "cloud.staatendokumentation.at", "overwriteprotocol": "https", "overwritecondaddr": "^10\.10\.15\.109$", "overwrite.cli.url": "https:\/\/cloud.staatendokumentation.at", "mail_from_address": "REMOVED SENSITIVE VALUE", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_domain": "REMOVED SENSITIVE VALUE", "mail_smtphost": "REMOVED SENSITIVE VALUE", "mail_smtpport": "26", "mail_smtpstreamoptions": { "ssl": { "allow_self_signed": true, "verify_peer": false, "verify_peer_name": false } }, "preview_max_x": 512, "preview_max_y": 512 } }

List of activated Apps

Enabled:

Nextcloud Signing status

No errors have been found.

Additional Information

No response

dartcafe commented 1 day ago

You are coming from a rather old version (3.5.0).

Solution occ, which will probably not work, if the current version cannot be enabled

Solution Surgeon, if you want to keep your data

Solution Berserker, if you do not need any data from the existing version

Solution Tricky, I did not test if this works, theoretically it should

The problem occurs, because changing field types needs all FK constraints removed before the change. This has been removed due to performance issues with very large databases.