• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting MigrateUserDatabase always fails

     
    • 0 Vote(s) - 0 Average

    MigrateUserDatabase always fails

    prahal
    Offline

    Junior Member

    Posts: 19
    Threads: 6
    Joined: 2024 May
    Reputation: 1
    Country:France
    #3
    2024-10-29, 12:25 AM
    I followed a piece of advice on this forum to delete migrations.xml (thus redo all the migration).

    I lost the ability to login.
    I restore the jellyfin db from backup and I got back the ability to login.
    Then I lost this ability again (probably ran the migration again).
    So I checked my jellyfin.db and the backup and the Users table was empty. I don't know how I got the ability to login back after restoring as there was no Users table entries even then. I did not investigate (maybe the migration removed a flag that was making jellyfin read the old users.db database file, that would require more work.

    So I believe that somehow the UserDb migration had not run succeessfullyon my jellyfin install and that running it partially broke the ability to authenticate.


    Either way I found that it was enough to add back:

    + /// <summary>
    + /// Initializes a new instance of the <see cref="AccessSchedule"/> class.
    + /// Default constructor. Protected due to required properties, but present because EF needs it.
    + /// </summary>
    + protected AccessSchedule()
    + {
    + }

    in Jellyfin.Data/Entities/AccessSchedule.cs b/Jellyfin.Data/Entities/AccessSchedule.cs

    this code was removed with a lot of other parameterless constructors in commit 287dab465.
    I believe that if the Jellyfin.Server/Migrations/Routines/MigrateUserDb.cs code is kept then it should be able to run which is not the case without this AccessSchedule parameterless constructor.

    Do you mean I should not submit a PR and have this routine working again? (it cannot run currently) Because it is not supposed to run on installs that are up to date?
    Shouldn't this MigrateUserDb.cs code be removed if it is not supposed to run and fixing its breakage is not seen as of use?
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    MigrateUserDatabase always fails - by prahal - 2024-10-13, 08:26 AM
    RE: MigrateUserDatabase always fails - by TheDreadPirate - 2024-10-13, 04:20 PM
    RE: MigrateUserDatabase always fails - by prahal - 2024-10-29, 12:25 AM
    RE: MigrateUserDatabase always fails - by prahal - 2024-12-05, 09:10 PM
    RE: MigrateUserDatabase always fails - by TheDreadPirate - 2024-10-29, 12:56 AM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode