LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.35k stars 299 forks source link

DB error when updating 4.4 to 5.0.2 #2144

Closed marmoMM closed 9 months ago

marmoMM commented 9 months ago

Hello, I'm trying to update a working well 4.4 version to 5.0.2 I've done fresh install using git and copy upload directory. I've make new .env file based on model. I executed this command: sudo -u www-data composer install --no-dev sudo -u www-data npm install sudo -u www-data npm run build all theses command where executed without any error and next sudo -u www-data artisan migrate I've an error executing this command: 2024-01-01 17:24:04] production.ERROR: PDOStatement::execute:580 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' App\Console\Commands\Migrate::handle:49 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links'; caused by Illuminate\Database\Connection::runQueryCallback:822 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' (Connection: mysql, SQL: drop table sym_links); caused by App\Console\Commands\Migrate::handle:49 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' (Connection: mysql, SQL: drop table sym_links); caused by

It's like one table is missing. Is it possible to update directly 4.4 version to 5.0.2? Thanks you for your help.

ildyria commented 9 months ago

Is it possible to update directly 4.4 version to 5.0.2?

It is for sure. You don't even need to do all this, you could just do in your previous install

git pull
composer install --no-dev
npm install
npm run build
php artisan migrate

Your problem is that it does not find the tables (for some obscure reasons). And yeah it looks like that table is missing, which really sucks because it is unclear why it is not here.

Can you do php artisan migrate:status this will tell you which migrations you are missing. The table sym_links is not super important but still needed. I would be more worried depending of which migration you stopped.

marmoMM commented 9 months ago

thank you for your reply. I went back to my previous install and need to use a database backup to make it work again. My tries to upgrade altered the database. the table disappear during upgrade process MariaDB [lychee]> show tables; +---------------------------+ | Tables_in_lychee | +---------------------------+ | access_permissions | | albums | | albums_tmp | | base_albums | | configs | | failed_jobs | | jobs | | jobs_history | | logs | | logs_tmp | | migrations | | notifications | | page_contents | | page_contents_tmp | | pages | | pages_tmp | | photos | | photos_tmp | | sym_links | | tag_albums | | user_album | | users | | users_tmp | | web_authn_credentials | | web_authn_credentials_tmp | | webauthn_credentials | +---------------------------+ 26 rows in set (0,001 sec)

first I've tested php artisan migrate:status before doing anything else. everything seams to be normal sudo -u www-data php artisan migrate:status

