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

[BUG] Ryot is failing to start due to: migration 'm20241126_changes_for_issue_1113' #1145

Open
edersong opened this issue Dec 20, 2024 · 5 comments

Comments

@edersong
Copy link

Ryot app stopped to work reporting the following error:

[backend] 2024-12-20T09:21:07.733634Z  INFO ryot: Running version: v7.12.0
[backend] 2024-12-20T09:21:07.797237Z  INFO sea_orm_migration::migrator: Applying all pending migrations
[backend] 2024-12-20T09:21:07.801679Z  INFO sea_orm_migration::migrator: Applying migration 'm20241129_changes_for_issue_1114'
[backend] 2024-12-20T09:21:07.826302Z  INFO sea_orm_migration::migrator: Migration 'm20241129_changes_for_issue_1114' has been applied
[backend] 2024-12-20T09:21:07.828656Z  INFO sea_orm_migration::migrator: Applying migration 'm20241126_changes_for_issue_1113'
[proxy] {"level":"info","ts":1734686467.8342245,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
[proxy] {"level":"warn","ts":1734686467.8401768,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":30}
[proxy] {"level":"warn","ts":1734686467.8405075,"logger":"admin","msg":"admin endpoint disabled"}
[proxy] {"level":"warn","ts":1734686467.8406298,"logger":"http.auto_https","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
[proxy] {"level":"info","ts":1734686467.8411748,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
[proxy] {"level":"info","ts":1734686467.8422494,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00009fb00"}
[proxy] {"level":"info","ts":1734686467.8424468,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/home/ryot/.local/share/caddy"
[proxy] {"level":"info","ts":1734686467.8424802,"logger":"tls","msg":"finished cleaning storage units"}
[proxy] {"level":"info","ts":1734686467.8440294,"msg":"autosaved config (load with --resume flag)","file":"/home/ryot/.config/caddy/autosave.json"}
[proxy] {"level":"info","ts":1734686467.8440454,"msg":"serving initial configuration"}
[backend] 2024-12-20T09:21:08.495015Z ERROR ryot: Database migration failed: Execution Error: error returned from database: null value in column "summary" of relation "workout" violates not-null constraint
[backend] Error: There was an error running the database migrations.
[backend] BACKEND_PORT=5000 /usr/local/bin/backend exited with code 1
--> Sending SIGTERM to other processes..
[proxy] {"level":"info","ts":1734686468.5204465,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
[proxy] {"level":"warn","ts":1734686468.5204659,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
[proxy] {"level":"info","ts":1734686468.5205054,"logger":"http","msg":"servers shutting down with eternal grace period"}
[proxy] {"level":"info","ts":1734686468.5206344,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
[proxy] caddy run --config /etc/caddy/Caddyfile exited with code SIGTERM
--> Sending SIGTERM to other processes..
[frontend] PORT=3000 npx remix-serve ./build/server/index.js exited with code SIGTERM
@IgnisDa
Copy link
Owner

IgnisDa commented Dec 20, 2024

Please send me a db dump. You must have an edge case which I didn't account for in the migrations.

@mwckr
Copy link

mwckr commented Dec 20, 2024

Hello,

same issue here. Logs:

[backend] 2024-12-20T13:46:22.816730Z  INFO ryot: Running version: v7.12.4
[backend] 2024-12-20T13:46:22.837811Z  INFO sea_orm_migration::migrator: Applying all pending migrations
[backend] 2024-12-20T13:46:22.839654Z ERROR ryot: Database migration failed: Custom Error: Migration file of version 'm20230804_create_user_measurement' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240416_change_json_to_generic_json' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240425_add_created_by_user_id_column_to_execise' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20230622_create_exercise' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240415_is_v5_migration' is missing, this migration has been applied but its file is missing
[backend] Error: There was an error running the database migrations.
[proxy] {"level":"info","ts":1734702382.8406403,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
[proxy] {"level":"warn","ts":1734702382.8416348,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":30}
[proxy] {"level":"warn","ts":1734702382.8418293,"logger":"admin","msg":"admin endpoint disabled"}
[proxy] {"level":"warn","ts":1734702382.8419316,"logger":"http.auto_https","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
[proxy] {"level":"info","ts":1734702382.8425994,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
[proxy] {"level":"info","ts":1734702382.8427134,"msg":"autosaved config (load with --resume flag)","file":"/home/ryot/.config/caddy/autosave.json"}
[proxy] {"level":"info","ts":1734702382.8427243,"msg":"serving initial configuration"}
[backend] BACKEND_PORT=5000 /usr/local/bin/backend exited with code 1
--> Sending SIGTERM to other processes..
[proxy] {"level":"info","ts":1734702382.8439393,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00054a500"}
[proxy] {"level":"info","ts":1734702382.8439703,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/home/ryot/.local/share/caddy"}
[proxy] {"level":"info","ts":1734702382.843984,"logger":"tls","msg":"finished cleaning storage units"}
[proxy] {"level":"info","ts":1734702382.8529873,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
[proxy] {"level":"warn","ts":1734702382.853009,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
[proxy] {"level":"info","ts":1734702382.8530471,"logger":"http","msg":"servers shutting down with eternal grace period"}
[proxy] {"level":"info","ts":1734702382.853141,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
[proxy] caddy run --config /etc/caddy/Caddyfile exited with code SIGTERM
--> Sending SIGTERM to other processes..
[frontend] PORT=3000 npx remix-serve ./build/server/index.js exited with code SIGTERM

How would I send you a db-dump?

I actually completely re-did my Ryot instance just a week ago.

@IgnisDa
Copy link
Owner

IgnisDa commented Dec 20, 2024

Looking at your logs, it seems that you have jumped directly from v6 to v7 without following the migration guide. Is that so?

You can perform a db dump using the command described in exporting docs.

@Seruschl
Copy link

I am having the same issue on my unraid server. It was a new installation and not an upgrade so an migration hasn‘t happen


[backend] 2024-12-20T19:33:08.089045Z  INFO ryot: Running version: v7.12.4
[proxy] {"level":"info","ts":1734723188.1015344,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
[proxy] {"level":"warn","ts":1734723188.1032202,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":30}
[proxy] {"level":"warn","ts":1734723188.1040664,"logger":"admin","msg":"admin endpoint disabled"}
[proxy] {"level":"warn","ts":1734723188.1048,"logger":"http.auto_https","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
[proxy] {"level":"info","ts":1734723188.1048563,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000621300"}
[proxy] {"level":"info","ts":1734723188.1057234,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/home/ryot/.local/share/caddy"}
[proxy] {"level":"info","ts":1734723188.1057518,"logger":"tls","msg":"finished cleaning storage units"}
[proxy] {"level":"info","ts":1734723188.1058667,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
[proxy] {"level":"info","ts":1734723188.1059692,"msg":"autosaved config (load with --resume flag)","file":"/home/ryot/.config/caddy/autosave.json"}
[proxy] {"level":"info","ts":1734723188.1059754,"msg":"serving initial configuration"}
[backend] 2024-12-20T19:33:08.168776Z  INFO sea_orm_migration::migrator: Applying all pending migrations
[backend] 2024-12-20T19:33:08.172189Z ERROR ryot: Database migration failed: Custom Error: Migration file of version 'm20240202_0_normalize_seen_data' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20230622_create_exercise' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240112_add_metadata_units_consumed_column' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240225_1_change_metadata_reminder_to_media_reminder' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240112_change_num_times_interacted' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240403_add_total_time_spent_column_to_seen' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20231219_change_column_types' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240408_0_add_disable_reviews_to_preferences' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240310_add_source_specifics_field_to_person' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240121_add_updated_at_to_seen' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240202_5_remove_default_value' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240202_6_remove_last_processed_on_for_calendar' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240126_set_comment_to_null_for_measurements' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240326_2_migrate_user_to_metadata_group_entries' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240210_0_remove_duplicated_calendar_events' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240109_remove_persons' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240224_3_add_person_id_column_to_user_to_entity' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240402_2_drop_media_monitored_column_from_user_to_entity' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20231220_store_partial_metadata_in_metadata' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240307_add_column_to_metadata_for_watch_providers' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240227_add_user_to_entity_constraint' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240202_2_normalize_reviews_data' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240401_0_change_seen_progress_type' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240402_1_create_collection_to_entity_entries_for_monitoring_media' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20231003_create_partial_metadata_to_person' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240327_add_new_preferences' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240121_remove_useless_section_from_dashboard' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240401_2_add_watch_providers_preferences' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240410_change_unique_constraints_to_indices' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240229_change_user_notifications_data_storage' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240325_add_correct_attribute_to_user_preferences' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240402_3_change_name_of_reason' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240202_1_normalize_calendar_events_data' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240324_perform_v4_migration' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240309_change_generic_to_media_json' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240224_4_schema_changes' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240220_add_is_demo_column' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240224_1_change_varchar_to_text' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240224_5_migrate_user_to_person_entries' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240408_2_cleanup_user' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240326_0_add_metadata_group_id_column_to_user_to_entity' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20230804_create_user_measurement' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20231226_add_character_column' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240224_2_change_metadata_reason_to_media_reason' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240128_migrate_manga_seen' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240210_1_create_correct_calendar_event_index' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240105_add_repeated_from_column' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240223_add_is_partial_field_to_person' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240408_1_add_oidc_issuer_id_to_user' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240225_0_change_metadata_monitored_to_media_monitored' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240202_4_normalize_metadata_data' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240302_monitor_media_in_progress_or_watchlist' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240224_0_add_created_on_field_to_user_to_entity' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240202_3_add_metadata_reason' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240401_1_add_provider_watched_on_to_seen' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240122_remove_useless_section_from_dashboard' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20231231_change_import_report_types' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240326_3_change_metadata_ownership_to_media_ownership' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240326_1_add_user_to_entity_constraint' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240128_change_calendar_event_data' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240226_add_needs_to_be_updated_field' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240402_0_create_monitored_collection_for_existing_users' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20230901_create_partial_metadata' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240330_add_is_partial_field_to_metadata_group' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20240128_migrate_anime_seen' is missing, this migration has been applied but its file is missing
[backend] Migration file of version 'm20231221_drop_useless_tables' is missing, this migration has been applied but its file is missing
[backend] Error: There was an error running the database migrations.
[backend] BACKEND_PORT=5000 /usr/local/bin/backend exited with code 1
--> Sending SIGTERM to other processes..
[proxy] {"level":"info","ts":1734723188.197684,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
[proxy] {"level":"warn","ts":1734723188.1977036,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
[proxy] {"level":"info","ts":1734723188.1977527,"logger":"http","msg":"servers shutting down with eternal grace period"}
[proxy] {"level":"info","ts":1734723188.1978548,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
[proxy] caddy run --config /etc/caddy/Caddyfile exited with code SIGTERM
--> Sending SIGTERM to other processes..
[frontend] PORT=3000 npx remix-serve ./build/server/index.js exited with code SIGTERM

@IgnisDa
Copy link
Owner

IgnisDa commented Dec 21, 2024

I am having the same issue on my unraid server. It was a new installation and not an upgrade so an migration hasn‘t happen

How can it be a fresh installation and already contain migrations? The error says "this migration has been applied but its file is missing".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants