mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +02:00
The model declares `'zim' | 'map' | 'dataset'` and IngestDrugDataJob writes a
'dataset' row for the openFDA drug labels, but the column was still
enum('zim','map') from the table's original migration. Every write failed:
Data truncated for column 'resource_type' at row 1
insert into `installed_resources` (... `resource_type`, ...) values
(..., 'openfda-drug-labels', 'dataset', ...)
The ingest itself succeeded — 261,671 rows landed in drug_labels — but the
install-state write-back at the end of the job was lost every time. Since
getCategoriesWithStatus() resolves a tier only when every resource id is
accounted for, and it already queries whereIn('resource_type', ['zim',
'dataset']), the missing row kept the Medicine category from ever resolving
its Standard or Comprehensive tier. Only the enum was left behind.
Verified against a live install: after the migration the previously failing
insert succeeds, and Medicine resolves installedTierSlug
'medicine-comprehensive'.
down() drops 'dataset' rows before narrowing the column, since MySQL would
otherwise truncate them to '' or fail under STRICT_TRANS_TABLES.
|
||
|---|---|---|
| .. | ||
| 1751086751801_create_services_table.ts | ||
| 1763499145832_update_services_table.ts | ||
| 1764912210741_create_curated_collections_table.ts | ||
| 1764912270123_create_curated_collection_resources_table.ts | ||
| 1768170944482_update_services_add_installation_statuses_table.ts | ||
| 1768453747522_update_services_add_icon.ts | ||
| 1769097600001_create_benchmark_results_table.ts | ||
| 1769097600002_create_benchmark_settings_table.ts | ||
| 1769300000001_add_powered_by_and_display_order_to_services.ts | ||
| 1769300000002_update_services_friendly_names.ts | ||
| 1769324448000_add_builder_tag_to_benchmark_results.ts | ||
| 1769400000001_create_installed_tiers_table.ts | ||
| 1769400000002_create_kv_store_table.ts | ||
| 1769500000001_create_wikipedia_selection_table.ts | ||
| 1769646771604_create_create_chat_sessions_table.ts | ||
| 1769646798266_create_create_chat_messages_table.ts | ||
| 1769700000001_create_zim_file_metadata_table.ts | ||
| 1770269324176_add_unique_constraint_to_curated_collection_resources_table.ts | ||
| 1770273423670_drop_installed_tiers_table.ts | ||
| 1770849108030_create_create_collection_manifests_table.ts | ||
| 1770849119787_create_create_installed_resources_table.ts | ||
| 1770850092871_create_drop_legacy_curated_tables_table.ts | ||
| 1771000000001_add_update_fields_to_services.ts | ||
| 1771000000002_pin_latest_service_images.ts | ||
| 1771100000001_migrate_kiwix_to_library_mode.ts | ||
| 1771200000001_create_map_markers_table.ts | ||
| 1771200000002_add_visibility_and_icon_fields_to_map_markers.ts | ||
| 1772000000001_add_supply_depot_fields_to_services.ts | ||
| 1772000000002_add_user_modified_to_services.ts | ||
| 1772000000003_add_app_auto_update_fields_to_services.ts | ||
| 1775100000001_create_custom_library_sources_table.ts | ||
| 1776000000001_create_kb_ingest_state_table.ts | ||
| 1776100000001_create_kb_ratio_registry_table.ts | ||
| 1776200000001_add_content_auto_update_fields_to_installed_resources.ts | ||
| 1776200000001_add_custom_url_to_services.ts | ||
| 1776300000001_deprecate_legacy_kolibri.ts | ||
| 1776400000001_add_benchmark_harness_metadata.ts | ||
| 1776400000001_add_collection_to_kb_ingest_state.ts | ||
| 1776400000001_sunset_meshtastic_daemon.ts | ||
| 1776400000002_add_benchmark_score_v2.ts | ||
| 1776400000003_add_benchmark_platform_metadata.ts | ||
| 1778600000004_create_drug_labels_table.ts | ||
| 1778600000006_add_indications_fulltext_index.ts | ||
| 1778700000006_add_ingested_at_default_drug_labels.ts | ||
| 1778800000001_add_dataset_to_installed_resources_type.ts | ||
| 1785468975052_create_add_sources_to_chat_messages_table.ts | ||
| 1785712100000_add_active_to_kb_ingest_state.ts | ||
| 1786000000001_add_is_link_tile_to_services.ts | ||
| 1786000000002_add_link_color_to_services.ts | ||