+------+-------------------------------------------------------------+-------+ | Ran? | Migration | Batch | +------+-------------------------------------------------------------+-------+ | Yes | 2014_10_12_000000_create_users_table | 1 | | Yes | 2018_08_03_110935_create_albums_table | 1 | | Yes | 2018_08_03_110936_create_photos_table | 1 | | Yes | 2018_08_03_110942_create_configs_table | 1 | | Yes | 2018_08_03_111324_create_logs_table | 1 | | Yes | 2018_08_10_134924_move_settings | 1 | | Yes | 2018_08_15_102039_move_albums | 1 | | Yes | 2018_08_15_103716_move_photos | 1 | | Yes | 2018_10_30_135411_sharing | 1 | | Yes | 2019_02_21_114356_create_pages_table | 1 | | Yes | 2019_02_21_114408_create_page_contents_table | 1 | | Yes | 2019_06_21_180451_create_sym_links_table | 1 | | Yes | 2019_09_28_171753_config_fix | 2 | | Yes | 2019_09_28_190822_photos_fix | 1 | | Yes | 2019_10_01_add_livephoto_cols | 1 | | Yes | 2019_10_02_1400_config_map_display_public | 1 | | Yes | 2019_10_03_214750_frame_refresh_in_sec | 1 | | Yes | 2019_10_06_1400_config_map_providers | 1 | | Yes | 2019_10_06_152017_add_force_32bit_ids | 1 | | Yes | 2019_10_07_0900_config_map_include_sub_albums | 1 | | Yes | 2019_10_09_233402_config_map_mod | 1 | | Yes | 2019_10_11_093442_config_check_update_every | 1 | | Yes | 2019_12_02_2100_config_exiftool | 1 | | Yes | 2019_12_15_0700_add_share_button_visible_option | 1 | | Yes | 2019_12_15_1000_config_check_update_every_cat_fix | 1 | | Yes | 2019_12_25_0600_config_exiftool_ternary | 1 | | Yes | 2020_01_018_2300_config_import_via_symlink | 1 | | Yes | 2020_01_04_1200_config_has_ffmpeg | 1 | | Yes | 2020_01_26_1200_config_public_sorting | 1 | | Yes | 2020_01_28_133201_composer_update | 1 | | Yes | 2020_02_14_0600_location_decoding | 1 | | Yes | 2020_03_11_124417_increase_length_photo_type | 1 | | Yes | 2020_03_17_200000_unhide_configs | 1 | | Yes | 2020_04_19_122905_bump_version | 1 | | Yes | 2020_04_22_155712_bump_version040002 | 1 | | Yes | 2020_04_29_000250_bump_version040003 | 1 | | Yes | 2020_05_12_114228_rss | 1 | | Yes | 2020_05_12_161427_bump_version040005 | 1 | | Yes | 2020_05_19_174233_config_prefer_available_xmp_metadata | 1 | | Yes | 2020_05_26_135052_bump_version040006 | 1 | | Yes | 2020_06_04_104605_config_editor_enabled | 1 | | Yes | 2020_07_11_104605_config_lossless_optimization | 1 | | Yes | 2020_07_11_184605_update_licences | 1 | | Yes | 2020_07_26_085322_config_swipe_tolerance | 1 | | Yes | 2020_07_29_132731_config_local_takestamp | 1 | | Yes | 2020_08_21_123622_add_smart_tag_album_cols | 1 | | Yes | 2020_10_09_130043_bump_version040007 | 1 | | Yes | 2020_10_15_104504_add_log_max_num_line | 1 | | Yes | 2020_10_15_161346_sort_image_per_album | 1 | | Yes | 2020_11_12_183345_config_password_url_param_for_smart_album | 1 | | Yes | 2020_11_19_231553_bump_version040008 | 1 | | Yes | 2020_12_12_203153_migrate_admin_user | 1 | | Yes | 2020_12_12_203831_create_web_authn_tables | 1 | | Yes | 2020_12_18_162100_bump_version040009 | 1 | | Yes | 2020_12_18_162155_add_nsfw_album | 1 | | Yes | 2020_12_18_163800_bump_version040010 | 1 | | Yes | 2020_12_24_022307_bump_version040100 | 1 | | Yes | 2020_12_26_153220_nested_set_for_albums | 1 | | Yes | 2021_01_09_163715_remove_max_min_takestamps | 1 | | Yes | 2021_01_12_122546_bump_version040200 | 1 | | Yes | 2021_01_18_103729_add_album_cover | 1 | | Yes | 2021_01_20_113912_bump_version040201 | 1 | | Yes | 2021_01_24_231904_fix-rotation | 1 | | Yes | 2021_01_27_085903_config_map_display_direction | 1 | | Yes | 2021_01_30_111736_display_takedate | 1 | | Yes | 2021_02_12_222948_config_upload_processing_limit | 1 | | Yes | 2021_02_13_132245_bump_version040202 | 1 | | Yes | 2021_02_18_232639_config_public_photos_hidden | 1 | | Yes | 2021_03_03_175555_config_remove_image_overlay | 1 | | Yes | 2021_04_17_135924_bump_version040300 | 1 | | Yes | 2021_05_02_174300_add_filesize_raw_col | 1 | | Yes | 2021_05_12_185726_bump_version040301 | 1 | | Yes | 2021_05_13_140700_refactor_size_variants | 1 | | Yes | 2021_05_16_171615_bump_version040302 | 1 | | Yes | 2021_05_25_160600_post_revert_fixes | 1 | | Yes | 2021_05_31_201000_convert_filesize_to_bigint | 1 | | Yes | 2021_06_01_181900_refactor_timestamps_anew | 1 | | Yes | 2021_06_01_182000_bump_version040304 | 1 | | Yes | 2021_06_06_151613_fix-takedate | 1 | | Yes | 2021_06_23_105939_create_notifications_table | 1 | | Yes | 2021_06_30_121651_add_email_to_users_table | 1 | | Yes | 2021_06_30_122229_config_new_photos_notification | 1 | | Yes | 2021_07_19_134617_bump_version040305 | 1 | | Yes | 2021_10_27_133121_fix_confidentiality | 1 | | Yes | 2021_11_16_162058_bump_version040306 | 1 | | Yes | 2021_12_03_201242_bump_version040400 | 1 | | Yes | 2064_12_25_0000_generate_installed_log | 1 |

My previous install wasn't installed with git so I can't directly update it in place. I agree with you, it's the simplest way to update, my next install will use git, it's the second goal of the operation.

So I try for a second time the update process: in new 5.0.2 folder

@php artisan package:discover

INFO Discovering packages.

bepsvpt/secure-headers ......................................................................................................... DONE graham-campbell/markdown ....................................................................................................... DONE laragear/webauthn .............................................................................................................. DONE livewire/livewire .............................................................................................................. DONE lychee-org/nestedset ........................................................................................................... DONE nesbot/carbon .................................................................................................................. DONE nunomaduro/termwind ............................................................................................................ DONE opcodesio/log-viewer ........................................................................................................... DONE spatie/laravel-feed ............................................................................................................ DONE spatie/laravel-image-optimizer ................................................................................................. DONE

@php scripts/install_files.php

creating file for CSS personalization

creating file for JS personalization

creating default SQLite database

setting up hooks for git pull and git commits

To disable the call of composer and migration on pull add a file named '.NO_AUTO_COMPOSER_MIGRATE' in this directory. 73 packages you are using are looking for funding. Use the composer fund command to find out more!

@php -r "file_exists('.env') || copy('.env.example', '.env');" @php artisan key:generate --no-override @php artisan vendor:publish --tag=log-viewer-assets

INFO Publishing [log-viewer-assets] assets.

Copying directory [vendor/opcodesio/log-viewer/public] to [public/vendor/log-viewer] ........................................... DONE

everything seams to be OK

44 packages are looking for funding run npm fund for details

found 0 vulnerabilities

everything seams to be OK

vite v4.5.1 building for production... ✓ 120 modules transformed. public/build/assets/layers-1dbbe9d0.png 0.70 kB public/build/assets/layers-2x-066daca8.png 1.26 kB public/build/assets/marker-icon-574c3a5c.png 1.47 kB public/build/manifest.json 2.11 kB │ gzip: 0.45 kB public/build/assets/socials-c8d87384.ttf 2.26 kB public/build/assets/socials-3228de2f.woff 2.34 kB public/build/assets/socials-46bf135b.eot 2.42 kB public/build/assets/socials-62a919f0.svg 3.83 kB │ gzip: 1.69 kB public/build/assets/roboto-v29-300-ad885c9e.woff2 50.08 kB public/build/assets/roboto-v29-700-be54ac8b.woff2 50.20 kB public/build/assets/roboto-v29-400-659a8dee.woff2 50.24 kB public/build/assets/noise-bdd560a8.png 65.98 kB public/build/assets/app-38c2ba3a.css 10.88 kB │ gzip: 2.75 kB public/build/assets/app-dec6a31b.css 46.22 kB │ gzip: 9.12 kB public/build/assets/app-f34d0a20.js 257.41 kB │ gzip: 76.05 kB ✓ built in 5.65s

OK?

-final step: php artisan migrate --> INFO Running migrations.

2021_12_04_181200_refactor_models Info: Checking consistency of DB Warning: Found share with ID 1 which refers to non-existing album with ID 16578129551760 Warning: Found share with ID 2 which refers to non-existing album with ID 16578129551760 Info: Deleting the affected shares Info: Renaming existing tables ........................................................................................ 148ms FAIL

In Connection.php line 822:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'albums_tmp' already exists (Connection: mysql, SQL: rename table al bums to albums_tmp)

In Connection.php line 580:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'albums_tmp' already exists

If I run php artisan migrate a second time I go back to previous error: INFO Running migrations.

2021_12_04_181200_refactor_models Info: Checking consistency of DB ......................................................................................... 42ms FAIL

In Connection.php line 822:

SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' (Connection: mysql, SQL: drop table sym_links
)

In Connection.php line 580:

SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links'

marmoMM commented 9 months ago

One more info, I'm using this php version: PHP 8.2.10-2ubuntu1 (cli) (built: Sep 5 2023 14:37:47) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.10, Copyright (c) Zend Technologies with Zend OPcache v8.2.10-2ubuntu1, Copyright (c), by Zend Technologies

marmoMM commented 9 months ago

Here is the errors.log file obtained during database migration. [2024-01-01 21:37:40] production.ERROR: App\Http\Middleware\MigrationStatus::handle:57 Database version is behind, please apply migration

[2024-01-01 21:37:48] production.ERROR: PDOStatement::execute:580 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'albums_tmp' already exists App\Console\Commands\Migrate::handle:49 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'albums_tmp' already exists; caused by Illuminate\Database\Connection::runQueryCallback:822 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'albums_tmp' already exists (Connection: mysql, SQL: rename table albums to albums_tmp); caused by App\Console\Commands\Migrate::handle:49 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'albums_tmp' already exists (Connection: mysql, SQL: rename table albums to albums_tmp); caused by

[2024-01-01 21:38:12] production.ERROR: PDOStatement::execute:580 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' App\Console\Commands\Migrate::handle:49 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links'; caused by Illuminate\Database\Connection::runQueryCallback:822 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' (Connection: mysql, SQL: drop table sym_links); caused by App\Console\Commands\Migrate::handle:49 SQLSTATE[42S02]: Base table or view not found: 1051 Unknown table 'lychee.sym_links' (Connection: mysql, SQL: drop table sym_links); caused by

marmoMM commented 9 months ago

It's quite long but interesting for who is able to understand. Here is the mysql log during migration process from working database.

40102 17:57:41 447 Connect marc@localhost on lychee using TCP/IP 447 Query use lychee 447 Prepare set names 'utf8mb4' collate 'utf8mb4_unicode_ci' 447 Execute set names 'utf8mb4' collate 'utf8mb4_unicode_ci' 447 Close stmt
447 Prepare set time_zone="+00:00" 447 Execute set time_zone="+00:00" 447 Close stmt
447 Prepare set session sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION ' 447 Execute set session sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION ' 447 Close stmt
447 Prepare select key, value from configs 447 Execute select key, value from configs 447 Close stmt
240102 17:57:51 447 Prepare select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'lychee' and table_type = 'BASE TABLE' order by table_name 447 Execute select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'lychee' and table_type = 'BASE TABLE' order by table_name 447 Close stmt
447 Prepare select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'lychee' and table_type = 'BASE TABLE' order by table_name 447 Execute select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'lychee' and table_type = 'BASE TABLE' order by table_name 447 Close stmt
447 Prepare select migration from migrations order by batch asc, migration asc 447 Execute select migration from migrations order by batch asc, migration asc 447 Close stmt
447 Prepare select migration from migrations order by batch asc, migration asc 447 Execute select migration from migrations order by batch asc, migration asc 447 Close stmt
447 Prepare select max(batch) as aggregate from migrations 447 Execute select max(batch) as aggregate from migrations 447 Close stmt
447 Prepare select id, owner_id from albums where owner_id not in (select id from users) 447 Execute select id, owner_id from albums where owner_id not in (select id from users) 447 Close stmt
447 Prepare select id, parent_id from albums where parent_id not in (select id from albums) 447 Execute select id, parent_id from albums where parent_id not in (select id from albums) 447 Close stmt
447 Prepare select id, cover_id from albums where cover_id not in (select id from photos) 447 Execute select id, cover_id from albums where cover_id not in (select id from photos) 447 Close stmt
447 Prepare select id, user_id from user_album where user_id not in (select id from users) 447 Execute select id, user_id from user_album where user_id not in (select id from users) 447 Close stmt
447 Prepare select id, album_id from user_album where album_id not in (select id from albums) 447 Execute select id, album_id from user_album where album_id not in (select id from albums) 447 Close stmt
447 Prepare delete from user_album where id in (?, ?) 447 Execute delete from user_album where id in (1, 2) 447 Close stmt
447 Prepare select id, owner_id from photos where owner_id not in (select id from users) 447 Execute select id, owner_id from photos where owner_id not in (select id from users) 447 Close stmt
447 Prepare select id, album_id from photos where album_id not in (select id from albums) 447 Execute select id, album_id from photos where album_id not in (select id from albums) 447 Close stmt
447 Prepare select id, user_id from web_authn_credentials where user_id not in (select id from users) 447 Execute select id, user_id from web_authn_credentials where user_id not in (select id from users) 447 Close stmt
447 Prepare select id, page_id from page_contents where page_id not in (select id from pages) 447 Execute select id, page_id from page_contents where page_id not in (select id from pages) 447 Close stmt
447 Prepare select id, parent_id, _lft, _rgt from albums order by _lft asc 447 Execute select id, parent_id, _lft, _rgt from albums order by _lft asc 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 3, _rgt = 4 where id = 16578310592851 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 5, _rgt = 6 where id = 16581435723875 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 7, _rgt = 8 where id = 16584836932312 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 9, _rgt = 10 where id = 16623195542706 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 11, _rgt = 12 where id = 16635165311244 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 13, _rgt = 14 where id = 16641270834263 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 15, _rgt = 16 where id = 16681968446306 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 17, _rgt = 18 where id = 16689587783702 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 19, _rgt = 20 where id = 16724699856049 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 21, _rgt = 22 where id = 16724704795608 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 23, _rgt = 24 where id = 16725829401868 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 25, _rgt = 26 where id = 16762340177217 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 27, _rgt = 28 where id = 16811529132288 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 29, _rgt = 30 where id = 16854485598892 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 31, _rgt = 32 where id = 16856105533502 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 33, _rgt = 34 where id = 16901246033972 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 35, _rgt = 36 where id = 16954697336536 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 37, _rgt = 38 where id = 16975336247833 447 Close stmt
447 Prepare update albums set _lft = ?, _rgt = ? where id = ? 447 Execute update albums set _lft = 39, _rgt = 40 where id = 16976424562424 447 Close stmt
447 Prepare drop table sym_links 447 Execute drop table sym_links 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = ? AND t.TABLE_NAME = ? AND t.TABLE_TYPE = 'BASE TABLE' 447 Execute SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = 'lychee' AND t.TABLE_NAME = 'albums' AND t.TABLE_TYPE = 'BASE TABLE' 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = ? AND k.TABLE_NAME = ? AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Execute SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = 'lychee' AND k.TABLE_NAME = 'albums' AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = ? AND t.TABLE_SCHEMA = ? AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = ? ORDER BY ORDINAL_POSITION 447 Execute SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = 'lychee' AND t.TABLE_SCHEMA = 'lychee' AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = 'albums' ORDER BY ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY SEQ_IN_INDEX 447 Execute SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = 'lychee' AND TABLE_NAME = 'albums' ORDER BY SEQ_IN_INDEX 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = ? AND t.TABLE_NAME = ? AND t.TABLE_TYPE = 'BASE TABLE' 447 Execute SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = 'lychee' AND t.TABLE_NAME = 'albums' AND t.TABLE_TYPE = 'BASE TABLE' 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = ? AND k.TABLE_NAME = ? AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Execute SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = 'lychee' AND k.TABLE_NAME = 'albums' AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = ? AND t.TABLE_SCHEMA = ? AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = ? ORDER BY ORDINAL_POSITION 447 Execute SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = 'lychee' AND t.TABLE_SCHEMA = 'lychee' AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = 'albums' ORDER BY ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY SEQ_IN_INDEX 447 Execute SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = 'lychee' AND TABLE_NAME = 'albums' ORDER BY SEQ_IN_INDEX 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = ? AND t.TABLE_NAME = ? AND t.TABLE_TYPE = 'BASE TABLE' 447 Execute SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = 'lychee' AND t.TABLE_NAME = 'albums' AND t.TABLE_TYPE = 'BASE TABLE' 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = ? AND k.TABLE_NAME = ? AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Execute SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = 'lychee' AND k.TABLE_NAME = 'albums' AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = ? AND t.TABLE_SCHEMA = ? AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = ? ORDER BY ORDINAL_POSITION 447 Execute SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = 'lychee' AND t.TABLE_SCHEMA = 'lychee' AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = 'albums' ORDER BY ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY SEQ_IN_INDEX 447 Execute SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = 'lychee' AND TABLE_NAME = 'albums' ORDER BY SEQ_IN_INDEX 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = ? AND t.TABLE_NAME = ? AND t.TABLE_TYPE = 'BASE TABLE' 447 Execute SELECT t.TABLE_NAME, t.ENGINE, t.AUTO_INCREMENT, t.TABLE_COMMENT, t.CREATE_OPTIONS, t.TABLE_COLLATION, ccsa.CHARACTER_SET_NAME FROM information_schema.TABLES t INNER JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ccsa ON ccsa.COLLATION_NAME = t.TABLE_COLLATION WHERE t.TABLE_SCHEMA = 'lychee' AND t.TABLE_NAME = 'albums' AND t.TABLE_TYPE = 'BASE TABLE' 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = ? AND k.TABLE_NAME = ? AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Execute SELECT DISTINCT k.CONSTRAINT_NAME, k.COLUMN_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME, k.ORDINAL_POSITION /!50116, c.UPDATE_RULE, c.DELETE_RULE / FROM information_schema.key_column_usage k /!50116 INNER JOIN information_schema.referential_constraints c ON c.CONSTRAINT_NAME = k.CONSTRAINT_NAME AND c.TABLE_NAME = k.TABLE_NAME / WHERE k.TABLE_SCHEMA = 'lychee' AND k.TABLE_NAME = 'albums' AND k.REFERENCED_COLUMN_NAME IS NOT NULL /!50116 AND c.CONSTRAINT_SCHEMA = 'lychee' / ORDER BY k.ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = ? AND t.TABLE_SCHEMA = ? AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = ? ORDER BY ORDINAL_POSITION 447 Execute SELECT c.COLUMN_NAME AS field, IF( c.COLUMN_TYPE = 'longtext' AND EXISTS( SELECT from information_schema.CHECK_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = 'lychee' AND TABLE_NAME = c.TABLE_NAME AND CHECK_CLAUSE = CONCAT( 'json_valid(', c.COLUMN_NAME, ')' ) ), 'json', c.COLUMN_TYPE ) AS type, c.IS_NULLABLE AS null, c.COLUMN_KEY AS key, c.COLUMN_DEFAULT AS default, c.EXTRA, c.COLUMN_COMMENT AS comment, c.CHARACTER_SET_NAME AS characterset, c.COLLATION_NAME AS collation FROM information_schema.COLUMNS c INNER JOIN information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME WHERE c.TABLE_SCHEMA = 'lychee' AND t.TABLE_SCHEMA = 'lychee' AND t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_NAME = 'albums' ORDER BY ORDINAL_POSITION 447 Close stmt
447 Prepare SELECT DATABASE() 447 Execute SELECT DATABASE() 447 Close stmt
447 Prepare SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY SEQ_IN_INDEX 447 Execute SELECT NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, COLUMN_NAME AS Column_Name, SUB_PART AS Sub_Part, INDEX_TYPE AS Index_Type FROM information_schema.STATISTICS WHERE TABLE_SCHEMA = 'lychee' AND TABLE_NAME = 'albums' ORDER BY SEQ_IN_INDEX 447 Close stmt
447 Prepare alter table albums drop foreign key albums_parent_id_foreign 447 Execute alter table albums drop foreign key albums_parent_id_foreign 447 Close stmt
447 Prepare alter table albums drop index albums__lft__rgt_index 447 Execute alter table albums drop index albums__lft__rgt_index 447 Close stmt
447 Prepare rename table albums to albums_tmp 447 Execute rename table albums to albums_tmp 447 Close stmt
447 Quit

