Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After v3 to v4 migration: Albums are there, but photos are missing #703

Closed
CountCypher opened this issue Aug 27, 2020 · 15 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@CountCypher
Copy link

Detailed description of the problem

After migration from v3 to v4 I see all of my five albums, but four of them are empty and one of them contains only one photo. I followed the migration instructions here.

Steps to reproduce the issue

n.a.

Screenshots
n.a.

Output of the diagnostics

    Diagnostics
    -------
    Info: Latest version of PHP is 7.4
    Warning: Using 32 bit PHP, recommended upgrade to 64 bit
    Warning: Dropbox import not working. dropbox_key is empty.


    System Information
    --------------
    Lychee Version (release):   4.0.6
    DB Version:                 4.0.6
    
    composer install:           --no-dev
    APP_ENV:                    production
    APP_DEBUG:                  false
    
    System:                     Linux
    PHP Version:                7.3
    MySQL Version:              10.3.23-MariaDB-0+deb10u1
    
    Imagick:                    1
    Imagick Active:             1
    Imagick Version:            1690
    GD Version:                 2.2.5

    Config Information
    --------------
    version:                    040006
    check_for_updates:          0
    sorting_Photos_col:         takestamp
    sorting_Photos_order:       ASC
    sorting_Albums_col:         id
    sorting_Albums_order:       DESC
    imagick:                    1
    skip_duplicates:            0
    small_max_width:            0
    small_max_height:           360
    medium_max_width:           1920
    medium_max_height:          1080
    lang:                       de
    layout:                     0
    image_overlay:              0
    image_overlay_type:         exif
    default_license:            none
    compression_quality:        90
    full_photo:                 1
    delete_imported:            1
    Mod_Frame:                  1
    Mod_Frame_refresh:          30
    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:                 1
    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

Browser and system

Client: Firefox 78.2.0esr on Fedora 32 Workstation
Server: Debian Buster on armv7l

@kamil4
Copy link
Contributor

kamil4 commented Aug 27, 2020

Do the albums actually show as empty or do they contain "empty" photos (frame only)? If the latter, did you move the files with the photos from the old uploads directory to the new one, as outlined in the migration instructions?

@CountCypher
Copy link
Author

Do the albums actually show as empty or do they contain "empty" photos (frame only)?

The albums show as empty (except for the one album containing only one photo).

@kamil4
Copy link
Contributor

kamil4 commented Aug 27, 2020

Yeah, that's weird... And that happens even when you are logged in as admin? Do you have a console access to your mysql database? If so, could you run the following two queries and send us their output if it's not too long?

select id, title, parent_id from albums;
select id, title, album_id from photos;

@CountCypher
Copy link
Author

MariaDB [lychee]> select id, title, parent_id from albums;
+------------+----------------------------------------+-----------+
| id         | title                                  | parent_id |
+------------+----------------------------------------+-----------+
| 1567712737 | Passau mit Papa & Stefan (August 2019) |      NULL |
| 1569150197 | Katharina beim Signieren               |      NULL |
| 1570361900 | Unsere Hochzeit (Best of)              |      NULL |
| 1586690543 | Weihnachten 2019 in Weingarten         |      NULL |
| 1586690809 | Brigels mit Julia u. Stefan            |      NULL |
+------------+----------------------------------------+-----------+
5 rows in set (0.000 sec)

MariaDB [lychee]> select id, title, album_id from photos;
+------------+--------------------------------+------------+
| id         | title                          | album_id   |
+------------+--------------------------------+------------+
| 1567712770 | Panorama_Passau_Blick_Kloster_ | 1567712737 |
+------------+--------------------------------+------------+
1 row in set (0.001 sec)

The second SQL query probably gives me the one photo I see?

@kamil4
Copy link
Contributor

kamil4 commented Aug 27, 2020

Yes. So the other photos are indeed completely missing from the v4 photos table. I wonder if the database migration failed in some way? Just to confirm, the following query on the v3 photos table generates the expected output?

select id, title, album from lychee_photos;

What does php artisan migrate:status print? You can rerun all the migrations using php artisan migrate:refresh though if you have made any changes to the v4 Lychee already (like uploading new photos), those will be lost... But at least you will know for sure if there were any failures. Look in particular for any messages from the 2018_08_15_103716_move_photos migration...

@CountCypher
Copy link
Author

The output of the query on lychee_photo looks ok to me reagrding the kind and number of photos, but otherwise cannot say:

MariaDB [lychee]> select id, title, album from lychee_photos;
+----------------+--------------------------------+----------------+
| id             | title                          | album          |
+----------------+--------------------------------+----------------+
| 15677127700086 | Panorama_Passau_Blick_Kloster_ | 15677127379839 |
| 15677128164576 | IMG_20190818_110515            | 15677127379839 |
| 15677128265459 | IMG_20190818_110434            | 15677127379839 |
| 15677128313533 | IMG_20190817_130924            | 15677127379839 |
| 15677128345824 | IMG_20190816_201237            | 15677127379839 |
| 15677128367628 | IMG_20190816_200812            | 15677127379839 |
| 15677128408215 | IMG_20190816_200741            | 15677127379839 |
| 15677128467767 | IMG_20190816_200548            | 15677127379839 |
| 15677128498290 | IMG_20190816_154424            | 15677127379839 |
| 15677128549752 | IMG_20190816_090859            | 15677127379839 |
| 15677128608943 | IMG_20190815_185221            | 15677127379839 |
| 15677128640656 | IMG_20190815_182950            | 15677127379839 |
| 15677128692536 | IMG_20190815_182733            | 15677127379839 |
| 15677128746548 | IMG_20190815_182723            | 15677127379839 |
| 15677128796085 | IMG_20190815_182716            | 15677127379839 |
| 15677128822379 | IMG_20190815_181229            | 15677127379839 |
| 15677128878931 | IMG_20190815_180001            | 15677127379839 |
| 15677128906010 | IMG_20190815_175826            | 15677127379839 |
| 15677128947170 | IMG_20190815_172436            | 15677127379839 |
| 15677129161204 | IMG_2974                       | 15677127379839 |
| 15677129245255 | IMG_2973                       | 15677127379839 |
| 15677129454246 | IMG_2972                       | 15677127379839 |
| 15677129647228 | IMG_2971                       | 15677127379839 |
| 15677129713496 | IMG_2968                       | 15677127379839 |
| 15677129836187 | IMG_2967                       | 15677127379839 |
| 15677130115292 | IMG_2966                       | 15677127379839 |
| 15677130193903 | IMG_2964                       | 15677127379839 |
| 15677130341540 | IMG_2963                       | 15677127379839 |
| 15677130510357 | IMG_2962                       | 15677127379839 |
| 15677130565518 | IMG_2961                       | 15677127379839 |
| 15677130694987 | IMG_2958                       | 15677127379839 |
| 15677130833284 | IMG_2957                       | 15677127379839 |
| 15677130908390 | IMG_2953                       | 15677127379839 |
| 15677131059187 | IMG_2951                       | 15677127379839 |
| 15677131166123 | IMG_2950                       | 15677127379839 |
| 15677131218236 | IMG_2948                       | 15677127379839 |
| 15677131437235 | IMG_2946                       | 15677127379839 |
| 15677131545446 | IMG_2945                       | 15677127379839 |
| 15677131599014 | IMG_2939                       | 15677127379839 |
| 15677131715671 | IMG_2938                       | 15677127379839 |
| 15677131889916 | IMG_2937                       | 15677127379839 |
| 15677131965347 | IMG_2936                       | 15677127379839 |
| 15677132052527 | IMG_2934                       | 15677127379839 |
| 15677132202389 | IMG_2933                       | 15677127379839 |
| 15677132285114 | IMG_2932                       | 15677127379839 |
| 15677132364471 | IMG_2930                       | 15677127379839 |
| 15677132538401 | IMG_2928                       | 15677127379839 |
| 15677132608188 | IMG_2927                       | 15677127379839 |
| 15677132700483 | IMG_2926                       | 15677127379839 |
| 15677132827050 | IMG_2925                       | 15677127379839 |
| 15677132896760 | IMG_2923                       | 15677127379839 |
| 15677132997722 | IMG_2922                       | 15677127379839 |
| 15677133112123 | IMG_2918                       | 15677127379839 |
| 15677133167687 | IMG_2917                       | 15677127379839 |
| 15677133296523 | IMG_2915                       | 15677127379839 |
| 15677133411659 | IMG_2914                       | 15677127379839 |
| 15677135713983 | Panorama_Passau_Altstadt_small | 15677127379839 |
| 15691502575660 | IMG_20190921_094644            | 15691501978325 |
| 15691502972265 | IMG_20190921_094647            | 15691501978325 |
| 15691503268136 | IMG_20190921_094652            | 15691501978325 |
| 15691503351251 | IMG_20190921_094702            | 15691501978325 |
| 15691503425570 | IMG_20190921_094705            | 15691501978325 |
| 15691503508246 | IMG_20190921_094712            | 15691501978325 |
| 15691503808420 | IMG_20190921_095504            | 15691501978325 |
| 15691503980338 | IMG_20190921_102459            | 15691501978325 |
| 15691504048287 | IMG_20190921_102504            | 15691501978325 |
| 15691504152113 | IMG_20190921_102512            | 15691501978325 |
| 15691504306634 | IMG_20190921_102531            | 15691501978325 |
| 15691504424779 | IMG_20190921_102539            | 15691501978325 |
| 15691504495527 | IMG_20190921_102541            | 15691501978325 |
| 15691504590003 | IMG_20190921_102550            | 15691501978325 |
| 15691504956607 | IMG_20190921_102654            | 15691501978325 |
| 15691505031670 | IMG_20190921_102701            | 15691501978325 |
| 15691505101640 | IMG_20190921_102740            | 15691501978325 |
| 15691505162340 | IMG_20190921_102741            | 15691501978325 |
| 15691505230906 | IMG_20190921_102742            | 15691501978325 |
| 15691505296372 | IMG_20190921_113939            | 15691501978325 |
| 15691505351144 | IMG_20190921_114256            | 15691501978325 |
| 15703619480912 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619503915 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619507519 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619511377 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619530208 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619533519 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619541462 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619545111 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619548855 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619552421 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619555943 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619576512 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619580672 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619583977 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619587307 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619590678 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619594173 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619597512 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619600763 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619603942 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619607309 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619610908 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619614105 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619617436 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619620759 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619624289 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619627497 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619648671 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619654400 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619657595 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619660990 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619678043 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619681794 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619685058 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619688219 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619691654 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619694972 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619698100 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619701399 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619704719 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619707964 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619711318 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619714595 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619717834 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619721288 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619724579 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619727884 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619732098 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619735453 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619741246 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619745067 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619748483 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619755420 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619758752 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619763251 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619766946 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619770963 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619775499 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619780397 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619783650 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619787632 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619791458 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619832621 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619839992 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619843208 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619847068 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619851697 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619854956 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619858940 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619863085 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619870923 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619893956 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619897586 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619900807 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619911058 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619914591 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619935175 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619939773 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619942988 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619946360 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619949568 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619952951 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619957322 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619960544 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619963913 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619990128 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619994206 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703619997490 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620001706 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620005782 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620009135 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620013239 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620058663 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620066228 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620071878 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620075204 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620078798 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620083549 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620091811 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620095195 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620098535 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620102208 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620159238 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620162640 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620166012 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620173750 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620182135 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620189518 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620193656 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620220233 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620248481 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620251781 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620255302 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620261159 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620264976 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620270698 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620274532 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620278354 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620281934 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620285527 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620288845 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620292290 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620295671 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620298942 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620302345 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620305670 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620308905 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620312653 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620316252 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620319885 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620323319 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620327053 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620330659 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620338466 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620341700 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620345347 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620349213 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620375075 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620381187 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620386028 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620392045 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620395350 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620400218 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620404237 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620426087 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620449929 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620453319 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620460847 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620464318 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620467543 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620471216 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620474736 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620483841 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703620487151 | hochzeitsfotograf-bad-neustadt | 15703619006189 |
| 15703621611390 | _S1_8822-84_1200               | 15703619006189 |
| 15866905799671 | IMG_20191225_130917            | 15866905432190 |
| 15866905830229 | IMG_20191225_130913            | 15866905432190 |
| 15866905856951 | IMG_20191224_210203            | 15866905432190 |
| 15866905883506 | IMG_20191224_210216            | 15866905432190 |
| 15866905909790 | IMG_20191224_193920            | 15866905432190 |
| 15866905943105 | IMG_20191224_193830            | 15866905432190 |
| 15866905969035 | IMG_20191224_193911            | 15866905432190 |
| 15866906002541 | IMG_20191224_193824            | 15866905432190 |
| 15866906028633 | IMG_20191224_181959            | 15866905432190 |
| 15866906055233 | IMG_20191224_193903            | 15866905432190 |
| 15866906081487 | IMG_20191224_182002            | 15866905432190 |
| 15866906107717 | IMG_20191224_180524            | 15866905432190 |
| 15866906138108 | IMG_20191224_181949            | 15866905432190 |
| 15866906172956 | IMG_20191224_181727            | 15866905432190 |
| 15866906215123 | IMG_20191224_180501            | 15866905432190 |
| 15866906244744 | IMG_20191224_143957            | 15866905432190 |
| 15866906286001 | IMG_20191224_143858            | 15866905432190 |
| 15866906315416 | IMG_20191224_180515            | 15866905432190 |
| 15866906362258 | IMG_20191224_143845            | 15866905432190 |
| 15866906398181 | IMG_20191224_180432            | 15866905432190 |
| 15866906432743 | IMG_20191224_143945            | 15866905432190 |
| 15866906453997 | IMG_20191224_143711            | 15866905432190 |
| 15866906480074 | IMG_20191224_142729            | 15866905432190 |
| 15866906506396 | IMG_20191224_142733            | 15866905432190 |
| 15866906541908 | IMG_20191223_171843            | 15866905432190 |
| 15866906581882 | IMG_20191223_172709            | 15866905432190 |
| 15866906611180 | IMG_20191223_171845            | 15866905432190 |
| 15866906640212 | IMG_20191223_171616            | 15866905432190 |
| 15866906666567 | IMG_20191223_171612            | 15866905432190 |
| 15866908856694 | IMG_20200228_140706            | 15866908091178 |
| 15866908888622 | IMG_20200228_140704            | 15866908091178 |
| 15866908920403 | IMG_20200228_135117            | 15866908091178 |
| 15866908954595 | IMG_20200228_135111            | 15866908091178 |
| 15866908981500 | IMG_20200228_135029            | 15866908091178 |
| 15866909011448 | IMG_20200228_135945            | 15866908091178 |
| 15866909041827 | IMG_20200228_134949            | 15866908091178 |
| 15866909068602 | IMG_20200228_135939            | 15866908091178 |
| 15866909099487 | IMG_20200228_134926            | 15866908091178 |
| 15866909126228 | IMG_20200228_135027            | 15866908091178 |
| 15866909156239 | IMG_20200228_134920            | 15866908091178 |
| 15866909186703 | IMG_20200228_135025            | 15866908091178 |
| 15866909216721 | IMG_20200228_122809            | 15866908091178 |
| 15866909247916 | IMG_20200228_122802            | 15866908091178 |
| 15866909282333 | IMG_20200228_134915            | 15866908091178 |
| 15866909322058 | IMG_20200228_122633            | 15866908091178 |
| 15866909355127 | IMG_20200228_134907            | 15866908091178 |
| 15866909381561 | IMG_20200228_122621            | 15866908091178 |
| 15866909409007 | IMG_20200228_122807            | 15866908091178 |
| 15866909435734 | IMG_20200228_122758            | 15866908091178 |
| 15866909465833 | IMG_20200228_122446            | 15866908091178 |
| 15866909495903 | IMG_20200228_122433            | 15866908091178 |
| 15866909522720 | IMG_20200228_122444            | 15866908091178 |
| 15866909552973 | IMG_20200228_122429            | 15866908091178 |
| 15866909587648 | IMG_20200228_122605            | 15866908091178 |
| 15866909613904 | IMG_20200227_203345            | 15866908091178 |
| 15866909643933 | IMG_20200226_143145            | 15866908091178 |
| 15866909682077 | IMG_20200228_122408            | 15866908091178 |
| 15866909741347 | IMG_20200226_143045            | 15866908091178 |
| 15866909768966 | IMG_20200227_203343            | 15866908091178 |
| 15866909806437 | IMG_20200226_143044            | 15866908091178 |
| 15866909833001 | IMG_20200224_132335            | 15866908091178 |
| 15866909862597 | IMG_20200226_143046            | 15866908091178 |
| 15866909889228 | IMG_20200224_132326            | 15866908091178 |
| 15866909923005 | IMG_20200224_132324            | 15866908091178 |
| 15866909965463 | IMG_20200224_132325            | 15866908091178 |
| 15866909995859 | IMG_20200224_130045            | 15866908091178 |
| 15866910026209 | IMG_20200224_130046            | 15866908091178 |
+----------------+--------------------------------+----------------+
300 rows in set (0.004 sec)

