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

Migrated from version 3 to 4. No previous photos or albums showing. #1104

Closed corrilan closed 3 years ago

corrilan commented 3 years ago

Detailed description of the problem [REQUIRED]

Migrated from version 3 to 4 using guide at https://lycheeorg.github.io/docs/upgrade.html. I followed through the /install until I got to the confirmation message ending:

Application key set successfully. Lychee INSTALLED on 2021-09-18 16:01:57 Created installed.log

Upon browsing to the new version 4 installation I am prompted to create a user and after this I am shown the new interface but no previous photos or albums showing. I have copied the .jpg files as per the upgrade guide.

I have also run the "php artisan migrate:refresh" command to try to resolve the issue as mentioned in a previous post.

The tables in my v3 database are called: lychee_albums lychee_log lychee_photos lychee_settings

Therefore in the migration setup I entered "lychee_" as the v3 table prefix. I have also tried with a blank prefix.

The v3 databases lychee_photos contains 1100 rows. I was therefore expecting the v4 photos table to migrate the same number of rows, but it is instead at 0 rows after migration.

Steps to reproduce the issue

Steps to reproduce the behavior:

  1. Follow guide at https://lycheeorg.github.io/docs/upgrade.html
  2. Browse to my lychee website which diverts to /install
  3. Follow through /install instructions.
  4. Browse to new install and create username.
  5. Login to new install
  6. Expect to see previous albums from version 3, instead see no previous albums.

Output of the diagnostics [REQUIRED]

Diagnostics

Error: Wrong property for Mod_Frame_refresh in database, expected positive integer. Warning: Dropbox import not working. dropbox_key is empty. Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details. Warning: You may experience problems when uploading a photos of large size. Take a look in the FAQ for details. Warning: You may experience problems when uploading a large amount of photos. Take a look in the FAQ for details. Warning: Pictures that are rotated lose their metadata! Please install Imagick to avoid that. Info: Latest version of PHP is 8 Error: PHP zip extension not activated

System Information

Lychee Version (release): 4.3.4 DB Version: 4.3.4

composer install: --no-dev APP_ENV: production APP_DEBUG: false

System: Linux PHP Version: 7.4 Max uploaded file size: 2M Max post size: 8M MySQL Version: 8.0.26-0ubuntu0.20.04.2

Imagick: - Imagick Active: 1 Imagick Version: - GD Version: 2.2.5

Config Information

version: 040304 check_for_updates: 0 sorting_Photos_col: taken_at sorting_Photos_order: ASC sorting_Albums_col: max_taken_at sorting_Albums_order: ASC imagick: 1 skip_duplicates: 0 small_max_width: 0 small_max_height: 360 medium_max_width: 1920 medium_max_height: 1080 lang: en layout: 1 image_overlay_type: desc default_license: none compression_quality: 90 full_photo: 1 delete_imported: 0 Mod_Frame: 1 Mod_Frame_refresh: 0.03 thumb_2x: 1 small_2x: 1 medium_2x: 1 landing_page_enable: 0 landing_owner: John Smith landing_title: John Smith landing_subtitle: Cats, Dogs & Humans Photography landing_facebook: https://www.facebook.com/JohnSmith landing_flickr: https://www.flickr.com/JohnSmith landing_twitter: https://www.twitter.com/JohnSmith landing_instagram: https://instagram.com/JohnSmith landing_youtube: https://www.youtube.com/JohnSmith landing_background: dist/cat.jpg site_title: Lychee v4 site_copyright_enable: 1 site_copyright_begin: 2019 site_copyright_end: 2019 additional_footer_text:
display_social_in_gallery: 0 public_search: 0 SL_enable: 0 SL_for_admin: 0 public_recent: 0 recent_age: 1 public_starred: 0 downloadable: 0 photos_wraparound: 1 map_display: 0 zip64: 1 map_display_public: 0 map_provider: Wikimedia force_32bit_ids: 0 map_include_subalbums: 0 update_check_every_days: 3 has_exiftool: 0 share_button_visible: 0 import_via_symlink: 0 has_ffmpeg: 0 location_decoding: 0 location_decoding_timeout: 30 location_show: 1 location_show_public: 0 rss_enable: 0 rss_recent_days: 7 rss_max_items: 100 prefer_available_xmp_metadata: 0 editor_enabled: 1 lossless_optimization: 0 swipe_tolerance_x: 150 swipe_tolerance_y: 250 local_takestamp_video_formats: .avi|.mov log_max_num_line: 1000 unlock_password_photos_with_url_param: 0 nsfw_visible: 1 nsfw_blur: 0 nsfw_warning: 0 nsfw_warning_admin: 0 map_display_direction: 1 album_subtitle_type: oldstyle upload_processing_limit: 4 public_photos_hidden: 1

Browser and system

Ubuntu Linux 20.04.3 LTS (Focal Fossa) using browser Google Chrome and Mozilla Firefox.

corrilan commented 3 years ago

Managed to resolve myself.

I was setting my new database name to be lychee4 which I had created.

I found that I had to give the details of the old database and not a new one. So instead of 'lychee4' I should have given the details of the old 'lychee' database instead.

I had to leave the table prefix empty.

Migration then populated the new photos table from the old 'lychee_photos' table, but within the same old database.

I think this could be make clearer in the /install procedure as the current instructions can be misconstrued.

Other that than, what a great product! Thank you.

howdytom commented 2 years ago

Thank you. Migrating from v3 to v4 has been smooth ride.

I have run into same issue. Leaving Table prefix is essential. _DB_OLD_LYCHEE_PREFIX=