kamil4 commented 9 months ago

The problem right now is that your database is inconsistent. See all these _tmp tables?

| logs_tmp |
| page_contents_tmp |
| pages_tmp |
| photos_tmp |

They shouldn't be there. At all. They are only used temporarily during a particular migration, which must've failed for you for some reason (currently unknown) halfway through and left the database in that messed up state.

You wrote that you restored the database from a backup after the migration failed. You must've restored to a "dirty" database, and now when retrying the migration, it fails because it encounters tables that shouldn't be there (specifically it's failing on albums_tmp). But before the migration fails, it first deletes the sym_links tables, so when you rerun that failed migration again, it now fails because it can't find the sym_links table. But that's not the root cause.

My recommendation would be to restore from a backup to a clean (empty) database, verify that the database contains expected tables such as albums and sym_links (but not albums_tmp), and only then run the new migrations. It's quite possible that this will still fail for you (because it already failed for you the first time the migration ran), but at least this time you should be able to capture the actual error message to see why it failed.

Alternatively, if restoring to a clean database is not an option for some reason, do whatever voodoo you did before to get things working again with 4.4, and then manually drop all the _tmp tables before running the migration.

kamil4 commented 9 months ago

BTW, the migration that's failing is quite old (from the 4.5.3 release). If things keep failing for you and you feel like experimenting, you may want to try to upgrade first to something like 4.5.3 or 4.6.0, and only then to 5.0.2. @ildyria is right that upgrading directly from 4.4 to 5.0 should work, but it's not something that gets exhaustively tested, whereas the upgrade from 4.4 to 4.5/4.6 was exercised by everybody.

marmoMM commented 9 months ago

Thank you very much for all your advice and work. First I deleted the _tmp tables Then I successfully updated 4.4 --> 4.7 --> 4.9.2 Lychee works perfectly under this last version with php 8.2.10 I have a new error when updating from 4.9.2 to 5.0.2 --> 2023_09_16_234050_require_single_key_in_config ................................................................. 3ms FAIL

In Connection.php line 817:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'site_owner' for key 'configs_key_unique' (Connect
ion: mysql, SQL: alter table configs add unique configs_key_unique(key))

In Connection.php line 580:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'site_owner' for key 'configs_key_unique'

Indeed in diagnostics, I have this site_owner: John Smith site_owner: John Smith landing_title: John Smith landing_subtitle: Cats, Dogs & Humans Photography sm_facebook_url: https://www.facebook.com/JohnSmith sm_facebook_url: https://www.facebook.com/JohnSmith sm_flickr_url: https://www.flickr.com/JohnSmith sm_twitter_url: https://www.twitter.com/JohnSmith sm_twitter_url: https://www.twitter.com/JohnSmith sm_instagram_url: https://instagram.com/JohnSmith sm_youtube_url: https://www.youtube.com/JohnSmith sm_youtube_url: https://www.youtube.com/JohnSmith

But thank you very much for your help, I have already made good progress.

d7415 commented 9 months ago

Strange. But it looks like you'll need to delete any duplicate keys from your database and try the migration again.

marmoMM commented 9 months ago

Once again, many thanks. I removed duplicate entries. I finally successfully updated to version 5.0.2 It is a great pleasure to use this site for my photos, it is practical and very easy to use. Thank you for your responsiveness and your development work.

marmoMM commented 9 months ago

Once again, many thanks. I removed duplicate entries I finally successfully updated to version 5.0.2 It is a great pleasure to use this site for my photos, it is practical and very easy to use. Thank you for your responsiveness and your development work.