Here the output of php artisan migrate:status:

PHP Notice:  date_default_timezone_set(): Timezone ID 'UTC+2' is invalid in /var/www/Lychee/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 49
+------+--------------------------------------------------------+-------+
| 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                          | 2     |
| Yes  | 2018_10_30_135411_sharing                              | 2     |
| Yes  | 2019_02_21_114356_create_pages_table                   | 2     |
| Yes  | 2019_02_21_114408_create_page_contents_table           | 2     |
| Yes  | 2019_06_21_180451_create_sym_links_table               | 2     |
| Yes  | 2019_09_28_171753_config_fix                           | 2     |
| Yes  | 2019_09_28_190822_photos_fix                           | 2     |
| Yes  | 2019_10_01_add_livephoto_cols                          | 2     |
| Yes  | 2019_10_02_1400_config_map_display_public              | 2     |
| Yes  | 2019_10_03_214750_frame_refresh_in_sec                 | 2     |
| Yes  | 2019_10_06_1400_config_map_providers                   | 2     |
| Yes  | 2019_10_06_152017_add_force_32bit_ids                  | 2     |
| Yes  | 2019_10_07_0900_config_map_include_sub_albums          | 2     |
| Yes  | 2019_10_09_233402_config_map_mod                       | 2     |
| Yes  | 2019_10_11_093442_config_check_update_every            | 2     |
| Yes  | 2019_12_02_2100_config_exiftool                        | 2     |
| Yes  | 2019_12_15_0700_add_share_button_visible_option        | 2     |
| Yes  | 2019_12_15_1000_config_check_update_every_cat_fix      | 2     |
| Yes  | 2019_12_25_0600_config_exiftool_ternary                | 2     |
| Yes  | 2020_01_018_2300_config_import_via_symlink             | 2     |
| Yes  | 2020_01_04_1200_config_has_ffmpeg                      | 2     |
| Yes  | 2020_01_26_1200_config_public_sorting                  | 2     |
| Yes  | 2020_01_28_133201_composer_update                      | 2     |
| Yes  | 2020_02_14_0600_location_decoding                      | 2     |
| Yes  | 2020_03_11_124417_increase_length_photo_type           | 2     |
| Yes  | 2020_03_17_200000_unhide_configs                       | 2     |
| Yes  | 2020_04_19_122905_bump_version                         | 2     |
| Yes  | 2020_04_22_155712_bump_version040002                   | 2     |
| Yes  | 2020_04_29_000250_bump_version040003                   | 2     |
| Yes  | 2020_05_12_114228_rss                                  | 2     |
| Yes  | 2020_05_12_161427_bump_version040005                   | 2     |
| Yes  | 2020_05_19_174233_config_prefer_available_xmp_metadata | 2     |
| Yes  | 2020_05_26_135052_bump_version040006                   | 2     |
| Yes  | 2064_12_25_0000_generate_installed_log                 | 2     |
+------+--------------------------------------------------------+-------+

