Closed GregorB54321 closed 5 months ago
creates the table by itself or omits the table if not necessary
The migration failing in your environment only runs if that table already exists:
And there is an earlier migration that creates the table if it doesn't exist:
Any chance you've attempted an update in the past to at least v27.1.0 of this environment, but then maybe rolled it back somehow?
Table 'owncloud.oc_textprocessing_tasks' doesn't exist in engine
This sounds to me like something is going on with your underlying database as stored on-disk. Any chance you've moved database servers or moved your database files around or done a restore at some point since v27.0 and v27.1 was released?
It might be interesting to see the output of NC_debug=true ./occ migrations:status core
, but if it's a db restore/move issue it's outside the scope of Nextcloud's own migrations.
Hi Josh, I was sometime struggling with the upgrade procedures. I opened some tickets or got the solution in this way.
I rolled back always to a backup of the whole installation (DB+data+execs). Maybe up to 25. "rolling back" was more a copying the old data on top the newer data. This way may files not existing in backup could have survived in the "rolled back" environment.
Migration to 26., 27.0 and 27.1 I deleted also all files that where not available in the backup. Used rsync -av --delete --progress /volume1/docker/#snapshot/SNAPSHOT-TIMESTAMP/container-data/nextcloud-* /volume1/docker/container-data/
to restore all containers from snapshot.
www-data@7e3dac9dd76e:~/html$ NC_debug=true ./occ migrations:status core
>> App: core
>> Version Table Name: oc_migrations
>> Migrations Namespace: OC\Core\Migrations
>> Migrations Directory: /var/www/html/core/Migrations
>> Previous Version: 27000Date20230309104325
>> Current Version: 27000Date20230309104802
>> Next Version: Already at latest migration step
>> Latest Version: 27000Date20230309104802
>> Executed Migrations: 57
>> Executed Unavailable Migrations: 57
>> Available Migrations: 56
>> New Migrations: 56
>> Pending Migrations: None
www-data@7e3dac9dd76e:~/html$
Would it be a solution to do the upgrade steps again one by one manually?
okay... In phpmyadmin I saw, that that table was "in use". Latest modification timestamp is 4month ago. unfortunately I dont have such an old backup. So I copied/backed the tables .frm & .ibd files up and dropped the table via sql. The origin *.ibd did not vanish and I removed it. so hopefully it is clean now so far.
Then I recreated that table with:
CREATE TABLE
`owncloud`.`oc_textprocessing_tasks`
(
`id` BIGINT(64) NOT NULL AUTO_INCREMENT ,
`type` VARCHAR(255) NOT NULL ,
`input` TEXT NOT NULL ,
`output` TEXT NULL ,
`status` INT(6) NULL DEFAULT '0' ,
`user_id` VARCHAR(64) NOT NULL ,
`app_id` VARCHAR(32) NOT NULL DEFAULT '' ,
`identifier` VARCHAR(255) NOT NULL DEFAULT '' ,
`last_updated` INT(4) UNSIGNED NULL ,
PRIMARY KEY (`id`) ,
INDEX `tp_tasks_id_index` (`id`) ,
INDEX `tp_tasks_updated` (`last_updated`) ,
INDEX `tp_tasks_status_type_nonunique` (`status`,`type`)
)
ENGINE = InnoDB;
compared the disfunctional-table-backups with the newly created ones (via hexdump
): only few bytes changed, obviously the table was still empty before.
stopped the instance & db, took new snapshot and retried the upgrade to 27.1... Et voilá, upgrade was possible... :-)
Thank you Josh for pointing to the right direction!
⚠️ This issue respects the following points: ⚠️
Bug description
Trying to Upgrade Docker installation from nextcloud:27.0-apache to nextcloud:27.1-apache
Steps to reproduce
Expected behavior
creates the table by itself or omits the table if not necessary
Installation method
Community Docker image
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
None
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 22.1 to 22.2)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
Additional info
No response