Demo nâng cấp Snipe-IT 6.3.4 → 8.8.0

Diễn tập nâng cấp trên bản sao (kết quả thật)

Lấy CSDL của hệ thống 6.3.4 đang chạy, nạp vào một schema riêng trên máy chủ 8.8.0 rồi chạy php artisan migrate --force. Dữ liệu mẫu nhỏ (40 tài sản, 19 người dùng) nên chỉ kiểm tra được tính tương thích của các bước cập nhật; thời gian và dữ liệu thật của đơn vị sẽ đo ở buổi vận hành thử. Thực hiện lúc 11/10/2026 14:17.

117/117
bước cập nhật hoàn thành
0m3.226s
thời gian chạy migrate (thực đo)
0
dòng báo lỗi
50 → 61
bảng

Các bước đã làm

BướcLệnh / kết quả
1. Sao CSDL bản 6.3.4mysqldump --single-transaction, 193,481 byte, nạp vào schema snipeit_upgrade_demo trong 0.8 giây
2. Trạng thái trước371 bước đã chạy, 50 bảng, 117 bước chờ (migrate:status)
3. Chạy cập nhậtphp artisan migrate --force trên máy chủ 8.8.0 (Laravel 12.68.0, PHP 8.3.6): 117 bước DONE, thời gian 0m3.226s, mã thoát 0
4. Trạng thái sau488 bước (lô 1: 371, lô 2: 117), 61 bảng
5. Đối soát số dòngMọi bảng giữ nguyên số dòng, riêng bảng migrations tăng thêm 117 dòng (xem bảng dưới)
6. Mở hệ thống trên bản saoSnipe-IT 8.8.0 chạy trên bản sao đã nâng cấp

Nhật ký chạy cập nhật

Bấm để thu gọn hoặc mở rộng (125 dòng)
   INFO  Running migrations.  

  2018_08_08_100000_create_telescope_entries_table .............. 77.67ms DONE
  2022_02_10_110210_add_company_id_to_locations ................. 18.26ms DONE
  2023_02_27_092130_add_scope_locations_setting ................. 13.37ms DONE
  2023_08_23_232739_create_report_templates_table ................ 9.67ms DONE
  2024_03_18_164714_add_note_to_checkout_acceptance_table ....... 11.57ms DONE
  2024_05_27_143554_add_parent_id_index_to_locations ............. 9.69ms DONE
  2024_06_24_130348_add_profile_edit_to_settings ................ 14.18ms DONE
  2024_07_04_103729_add_default_avatar_to_settings .............. 12.13ms DONE
  2024_07_16_184145_add_deprecitation_type_to_depreciations_table  6.50ms DONE
  2024_07_23_172032_change_no__n_o_to_nb__n_o .................... 5.18ms DONE
  2024_07_26_143301_add_checkout_for_all_types_to_accessories ... 10.16ms DONE
  2024_08_01_201721_add_required_notes_setting .................. 10.77ms DONE
  2024_08_06_175114_add_shortcuts_enabled_to_settings_table ..... 13.04ms DONE
  2024_08_07_204014_add_play_sounds_to_profile ................... 7.26ms DONE
  2024_08_15_111816_add_confetti_to_users ....................... 12.50ms DONE
  2024_08_16_104137_add_due_checkin_days_to_settings ............ 13.80ms DONE
  2024_09_17_204302_change_user_id_to_created_by ............... 268.83ms DONE
  2024_10_23_162301_add_manufacturer_id_model_number_to_consumables  9.72ms DONE
  2024_10_31_212512_update_new_and_drop_old_barcode_settings .... 24.23ms DONE
  2024_11_06_211457_add_manager_indexes_to_location_and_user .... 61.88ms DONE
  2024_11_07_113631_improve_manager_indexes_on_users_and_locations  75.01ms DONE
  2025_01_06_210534_change_report_templates_options_to_column_text_field  4.39ms DONE
  2025_01_07_172419_fix_label_types_on_settings_table ........... 23.62ms DONE
  2025_01_15_190348_adds_unavailable_to_license_seats_tables ..... 5.59ms DONE
  2025_02_10_230155_add_notes_to_locations_companies_categories_manufacturers_groups  32.28ms DONE
  2025_02_22_144518_add_checkin_checkout_to_customfields ........ 10.66ms DONE
  2025_02_26_153413_add_ldap_invert_active_flag_to_setting_table  13.35ms DONE
  2025_03_04_231256_purge_action_logs_of_report_template_activity  1.09ms DONE
  2025_03_06_152922_copy_created_at_to_action_date_in_action_logs  17.97ms DONE
  2025_03_12_184851_purge_action_logs_table_of_consumable_checkin_entries  0.40ms DONE
  2025_04_02_113438_add_acceptance_pdf_logo_to_settings ......... 11.85ms DONE
  2025_04_07_145418_add_custom_fields_to_audit ................... 6.97ms DONE
  2025_04_22_170731_add_empty_row_count_to_settings_table ....... 11.22ms DONE
  2025_05_12_183803_add_req_serial_bool_to_models_table .......... 4.69ms DONE
  2025_05_20_190317_repopulate_webhook_selected_setting .......... 2.92ms DONE
  2025_06_02_233556_add_admin_cc_always_to_settings_table ....... 11.43ms DONE
  2025_06_03_000000_add_manager_view_enabled_to_settings_table .. 12.97ms DONE
  2025_06_03_053438_fix_assigned_type_without_assigned_to ........ 0.46ms DONE
  2025_06_04_101736_add_deleted_at_index_to_action_logs ......... 10.76ms DONE
  2025_06_05_200518_add_alert_on_response_id_to_checkout_acceptances_table  13.12ms DONE
  2025_06_05_204139_add_alert_on_response_to_categories_table .... 3.41ms DONE
  2025_06_06_155058_make_supplier_id_nullable ................... 15.01ms DONE
  2025_07_16_142036_clean_checkout_acceptances ................... 0.02ms DONE
  2025_08_06_192954_add_image_to_maintenances .................... 4.70ms DONE
  2025_08_10_111553_rename_title_to_name_on_asset_maintenances ... 3.99ms DONE
  2025_08_10_113444_rename_asset_maintenances_to_maintenances .... 3.80ms DONE
  2025_08_10_114135_change_asset_maintenance_in_logs_to_maintenance  1.47ms DONE
  2025_08_11_181519_add_mobile_number_to_users_table ............ 13.93ms DONE
  2025_08_12_225214_add_qty_to_checkout_acceptances_table ....... 14.83ms DONE
  2025_08_19_114742_add_display_name_to_users .................... 7.40ms DONE
  2025_08_19_122533_add_category_indexes ........................ 75.78ms DONE
  2025_08_19_174823_add_display_name_to_ldap_settings ........... 91.10ms DONE
  2025_08_20_190617_add_created_at_index_to_models .............. 11.73ms DONE
  2025_09_16_104604_create_users_deleted_at_location_id_index ... 15.48ms DONE
  2025_09_25_124321_add_external_id_to_groups ................... 11.34ms DONE
  2025_10_07_113331_add_url_to_maintenances ...................... 5.51ms DONE
  2025_10_13_102956_move_assetmodels_files ....................... 5.87ms DONE
  2025_10_22_144927_migrate_incorrect_action_types ............... 0.52ms DONE
  2025_11_04_173713_add_2d_label_prefix ......................... 14.76ms DONE
  2025_11_10_205136_change_suppliers_notes_to_text .............. 15.79ms DONE
  2025_11_10_211219_change_suppliers_notes_to_nullable .......... 21.34ms DONE
  2025_11_13_160816_add_day_of_week_setting ..................... 12.99ms DONE
  2025_11_14_150613_add_color_to_companies ...................... 27.76ms DONE
  2025_11_18_193933_add_share_report_template_option ............ 10.28ms DONE
  2025_11_28_175733_add_link_colors_to_settings ................. 62.49ms DONE
  2025_12_10_211855_add_quantity_to_action_logs_table ............ 6.96ms DONE
  2026_03_26_150316_add_deleted_at_to_companies .................. 5.94ms DONE
  2026_03_27_000000_clean_checkout_acceptances ................... 8.79ms DONE
  2026_04_07_141412_add_locations_parent_id_index ............... 12.16ms DONE
  2026_04_07_141930_accessories_checkout_assigned_to_index ....... 7.75ms DONE
  2026_04_20_200000_backfill_action_logs_company_id_from_item .... 0.41ms DONE
  2026_04_28_001156_add_type_column_to_report_templates_table ... 10.14ms DONE
  2026_05_05_125206_add_unique_index_to_nonces ................... 8.66ms DONE
  2026_05_18_094309_add_maintenance_types_and_tracking_fields ... 44.70ms DONE
  2026_05_19_000001_create_company_user_table ................... 36.34ms DONE
  2026_06_10_000001_add_null_company_is_floater_to_settings ..... 11.35ms DONE
  2026_06_22_000001_add_parent_id_to_companies_table ............ 13.91ms DONE
  2026_06_23_000001_add_blocked_api_user_agents_to_settings ..... 41.99ms DONE
  2026_06_30_000001_drop_company_name_unique_index ............... 4.10ms DONE
  2026_07_01_000001_clear_unsafe_webhook_endpoints ............... 0.35ms DONE
  2026_07_10_000001_rename_users_company_id_to_legacy_company_id . 8.19ms DONE
  2026_07_17_000001_change_maintenance_dates_to_datetime ........ 26.76ms DONE
  2026_07_17_000002_change_expected_checkin_to_datetime ......... 70.06ms DONE
  2026_07_17_000003_widen_custom_fields_format_column ........... 16.11ms DONE
  2026_07_21_000001_rename_completion_date_to_expected_completion_date  5.58ms DONE
  2026_07_21_000002_change_maintenance_completed_at_to_datetime . 13.99ms DONE
  2026_07_22_235215_restore_default_label_sizes_if_zeroed_in_settings_table  0.55ms DONE
  2026_07_29_220000_make_departments_created_by_nullable ........ 15.28ms DONE
  2026_07_30_000001_add_next_audit_date_index_to_assets ......... 12.05ms DONE
  2026_08_03_141000_create_orders_and_order_items_tables ........ 71.28ms DONE
  2026_08_03_142000_backfill_orders_from_inventory_tables ....... 78.17ms DONE
  2026_08_03_143000_rename_order_number_to_legacy_on_inventory_tables  16.45ms DONE
  2026_08_03_143500_snapshot_qty_to_legacy_qty_on_inventory_tables  19.55ms DONE
  2026_08_03_144000_reconcile_inventory_qty_from_action_logs ..... 5.28ms DONE
  2026_08_03_145000_add_composite_and_deleted_at_indexes_to_orders_tables  27.29ms DONE
  2026_08_03_147000_rename_transaction_fields_to_legacy_on_inventory_tables  74.61ms DONE
  2026_08_03_148000_repair_inventory_qty_below_in_use ............ 8.39ms DONE
  2026_08_12_000000_add_processing_lock_columns_to_imports_table  31.59ms DONE
  2026_08_13_000000_restore_clobbered_inventory_qty_from_legacy_snapshot  1.40ms DONE
  2026_08_13_140000_add_tag_color_to_maintenance_types_table ..... 4.37ms DONE
  2026_08_13_150000_add_item_type_and_rename_asset_id_on_maintenances_table  22.71ms DONE
  2026_08_13_160000_create_calendar_events_table ................ 15.47ms DONE
  2026_08_13_160100_backfill_calendar_events_from_existing_sources  348.51ms DONE
  2026_08_13_170000_backfill_calendar_events_for_new_sources .... 81.23ms DONE
  2026_08_14_170000_add_dashboard_widget_date_indexes ........... 60.71ms DONE
  2026_08_20_000000_add_requestable_to_components_table .......... 9.14ms DONE
  2026_08_20_010000_add_reservation_dates_to_checkout_requests .. 25.08ms DONE
  2026_08_20_020000_add_requestable_to_licenses_table ............ 5.86ms DONE
  2026_08_20_030000_add_notes_to_checkout_requests .............. 11.19ms DONE
  2026_08_21_010000_add_state_machine_to_checkout_requests ...... 50.88ms DONE
  2026_08_21_030000_add_fulfilled_quantity_to_checkout_requests . 14.95ms DONE
  2026_08_24_010000_backfill_created_by_on_request_action_logs ... 0.45ms DONE
  2026_08_24_234955_clean_stale_pending_acceptances .............. 1.11ms DONE
  2026_09_16_183827_create_sync_adapter_tables .................. 85.32ms DONE
  2026_09_21_140000_backfill_accessory_checkout_action_log_quantity  1.32ms DONE
  2026_09_21_174908_add_action_type_created_at_composite_index_to_action_logs  12.89ms DONE
  2026_09_22_201800_add_deleted_at_created_at_composite_index_to_assets  11.62ms DONE


real	0m3.226s
user	0m0.413s
sys	0m0.111s

Mở tệp nhật ký gốc

Đối soát số dòng: bản 6.3.4 và bản sao đã nâng cấp

BảngBản 6.3.4Bản sao sau nâng cấpKết luậnMở
accessories88khớpdữ liệu bản sao
accessories_users → accessories_checkout33khớpdữ liệu bản sao
action_logs127127khớpdữ liệu bản sao
asset_external_sources—0bảng mới, chưa có dữ liệudữ liệu bản sao
asset_logs00khớpdữ liệu bản sao
asset_maintenances → maintenances66khớpdữ liệu bản sao
asset_uploads00khớpdữ liệu bản sao
assets4040khớpdữ liệu bản sao
calendar_events—152bảng mới, tự điền 152 dòngdữ liệu bản sao
categories99khớpdữ liệu bản sao
checkout_acceptances00khớpdữ liệu bản sao
checkout_requests00khớpdữ liệu bản sao
companies11khớpdữ liệu bản sao
company_user—18bảng mới, tự điền 18 dòngdữ liệu bản sao
components88khớpdữ liệu bản sao
components_assets33khớpdữ liệu bản sao
consumables88khớpdữ liệu bản sao
consumables_users33khớpdữ liệu bản sao
custom_field_custom_fieldset11khớpdữ liệu bản sao
custom_fields11khớpdữ liệu bản sao
custom_fieldsets11khớpdữ liệu bản sao
departments44khớpdữ liệu bản sao
depreciations11khớpdữ liệu bản sao
imports00khớpdữ liệu bản sao
kits00khớpdữ liệu bản sao
kits_accessories00khớpdữ liệu bản sao
kits_consumables00khớpdữ liệu bản sao
kits_licenses00khớpdữ liệu bản sao
kits_models00khớpdữ liệu bản sao
license_seats155155khớpdữ liệu bản sao
licenses88khớpdữ liệu bản sao
locations33khớpdữ liệu bản sao
login_attempts461254nhật ký đăng nhập, thay đổi liên tụcdữ liệu bản sao
maintenance_types—8bảng mới, tự điền 8 dòngdữ liệu bản sao
manufacturers88khớpdữ liệu bản sao
migrations371488+117 dòngdữ liệu bản sao
models66khớpdữ liệu bản sao
models_custom_fields00khớpdữ liệu bản sao
oauth_access_tokens00khớpdữ liệu bản sao
oauth_auth_codes00khớpdữ liệu bản sao
oauth_clients22khớpdữ liệu bản sao
oauth_personal_access_clients11khớpdữ liệu bản sao
oauth_refresh_tokens00khớpdữ liệu bản sao
order_items—64bảng mới, tự điền 64 dòngdữ liệu bản sao
orders—28bảng mới, tự điền 28 dòngdữ liệu bản sao
password_resets00khớpdữ liệu bản sao
permission_groups00khớpdữ liệu bản sao
report_templates—0bảng mới, chưa có dữ liệudữ liệu bản sao
requested_assets00khớpdữ liệu bản sao
requests00khớpdữ liệu bản sao
saml_nonces00khớpdữ liệu bản sao
settings11khớpdữ liệu bản sao
status_labels77khớpdữ liệu bản sao
suppliers11khớpdữ liệu bản sao
sync_adapter_instances—0bảng mới, chưa có dữ liệudữ liệu bản sao
telescope_entries—0bảng mới, chưa có dữ liệudữ liệu bản sao
telescope_entries_tags—0bảng mới, chưa có dữ liệudữ liệu bản sao
telescope_monitoring—0bảng mới, chưa có dữ liệudữ liệu bản sao
throttle00khớpdữ liệu bản sao
users1919khớpdữ liệu bản sao
users_groups00khớpdữ liệu bản sao
48/48 bảng dữ liệu của bản 6.3.4 giữ nguyên số dòng sau nâng cấp (không tính bảng migrations, tăng thêm 117 dòng, và bảng nhật ký đăng nhập login_attempts, thay đổi liên tục khi hệ thống đang chạy).

Phát hiện: hồ sơ bảo trì đã hoàn thành ở bản 6.3.4

Cần xử lý khi nâng cấp. Bước cập nhật 2026_07_21_000001_rename_completion_date_to_expected_completion_date đổi tên cột completion_date thành expected_completion_date (ngày dự kiến hoàn thành). Cột completed_at (ngày hoàn thành thực tế) là cột mới, để trống với dữ liệu cũ. Vì vậy hồ sơ đã hoàn thành ở bản 6.3.4 hiển thị chưa hoàn thành trên màn hình bản 8.8.0 cho đến khi được đánh dấu hoàn thành.

Trước (bản 6.3.4): bảng asset_maintenances

idTênLoạistart_datecompletion_date
1HPC Demo — Thay pin laptopRepair2026-10-012026-10-03
2HPC Demo — Nâng cấp SSDMaintenance2026-10-012026-10-03
3HPC Demo — Vệ sinh máy tínhMaintenance2026-10-012026-10-03
4HPC Demo — Kiểm tra màn hìnhMaintenance2026-10-01NULL
5HPC Demo — Cập nhật phần mềmMaintenance2026-10-01NULL
6HPC Demo — Bảo trì định kỳMaintenance2026-10-01NULL

Sau (bản sao đã nâng cấp): bảng maintenances

idTênLoạimaintenance_type_idstart_dateexpected_completion_datecompleted_at
1HPC Demo — Thay pin laptopRepair22026-10-01 00:00:002026-10-03 00:00:00NULL
2HPC Demo — Nâng cấp SSDMaintenance12026-10-01 00:00:002026-10-03 00:00:00NULL
3HPC Demo — Vệ sinh máy tínhMaintenance12026-10-01 00:00:002026-10-03 00:00:00NULL
4HPC Demo — Kiểm tra màn hìnhMaintenance12026-10-01 00:00:00NULLNULL
5HPC Demo — Cập nhật phần mềmMaintenance12026-10-01 00:00:00NULLNULL
6HPC Demo — Bảo trì định kỳMaintenance12026-10-01 00:00:00NULLNULL

Bản 6.3.4: bảng asset_maintenances Bản sao: bảng maintenances Truy vấn hồ sơ có ngày hoàn thành cũ nhưng completed_at trống Màn hình bảo trì trên bản sao

Đề xuất xử lý (chưa thực hiện): đơn vị quản lý tài sản xác nhận danh sách hồ sơ đã hoàn thành rồi cập nhật completed_at theo ngày hoàn thành cũ, hoặc đánh dấu hoàn thành trên màn hình.

Trước và sau trên một tài sản (HPC-DEMO-0001)

idasset_tagNgười tạoexpected_checkin
Bản 6.3.4 (cột user_id)1HPC-DEMO-00011NULL
Bản sao (cột created_by)1HPC-DEMO-00011NULL

Tài sản trên bản 6.3.4 Tài sản trên bản đã nâng cấp

Các phép kiểm tra dữ liệu

Phép kiểm traKết quả trên bản saoMở
Tài sản giao cho người dùng không tồn tại0chạy truy vấn
Đối soát số dòng tài sản, người dùng, lịch sử40 / 19 / 127 (bản 6.3.4: 40 / 19 / 127)chạy truy vấn bản sao