I haven't done any changes to v4 yet, so running php artisan migrate:refresh could be an option.

@kamil4
Copy link
Contributor

kamil4 commented Aug 27, 2020

Yes, the v3 photos table looks good.

Your database migrations definitely weren't all done in one batch (see the last column above). I'm not sure why that would be. Under the circumstance, I definitely recommend php artisan migrate:refresh.

@CountCypher
Copy link
Author

CountCypher commented Aug 27, 2020

Hmm, running php artisan migrate:refresh ends with some errors:

PHP Notice:  date_default_timezone_set(): Timezone ID 'UTC+2' is invalid in /var/www/Lychee/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 49
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Rolling back: 2064_12_25_0000_generate_installed_log
Rolled back:  2064_12_25_0000_generate_installed_log (0.01 seconds)
Rolling back: 2020_05_26_135052_bump_version040006
Rolled back:  2020_05_26_135052_bump_version040006 (0.01 seconds)
Rolling back: 2020_05_19_174233_config_prefer_available_xmp_metadata
Rolled back:  2020_05_19_174233_config_prefer_available_xmp_metadata (0.01 seconds)
Rolling back: 2020_05_12_161427_bump_version040005
Rolled back:  2020_05_12_161427_bump_version040005 (0.01 seconds)
Rolling back: 2020_05_12_114228_rss
Rolled back:  2020_05_12_114228_rss (0.02 seconds)
Rolling back: 2020_04_29_000250_bump_version040003
Rolled back:  2020_04_29_000250_bump_version040003 (0.01 seconds)
Rolling back: 2020_04_22_155712_bump_version040002
Rolled back:  2020_04_22_155712_bump_version040002 (0.01 seconds)
Rolling back: 2020_04_19_122905_bump_version
Rolled back:  2020_04_19_122905_bump_version (0.01 seconds)
Rolling back: 2020_03_17_200000_unhide_configs
Rolled back:  2020_03_17_200000_unhide_configs (0.01 seconds)
Rolling back: 2020_03_11_124417_increase_length_photo_type
Rolled back:  2020_03_11_124417_increase_length_photo_type (0.01 seconds)
Rolling back: 2020_02_14_0600_location_decoding
Rolled back:  2020_02_14_0600_location_decoding (0.18 seconds)
Rolling back: 2020_01_28_133201_composer_update
Rolled back:  2020_01_28_133201_composer_update (0.01 seconds)
Rolling back: 2020_01_26_1200_config_public_sorting
Rolled back:  2020_01_26_1200_config_public_sorting (0.01 seconds)
Rolling back: 2020_01_04_1200_config_has_ffmpeg
Rolled back:  2020_01_04_1200_config_has_ffmpeg (0.01 seconds)
Rolling back: 2020_01_018_2300_config_import_via_symlink
Rolled back:  2020_01_018_2300_config_import_via_symlink (0.01 seconds)
Rolling back: 2019_12_25_0600_config_exiftool_ternary
Rolled back:  2019_12_25_0600_config_exiftool_ternary (0.01 seconds)
Rolling back: 2019_12_15_1000_config_check_update_every_cat_fix
Rolled back:  2019_12_15_1000_config_check_update_every_cat_fix (0.01 seconds)
Rolling back: 2019_12_15_0700_add_share_button_visible_option
Rolled back:  2019_12_15_0700_add_share_button_visible_option (0.19 seconds)
Rolling back: 2019_12_02_2100_config_exiftool
Rolled back:  2019_12_02_2100_config_exiftool (0 seconds)
Rolling back: 2019_10_11_093442_config_check_update_every
Rolled back:  2019_10_11_093442_config_check_update_every (0.01 seconds)
Rolling back: 2019_10_09_233402_config_map_mod
Rolled back:  2019_10_09_233402_config_map_mod (0.01 seconds)
Rolling back: 2019_10_07_0900_config_map_include_sub_albums
Rolled back:  2019_10_07_0900_config_map_include_sub_albums (0.01 seconds)
Rolling back: 2019_10_06_152017_add_force_32bit_ids
Rolled back:  2019_10_06_152017_add_force_32bit_ids (0.01 seconds)
Rolling back: 2019_10_06_1400_config_map_providers
Rolled back:  2019_10_06_1400_config_map_providers (0.01 seconds)
Rolling back: 2019_10_03_214750_frame_refresh_in_sec
Rolled back:  2019_10_03_214750_frame_refresh_in_sec (0.01 seconds)
Rolling back: 2019_10_02_1400_config_map_display_public
Rolled back:  2019_10_02_1400_config_map_display_public (0.01 seconds)
Rolling back: 2019_10_01_add_livephoto_cols
Rolled back:  2019_10_01_add_livephoto_cols (0.35 seconds)
Rolling back: 2019_09_28_190822_photos_fix
Rolled back:  2019_09_28_190822_photos_fix (0.01 seconds)
Rolling back: 2019_09_28_171753_config_fix
Rolled back:  2019_09_28_171753_config_fix (0.01 seconds)
Rolling back: 2019_06_21_180451_create_sym_links_table
Rolled back:  2019_06_21_180451_create_sym_links_table (0.04 seconds)
Rolling back: 2019_02_21_114408_create_page_contents_table
Rolled back:  2019_02_21_114408_create_page_contents_table (1.2 seconds)
Rolling back: 2019_02_21_114356_create_pages_table
Rolled back:  2019_02_21_114356_create_pages_table (0.32 seconds)
Rolling back: 2018_10_30_135411_sharing
Rolled back:  2018_10_30_135411_sharing (0.02 seconds)
Rolling back: 2018_08_15_103716_move_photos
Rolled back:  2018_08_15_103716_move_photos (0.07 seconds)
Rolling back: 2018_08_15_102039_move_albums
Rolled back:  2018_08_15_102039_move_albums (0.06 seconds)
Rolling back: 2018_08_10_134924_move_settings
Rolled back:  2018_08_10_134924_move_settings (0.01 seconds)
Rolling back: 2018_08_03_111324_create_logs_table
Rolled back:  2018_08_03_111324_create_logs_table (0.24 seconds)
Rolling back: 2018_08_03_110942_create_configs_table
Rolled back:  2018_08_03_110942_create_configs_table (0.03 seconds)
Rolling back: 2018_08_03_110936_create_photos_table
Rolled back:  2018_08_03_110936_create_photos_table (0.03 seconds)
Rolling back: 2018_08_03_110935_create_albums_table
Rolled back:  2018_08_03_110935_create_albums_table (0.03 seconds)
Rolling back: 2014_10_12_000000_create_users_table
Rolled back:  2014_10_12_000000_create_users_table (0.03 seconds)
Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table (0.06 seconds)
Migrating: 2018_08_03_110935_create_albums_table
Migrated:  2018_08_03_110935_create_albums_table (0.19 seconds)
Migrating: 2018_08_03_110936_create_photos_table
Migrated:  2018_08_03_110936_create_photos_table (0.21 seconds)
Migrating: 2018_08_03_110942_create_configs_table
Migrated:  2018_08_03_110942_create_configs_table (0.04 seconds)
Migrating: 2018_08_03_111324_create_logs_table
Migrated:  2018_08_03_111324_create_logs_table (0.03 seconds)
Migrating: 2018_08_10_134924_move_settings
Migrated:  2018_08_10_134924_move_settings (0.18 seconds)
Migrating: 2018_08_15_102039_move_albums
Migrated:  2018_08_15_102039_move_albums (0.04 seconds)
Migrating: 2018_08_15_103716_move_photos

