Installation/Activation of Notes app fails with 'nextcloud.oc_notes_meta' doesn't exist

Nextcloud Version: Nextcloud Hub 4 (26.0.0)
OS: Dietpi Bookworm: Linux 6.1.21-v8+ aarch64

Message is:
An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘nextcloud.oc_notes_meta’ doesn’t exist

Notes app was not installed before. There are no entries in oc_migrations for the notes app.
It seems that the Migration and so creation of the table oc_notes_meta is not executed.

After configuring debug mode for my Nextcloud instance I tried to run migration command manually, outcome is this:

root@DietPi:/var/www/nextcloud# sudo -u www-data php /var/www/nextcloud/occ migrations:migrate notes

In MigrationService.php line 421:

Database error when running migration 3005Date20200528204430 for app notes
Migration step ‘OCA\Notes\Migration\Version3005Date20200528204430’ is unknown

In MigrationService.php line 499:

Migration step ‘OCA\Notes\Migration\Version3005Date20200528204430’ is unknown

migrations:migrate []

I think there was some error with my mariadb. I tried to manually create the oc_notes_meta table, but there was an error: Tablespace for table oc_notes_meta exists.
There must have gone something wrong while table creation. There was a tablespace created, but not the table.
I stopped nextcloud and mariadb and moved the tablespace file to a safe space:

mv oc_notes_meta.ibd /backup/

then I started mariadb and nextcloud again and after that the notes app could be activated and everything works now. Strange behaviour, but not an issue of nextcloud I think.
Edit: it was my own fault. Before installing fresh nextcloud on fresh machine, I copied my old home for having my nextcloud data. But my old nextcloud DB was in that home and the new nextcloud DB was created in the same location → conflicts.