In Connection.php line 671:
                                                                                                                       
  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fa  
  ils (`lychee`.`photos`, CONSTRAINT `photos_album_id_foreign` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`) ON  
   DELETE CASCADE) (SQL: insert into `photos` (`id`, `album_id`, `title`, `description`, `url`, `tags`, `public`, `ty  
  pe`, `width`, `height`, `size`, `iso`, `aperture`, `make`, `lens`, `model`, `shutter`, `focal`, `takestamp`, `star`  
  , `thumbUrl`, `thumb2x`, `checksum`, `medium`, `license`, `updated_at`, `created_at`) values (1567712816, 156771273  
  8, IMG_20190818_110515, , 6e5d745462a72f04b04231632b3c2b20.jpg, , 0, image/jpeg, 3264, 2448, 1.7 MB, 100, f/2.0, QC  
  OM-AA, , QCAM-AA, 1/903 s, 4.7 mm, 2019-08-18 13:05:16, 0, 6e5d745462a72f04b04231632b3c2b20.jpeg, 1, 01099bc3b476d2  
  db3d52724552044fd77bc9c01f, 1440x1080, none, 2020-08-27 18:31:48, 2020-08-27 18:31:48))                              
                                                                                                                       

In PDOStatement.php line 129:
                                                                                                                       
  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fa  
  ils (`lychee`.`photos`, CONSTRAINT `photos_album_id_foreign` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`) ON  
   DELETE CASCADE)                                                                                                     
                                                                                                                       

In PDOStatement.php line 127:
                                                                                                                       
  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fa  
  ils (`lychee`.`photos`, CONSTRAINT `photos_album_id_foreign` FOREIGN KEY (`album_id`) REFERENCES `albums` (`id`) ON  
   DELETE CASCADE)   

And accessing the site now gives me a 500 error.

@kamil4 kamil4 added the duplicate This issue or pull request already exists label Aug 27, 2020
@kamil4
Copy link
Contributor

kamil4 commented Aug 27, 2020

Sorry, I just realized that this is a known issue; see #621. And it was fixed back in June by @d7415 (0dd1af1). The fix is not yet available in any public release but if you can clone our git repo and try again, you should be good to go (you will need to run the migration refresh again as well).

@CountCypher
Copy link
Author

Ah, I see. Great that there is a fix already. :)
I'm not so familiar with git (yet) as I'm not a developer: Do I assume correctly that I have to execute git clone https://github.com/LycheeOrg/Lychee.git? Do I execute this while in /var/www? Shall I backup or delete my existing Lychee folder before? Sorry for the stupid questions, but I think I need some guidance here. Thanks in advance. :)

@kamil4
Copy link
Contributor

kamil4 commented Aug 27, 2020

See https://lycheeorg.github.io/docs/installation.html#installing-lychee and https://lycheeorg.github.io/docs/update.html#update-using-git. Your command is correct and running it somewhere in /var/www should be fine. I would just move the existing Lychee folder out of the way and delete it once things work; you will want the .env from it. And don't forget the php artisan migrate:refresh in the new directory instead of the simple php artisan migrate.

@kamil4
Copy link
Contributor

kamil4 commented Aug 28, 2020

Can you confirm that the current git version fixes it for you and if so, close this issue? Thanks!

@CountCypher
Copy link
Author

I haven't come to testing that yet unfortunately. I will do so on the weekend and report back here.

@kamil4
Copy link
Contributor

kamil4 commented Aug 28, 2020

You may also be able to simply replace the database/migrations/2018_08_15_103716_move_photos.php file in your current install with the contents of https://raw.githubusercontent.com/LycheeOrg/Lychee/d34659746e1a5c27dc59e8c88a06dcd92593bedb/database/migrations/2018_08_15_103716_move_photos.php and do php artisan migrate:refresh.

@CountCypher
Copy link
Author

That simple replacement did the trick, thanks a lot! :D Issue can be closed.

@kamil4 kamil4 closed this as completed Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants