snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.01k stars 3.17k forks source link

Unable to Move/migrate Snipe-IT to a new server #12004

Closed myriad007 closed 1 year ago

myriad007 commented 2 years ago

Debug mode

Describe the bug

I have followed the guide for moving the app to a new server and so far, I have been unable to get this to work. I have created a new Snipe-IT app successfully and I am able to create a new user from the pre-flight screen but when I erase all database tables and import my old db and copy over the relevant directories as directed by the guide, I get sent back to the preflight screen again! I have also tried restoring a backup.zip from the old server but again, it takes me back to the preflight screen with no import being performed.

Reproduction steps

  1. Install Composer and Snipe-it

  2. Create test user and erase DB

  3. Import old db, .env, folders and oath

  4. Get stuck on preflight!

  5. Install Composer and Snipe-it

  6. Create test user

  7. Try to import old backup

  8. Get stuck on preflight!

Expected behavior

Should be able to import old server contents in what you describe as a "pretty painless process"...

Screenshots

No response

Snipe-IT Version

6.0.12 - build 8824

Operating System

Ubuntu 20.04.5

Web Server

Apache

PHP Version

7.4

Operating System

Windows

Browser

Edge

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

snipe commented 2 years ago

Is the database named the same as the old one (from your existing .env)?

I mean, it is a pretty painless process. It's literally just copying files and databases.

Have you tried using the GUI restore tool (uploading your existing Snipe-IT generated backup)?

Preflight hits when there are: no users found in the users table and/or no rows found in the settings table.

myriad007 commented 2 years ago

I copied the database settings from the old env to the new one. They are the same. I am restoring the db using Webmin. Should I try PHPmyadmin instead? I also tried restoring a backup from the old server but it just dumps me to the preflight after it has 'restored'.

snipe commented 2 years ago

Right, but do they match the name of the new database you created? If it's looking for (for example) snipeit as a database, and you made a new db called snipe-it, you restoring data to a database the app isn't looking at won't help.

myriad007 commented 2 years ago

Both databases have the same name. I just looked at the created database and it has tables and all the old data but the website re-directs to the /setup and I get a 500 error. When I run: sudo -u www-data php artisan migrate it runs successfully but wipes out all the data.

snipe commented 2 years ago

php artisan migrate doesn't wipe data though. This still feels like a DB setting (in your .env) issue. It's like it's not looking in the right database, so it thinks there's no data there.

snipe commented 2 years ago

But php artisan migrate doesn't wipe data, that's what I'm saying. It just looks at your migrations table and makes sure there are no new schema changes that need to be made. It's sort of "data stupid" in that sense. Basically, when a migration runs, a record gets added to the migrations table. When you run migrations again, it will check the rows in that table against the files in database/migrations to make sure it ran everything so the schema is current. There's nothing destructive in running migrations. Something else is clearly happening here.

snipe commented 2 years ago

I'd try running through preflight, set up your user, then go into Admin > Backups and try to restore from there.

myriad007 commented 2 years ago

Did that twice already. Wipes my data and sends me to the pre-flight screen.

snipe commented 2 years ago

Okay, if you are doing a GUI restore, that DOES wipe data. I know what's happening now. php artisan migrate doesn't wipe tables, but GUI restore does, since it's replacing one thing with another. The GUI importer is clearly failing somewhere in there, which is why you're seeing it wipe.

If you use the command line tool to restore, what does it show you as output? https://snipe-it.readme.io/docs/restore-from-backup-file

Snipe-IT Documentation
Restore from Backup File
If you have a previously generated Snipe-IT backup file that you'd like to restore back to (for example, if you did a backup right before a big LDAP sync, and you realized the sync wasn't configured correctly and you need to roll that back), you can use the command-line utility to restore it to a kn...
snipe commented 2 years ago

(Also tail your app logs at the same time to see if anything weird is happening when you restore.)

myriad007 commented 2 years ago

Here is the output from php artisan migrate (sorry it's a long list)

Migration table created successfully. Migrating: 2012_12_06_225921_migration_cartalyst_sentry_install_users Migrated: 2012_12_06_225921_migration_cartalyst_sentry_install_users (900.85ms) Migrating: 2012_12_06_225929_migration_cartalyst_sentry_install_groups Migrated: 2012_12_06_225929_migration_cartalyst_sentry_install_groups (187.62ms) Migrating: 2012_12_06_225945_migration_cartalyst_sentry_install_users_groups_pivot Migrated: 2012_12_06_225945_migration_cartalyst_sentry_install_users_groups_pivot (1,069.77ms) Migrating: 2012_12_06_225988_migration_cartalyst_sentry_install_throttle Migrated: 2012_12_06_225988_migration_cartalyst_sentry_install_throttle (576.47ms) Migrating: 2013_03_23_193214_update_users_table Migrated: 2013_03_23_193214_update_users_table (360.20ms) Migrating: 2013_11_13_075318_create_models_table Migrated: 2013_11_13_075318_create_models_table (162.28ms) Migrating: 2013_11_13_075335_create_categories_table Migrated: 2013_11_13_075335_create_categories_table (197.82ms) Migrating: 2013_11_13_075347_create_manufacturers_table Migrated: 2013_11_13_075347_create_manufacturers_table (213.96ms) Migrating: 2013_11_15_015858_add_user_id_to_categories Migrated: 2013_11_15_015858_add_user_id_to_categories (252.87ms) Migrating: 2013_11_15_112701_add_user_id_to_manufacturers Migrated: 2013_11_15_112701_add_user_id_to_manufacturers (273.57ms) Migrating: 2013_11_15_190327_create_assets_table Migrated: 2013_11_15_190327_create_assets_table (171.89ms) Migrating: 2013_11_15_190357_create_temp_licenses_table Migrated: 2013_11_15_190357_create_temp_licenses_table (0.09ms) Migrating: 2013_11_15_201848_add_license_name_to_licenses Migrated: 2013_11_15_201848_add_license_name_to_licenses (0.06ms) Migrating: 2013_11_16_040323_create_depreciations_table Migrated: 2013_11_16_040323_create_depreciations_table (323.98ms) Migrating: 2013_11_16_042851_add_depreciation_id_to_models Migrated: 2013_11_16_042851_add_depreciation_id_to_models (241.88ms) Migrating: 2013_11_16_084923_add_user_id_to_models Migrated: 2013_11_16_084923_add_user_id_to_models (223.50ms) Migrating: 2013_11_16_103258_create_locations_table Migrated: 2013_11_16_103258_create_locations_table (178.26ms) Migrating: 2013_11_16_103336_add_location_id_to_assets Migrated: 2013_11_16_103336_add_location_id_to_assets (240.08ms) Migrating: 2013_11_16_103407_add_checkedout_to_to_assets Migrated: 2013_11_16_103407_add_checkedout_to_to_assets (241.93ms) Migrating: 2013_11_16_103425_create_history_table Migrated: 2013_11_16_103425_create_history_table (0.07ms) Migrating: 2013_11_17_054359_drop_licenses_table Migrated: 2013_11_17_054359_drop_licenses_table (91.58ms) Migrating: 2013_11_17_054526_add_physical_to_assets Migrated: 2013_11_17_054526_add_physical_to_assets (1,118.12ms) Migrating: 2013_11_17_055126_create_settings_table Migrated: 2013_11_17_055126_create_settings_table (165.95ms) Migrating: 2013_11_17_062634_add_license_to_assets Migrated: 2013_11_17_062634_add_license_to_assets (0.07ms) Migrating: 2013_11_18_134332_add_contacts_to_users Migrated: 2013_11_18_134332_add_contacts_to_users (419.77ms) Migrating: 2013_11_18_142847_add_info_to_locations Migrated: 2013_11_18_142847_add_info_to_locations (363.56ms) Migrating: 2013_11_18_152942_remove_location_id_from_asset Migrated: 2013_11_18_152942_remove_location_id_from_asset (542.15ms) Migrating: 2013_11_18_164423_set_nullvalues_for_user Migrated: 2013_11_18_164423_set_nullvalues_for_user (0.07ms) Migrating: 2013_11_19_013337_create_asset_logs_table Migrated: 2013_11_19_013337_create_asset_logs_table (186.50ms) Migrating: 2013_11_19_061409_edit_added_on_asset_logs_table Migrated: 2013_11_19_061409_edit_added_on_asset_logs_table (0.06ms) Migrating: 2013_11_19_062250_edit_location_id_asset_logs_table Migrated: 2013_11_19_062250_edit_location_id_asset_logs_table (0.05ms) Migrating: 2013_11_20_055822_add_soft_delete_on_assets Migrated: 2013_11_20_055822_add_soft_delete_on_assets (381.87ms) Migrating: 2013_11_20_121404_add_soft_delete_on_locations Migrated: 2013_11_20_121404_add_soft_delete_on_locations (290.98ms) Migrating: 2013_11_20_123137_add_soft_delete_on_manufacturers Migrated: 2013_11_20_123137_add_soft_delete_on_manufacturers (252.45ms) Migrating: 2013_11_20_123725_add_soft_delete_on_categories Migrated: 2013_11_20_123725_add_soft_delete_on_categories (254.89ms) Migrating: 2013_11_20_130248_create_status_labels Migrated: 2013_11_20_130248_create_status_labels (179.89ms) Migrating: 2013_11_20_130830_add_status_id_on_assets_table Migrated: 2013_11_20_130830_add_status_id_on_assets_table (418.45ms) Migrating: 2013_11_20_131544_add_status_type_on_status_labels Migrated: 2013_11_20_131544_add_status_type_on_status_labels (255.25ms) Migrating: 2013_11_20_134103_add_archived_to_assets Migrated: 2013_11_20_134103_add_archived_to_assets (857.39ms) Migrating: 2013_11_21_002321_add_uploads_table Migrated: 2013_11_21_002321_add_uploads_table (194.38ms) Migrating: 2013_11_21_024531_remove_deployable_boolean_from_status_labels Migrated: 2013_11_21_024531_remove_deployable_boolean_from_status_labels (269.65ms) Migrating: 2013_11_22_075308_add_option_label_to_settings_table Migrated: 2013_11_22_075308_add_option_label_to_settings_table (0.07ms) Migrating: 2013_11_22_213400_edits_to_settings_table Migrated: 2013_11_22_213400_edits_to_settings_table (220.24ms) Migrating: 2013_11_25_013244_recreate_licenses_table Migrated: 2013_11_25_013244_recreate_licenses_table (172.48ms) Migrating: 2013_11_25_031458_create_license_seats_table Migrated: 2013_11_25_031458_create_license_seats_table (175.50ms) Migrating: 2013_11_25_032022_add_type_to_actionlog_table Migrated: 2013_11_25_032022_add_type_to_actionlog_table (287.01ms) Migrating: 2013_11_25_033008_delete_bad_licenses_table Migrated: 2013_11_25_033008_delete_bad_licenses_table (124.21ms) Migrating: 2013_11_25_033131_create_new_licenses_table Migrated: 2013_11_25_033131_create_new_licenses_table (193.43ms) Migrating: 2013_11_25_033534_add_licensed_to_licenses_table Migrated: 2013_11_25_033534_add_licensed_to_licenses_table (295.08ms) Migrating: 2013_11_25_101308_add_warrantee_to_assets_table Migrated: 2013_11_25_101308_add_warrantee_to_assets_table (231.42ms) Migrating: 2013_11_25_104343_alter_warranty_column_on_assets Migrated: 2013_11_25_104343_alter_warranty_column_on_assets (259.69ms) Migrating: 2013_11_25_150450_drop_parent_from_categories Migrated: 2013_11_25_150450_drop_parent_from_categories (413.00ms) Migrating: 2013_11_25_151920_add_depreciate_to_assets Migrated: 2013_11_25_151920_add_depreciate_to_assets (343.86ms) Migrating: 2013_11_25_152903_add_depreciate_to_licenses_table Migrated: 2013_11_25_152903_add_depreciate_to_licenses_table (269.01ms) Migrating: 2013_11_26_211820_drop_license_from_assets_table Migrated: 2013_11_26_211820_drop_license_from_assets_table (0.08ms) Migrating: 2013_11_27_062510_add_note_to_asset_logs_table Migrated: 2013_11_27_062510_add_note_to_asset_logs_table (254.96ms) Migrating: 2013_12_01_113426_add_filename_to_asset_log Migrated: 2013_12_01_113426_add_filename_to_asset_log (817.40ms) Migrating: 2013_12_06_094618_add_nullable_to_licenses_table Migrated: 2013_12_06_094618_add_nullable_to_licenses_table (341.57ms) Migrating: 2013_12_10_084038_add_eol_on_models_table Migrated: 2013_12_10_084038_add_eol_on_models_table (224.54ms) Migrating: 2013_12_12_055218_add_manager_to_users_table Migrated: 2013_12_12_055218_add_manager_to_users_table (194.65ms) Migrating: 2014_01_28_031200_add_qr_code_to_settings_table Migrated: 2014_01_28_031200_add_qr_code_to_settings_table (170.36ms) Migrating: 2014_02_13_183016_add_qr_text_to_settings_table Migrated: 2014_02_13_183016_add_qr_text_to_settings_table (216.01ms) Migrating: 2014_05_24_093839_alter_default_license_depreciation_id Migrated: 2014_05_24_093839_alter_default_license_depreciation_id (0.05ms) Migrating: 2014_05_27_231658_alter_default_values_licenses Migrated: 2014_05_27_231658_alter_default_values_licenses (0.05ms) Migrating: 2014_06_19_191508_add_asset_name_to_settings Migrated: 2014_06_19_191508_add_asset_name_to_settings (177.10ms) Migrating: 2014_06_20_004847_make_asset_log_checkedout_to_nullable Migrated: 2014_06_20_004847_make_asset_log_checkedout_to_nullable (0.05ms) Migrating: 2014_06_20_005050_make_asset_log_purchasedate_to_nullable Migrated: 2014_06_20_005050_make_asset_log_purchasedate_to_nullable (0.05ms) Migrating: 2014_06_24_003011_add_suppliers Migrated: 2014_06_24_003011_add_suppliers (123.88ms) Migrating: 2014_06_24_010742_add_supplier_id_to_asset Migrated: 2014_06_24_010742_add_supplier_id_to_asset (345.24ms) Migrating: 2014_06_24_012839_add_zip_to_supplier Migrated: 2014_06_24_012839_add_zip_to_supplier (258.07ms) Migrating: 2014_06_24_033908_add_url_to_supplier Migrated: 2014_06_24_033908_add_url_to_supplier (335.64ms) Migrating: 2014_07_08_054116_add_employee_id_to_users Migrated: 2014_07_08_054116_add_employee_id_to_users (272.13ms) Migrating: 2014_07_09_134316_add_requestable_to_assets Migrated: 2014_07_09_134316_add_requestable_to_assets (300.22ms) Migrating: 2014_07_17_085822_add_asset_to_software Migrated: 2014_07_17_085822_add_asset_to_software (268.71ms) Migrating: 2014_07_17_161625_make_asset_id_in_logs_nullable Migrated: 2014_07_17_161625_make_asset_id_in_logs_nullable (0.07ms) Migrating: 2014_08_12_053504_alpha_0_4_2_release Migrated: 2014_08_12_053504_alpha_0_4_2_release (0.46ms) Migrating: 2014_08_17_083523_make_location_id_nullable Migrated: 2014_08_17_083523_make_location_id_nullable (0.06ms) Migrating: 2014_10_16_200626_add_rtd_location_to_assets Migrated: 2014_10_16_200626_add_rtd_location_to_assets (292.29ms) Migrating: 2014_10_24_000417_alter_supplier_state_to_32 Migrated: 2014_10_24_000417_alter_supplier_state_to_32 (0.05ms) Migrating: 2014_10_24_015641_add_display_checkout_date Migrated: 2014_10_24_015641_add_display_checkout_date (829.60ms) Migrating: 2014_10_28_222654_add_avatar_field_to_users_table Migrated: 2014_10_28_222654_add_avatar_field_to_users_table (266.90ms) Migrating: 2014_10_29_045924_add_image_field_to_models_table Migrated: 2014_10_29_045924_add_image_field_to_models_table (223.66ms) Migrating: 2014_11_01_214955_add_eol_display_to_settings Migrated: 2014_11_01_214955_add_eol_display_to_settings (305.60ms) Migrating: 2014_11_04_231416_update_group_field_for_reporting Migrated: 2014_11_04_231416_update_group_field_for_reporting (2.32ms) Migrating: 2014_11_05_212408_add_fields_to_licenses Migrated: 2014_11_05_212408_add_fields_to_licenses (222.83ms) Migrating: 2014_11_07_021042_add_image_to_supplier Migrated: 2014_11_07_021042_add_image_to_supplier (235.42ms) Migrating: 2014_11_20_203007_add_username_to_user Migrated: 2014_11_20_203007_add_username_to_user (258.36ms) Migrating: 2014_11_20_223947_add_auto_to_settings Migrated: 2014_11_20_223947_add_auto_to_settings (256.95ms) Migrating: 2014_11_20_224421_add_prefix_to_settings Migrated: 2014_11_20_224421_add_prefix_to_settings (237.08ms) Migrating: 2014_11_21_104401_change_licence_type Migrated: 2014_11_21_104401_change_licence_type (0.06ms) Migrating: 2014_12_09_082500_add_fields_maintained_term_to_licenses Migrated: 2014_12_09_082500_add_fields_maintained_term_to_licenses (237.00ms) Migrating: 2015_02_04_155757_increase_user_field_lengths Migrated: 2015_02_04_155757_increase_user_field_lengths (0.05ms) Migrating: 2015_02_07_013537_add_soft_deleted_to_log Migrated: 2015_02_07_013537_add_soft_deleted_to_log (524.92ms) Migrating: 2015_02_10_040958_fix_bad_assigned_to_ids Migrated: 2015_02_10_040958_fix_bad_assigned_to_ids (304.90ms) Migrating: 2015_02_10_053310_migrate_data_to_new_statuses Migrated: 2015_02_10_053310_migrate_data_to_new_statuses (1.75ms) Migrating: 2015_02_11_044104_migrate_make_license_assigned_null Migrated: 2015_02_11_044104_migrate_make_license_assigned_null (0.60ms) Migrating: 2015_02_11_104406_migrate_create_requests_table Migrated: 2015_02_11_104406_migrate_create_requests_table (174.34ms) Migrating: 2015_02_12_001312_add_mac_address_to_asset Migrated: 2015_02_12_001312_add_mac_address_to_asset (518.49ms) Migrating: 2015_02_12_024100_change_license_notes_type Migrated: 2015_02_12_024100_change_license_notes_type (300.77ms) Migrating: 2015_02_17_231020_add_localonly_to_settings Migrated: 2015_02_17_231020_add_localonly_to_settings (845.98ms) Migrating: 2015_02_19_222322_add_logo_and_colors_to_settings Migrated: 2015_02_19_222322_add_logo_and_colors_to_settings (236.72ms) Migrating: 2015_02_24_072043_add_alerts_to_settings Migrated: 2015_02_24_072043_add_alerts_to_settings (217.65ms) Migrating: 2015_02_25_022931_add_eula_fields Migrated: 2015_02_25_022931_add_eula_fields (1,137.69ms) Migrating: 2015_02_25_204513_add_accessories_table Migrated: 2015_02_25_204513_add_accessories_table (464.83ms) Migrating: 2015_02_26_091228_add_accessories_user_table Migrated: 2015_02_26_091228_add_accessories_user_table (396.19ms) Migrating: 2015_02_26_115128_add_deleted_at_models Migrated: 2015_02_26_115128_add_deleted_at_models (304.05ms) Migrating: 2015_02_26_233005_add_category_type Migrated: 2015_02_26_233005_add_category_type (260.95ms) Migrating: 2015_03_01_231912_update_accepted_at_to_acceptance_id Migrated: 2015_03_01_231912_update_accepted_at_to_acceptance_id (232.23ms) Migrating: 2015_03_05_011929_add_qr_type_to_settings Migrated: 2015_03_05_011929_add_qr_type_to_settings (239.36ms) Migrating: 2015_03_18_055327_add_note_to_user Migrated: 2015_03_18_055327_add_note_to_user (256.31ms) Migrating: 2015_04_29_234704_add_slack_to_settings Migrated: 2015_04_29_234704_add_slack_to_settings (208.08ms) Migrating: 2015_05_04_085151_add_parent_id_to_locations_table Migrated: 2015_05_04_085151_add_parent_id_to_locations_table (940.26ms) Migrating: 2015_05_22_124421_add_reassignable_to_licenses Migrated: 2015_05_22_124421_add_reassignable_to_licenses (230.86ms) Migrating: 2015_06_10_003314_fix_default_for_user_notes Migrated: 2015_06_10_003314_fix_default_for_user_notes (0.05ms) Migrating: 2015_06_10_003554_create_consumables Migrated: 2015_06_10_003554_create_consumables (643.81ms) Migrating: 2015_06_15_183253_move_email_to_username Migrated: 2015_06_15_183253_move_email_to_username (0.76ms) Migrating: 2015_06_23_070346_make_email_nullable Migrated: 2015_06_23_070346_make_email_nullable (424.09ms) Migrating: 2015_06_26_213716_create_asset_maintenances_table Migrated: 2015_06_26_213716_create_asset_maintenances_table (153.58ms) Migrating: 2015_07_04_212443_create_custom_fields_table Migrated: 2015_07_04_212443_create_custom_fields_table (177.85ms) Migrating: 2015_07_09_014359_add_currency_to_settings_and_locations Migrated: 2015_07_09_014359_add_currency_to_settings_and_locations (493.21ms) Migrating: 2015_07_21_122022_add_expected_checkin_date_to_asset_logs Migrated: 2015_07_21_122022_add_expected_checkin_date_to_asset_logs (247.62ms) Migrating: 2015_07_24_093845_add_checkin_email_to_category_table Migrated: 2015_07_24_093845_add_checkin_email_to_category_table (259.88ms) Migrating: 2015_07_25_055415_remove_email_unique_constraint Migrated: 2015_07_25_055415_remove_email_unique_constraint (229.35ms) Migrating: 2015_07_29_230054_add_thread_id_to_asset_logs_table Migrated: 2015_07_29_230054_add_thread_id_to_asset_logs_table (0.06ms) Migrating: 2015_07_31_015430_add_accepted_to_assets Migrated: 2015_07_31_015430_add_accepted_to_assets (217.19ms) Migrating: 2015_09_09_195301_add_custom_css_to_settings Migrated: 2015_09_09_195301_add_custom_css_to_settings (256.03ms) Migrating: 2015_09_21_235926_create_custom_field_custom_fieldset Migrated: 2015_09_21_235926_create_custom_field_custom_fieldset (178.03ms) Migrating: 2015_09_22_000104_create_custom_fieldsets Migrated: 2015_09_22_000104_create_custom_fieldsets (785.55ms) Migrating: 2015_09_22_003321_add_fieldset_id_to_assets Migrated: 2015_09_22_003321_add_fieldset_id_to_assets (232.95ms) Migrating: 2015_09_22_003413_migrate_mac_address Migrated: 2015_09_22_003413_migrate_mac_address (635.35ms) Migrating: 2015_09_28_003314_fix_default_purchase_order Migrated: 2015_09_28_003314_fix_default_purchase_order (281.10ms) Migrating: 2015_10_01_024551_add_accessory_consumable_price_info Migrated: 2015_10_01_024551_add_accessory_consumable_price_info (506.66ms) Migrating: 2015_10_12_192706_add_brand_to_settings Migrated: 2015_10_12_192706_add_brand_to_settings (376.79ms) Migrating: 2015_10_22_003314_fix_defaults_accessories Migrated: 2015_10_22_003314_fix_defaults_accessories (491.61ms) Migrating: 2015_10_23_182625_add_checkout_time_and_expected_checkout_date_to_assets Migrated: 2015_10_23_182625_add_checkout_time_and_expected_checkout_date_to_assets (245.56ms) Migrating: 2015_11_05_061015_create_companies_table Migrated: 2015_11_05_061015_create_companies_table (530.54ms) Migrating: 2015_11_05_061115_add_company_id_to_consumables_table Migrated: 2015_11_05_061115_add_company_id_to_consumables_table (244.82ms) Migrating: 2015_11_05_183749_image Migrated: 2015_11_05_183749_image (248.45ms) Migrating: 2015_11_06_092038_add_company_id_to_accessories_table Migrated: 2015_11_06_092038_add_company_id_to_accessories_table (253.90ms) Migrating: 2015_11_06_100045_add_company_id_to_users_table Migrated: 2015_11_06_100045_add_company_id_to_users_table (768.52ms) Migrating: 2015_11_06_134742_add_company_id_to_licenses_table Migrated: 2015_11_06_134742_add_company_id_to_licenses_table (222.58ms) Migrating: 2015_11_08_035832_add_company_id_to_assets_table Migrated: 2015_11_08_035832_add_company_id_to_assets_table (287.30ms) Migrating: 2015_11_08_222305_add_ldap_fields_to_settings Migrated: 2015_11_08_222305_add_ldap_fields_to_settings (299.34ms) Migrating: 2015_11_15_151803_add_full_multiple_companies_support_to_settings_table Migrated: 2015_11_15_151803_add_full_multiple_companies_support_to_settings_table (253.61ms) Migrating: 2015_11_26_195528_import_ldap_settings Migrated: 2015_11_26_195528_import_ldap_settings (1.92ms) Migrating: 2015_11_30_191504_remove_fk_company_id Migrated: 2015_11_30_191504_remove_fk_company_id (0.06ms) Migrating: 2015_12_21_193006_add_ldap_server_cert_ignore_to_settings_table Migrated: 2015_12_21_193006_add_ldap_server_cert_ignore_to_settings_table (277.36ms) Migrating: 2015_12_30_233509_add_timestamp_and_userId_to_custom_fields Migrated: 2015_12_30_233509_add_timestamp_and_userId_to_custom_fields (263.74ms) Migrating: 2015_12_30_233658_add_timestamp_and_userId_to_custom_fieldsets Migrated: 2015_12_30_233658_add_timestamp_and_userId_to_custom_fieldsets (300.12ms) Migrating: 2016_01_28_041048_add_notes_to_models Migrated: 2016_01_28_041048_add_notes_to_models (245.70ms) Migrating: 2016_02_19_070119_add_remember_token_to_users_table Migrated: 2016_02_19_070119_add_remember_token_to_users_table (254.08ms) Migrating: 2016_02_19_073625_create_password_resets_table Migrated: 2016_02_19_073625_create_password_resets_table (1,018.81ms) Migrating: 2016_03_02_193043_add_ldap_flag_to_users Migrated: 2016_03_02_193043_add_ldap_flag_to_users (259.86ms) Migrating: 2016_03_02_220517_update_ldap_filter_to_longer_field Migrated: 2016_03_02_220517_update_ldap_filter_to_longer_field (326.98ms) Migrating: 2016_03_08_225351_create_components_table Migrated: 2016_03_08_225351_create_components_table (1,165.16ms) Migrating: 2016_03_09_024038_add_min_stock_to_tables Migrated: 2016_03_09_024038_add_min_stock_to_tables (736.39ms) Migrating: 2016_03_10_133849_add_locale_to_users Migrated: 2016_03_10_133849_add_locale_to_users (215.54ms) Migrating: 2016_03_10_135519_add_locale_to_settings Migrated: 2016_03_10_135519_add_locale_to_settings (297.31ms) Migrating: 2016_03_11_185621_add_label_settings_to_settings Migrated: 2016_03_11_185621_add_label_settings_to_settings (263.08ms) Migrating: 2016_03_22_125911_fix_custom_fields_regexes Migrated: 2016_03_22_125911_fix_custom_fields_regexes (16.76ms) Migrating: 2016_04_28_141554_add_show_to_users Migrated: 2016_04_28_141554_add_show_to_users (258.35ms) Migrating: 2016_05_16_164733_add_model_mfg_to_consumable Migrated: 2016_05_16_164733_add_model_mfg_to_consumable (246.69ms) Migrating: 2016_05_19_180351_add_alt_barcode_settings Migrated: 2016_05_19_180351_add_alt_barcode_settings (267.88ms) Migrating: 2016_05_19_191146_add_alter_interval Migrated: 2016_05_19_191146_add_alter_interval (245.11ms) Migrating: 2016_05_19_192226_add_inventory_threshold Migrated: 2016_05_19_192226_add_inventory_threshold (263.70ms) Migrating: 2016_05_20_024859_remove_option_keys_from_settings_table Migrated: 2016_05_20_024859_remove_option_keys_from_settings_table (429.52ms) Migrating: 2016_05_20_143758_remove_option_value_from_settings_table Migrated: 2016_05_20_143758_remove_option_value_from_settings_table (284.10ms) Migrating: 2016_06_01_000001_create_oauth_auth_codes_table Migrated: 2016_06_01_000001_create_oauth_auth_codes_table (1,281.82ms) Migrating: 2016_06_01_000002_create_oauth_access_tokens_table Migrated: 2016_06_01_000002_create_oauth_access_tokens_table (962.89ms) Migrating: 2016_06_01_000003_create_oauth_refresh_tokens_table Migrated: 2016_06_01_000003_create_oauth_refresh_tokens_table (593.76ms) Migrating: 2016_06_01_000004_create_oauth_clients_table Migrated: 2016_06_01_000004_create_oauth_clients_table (480.93ms) Migrating: 2016_06_01_000005_create_oauth_personal_access_clients_table Migrated: 2016_06_01_000005_create_oauth_personal_access_clients_table (255.22ms) Migrating: 2016_06_01_140218_add_email_domain_and_format_to_settings Migrated: 2016_06_01_140218_add_email_domain_and_format_to_settings (498.71ms) Migrating: 2016_06_22_160725_add_user_id_to_maintenances Migrated: 2016_06_22_160725_add_user_id_to_maintenances (264.07ms) Migrating: 2016_07_13_150015_add_is_ad_to_settings Migrated: 2016_07_13_150015_add_is_ad_to_settings (351.53ms) Migrating: 2016_07_14_153609_add_ad_domain_to_settings Migrated: 2016_07_14_153609_add_ad_domain_to_settings (920.12ms) Migrating: 2016_07_22_003348_fix_custom_fields_regex_stuff Migrated: 2016_07_22_003348_fix_custom_fields_regex_stuff (1.17ms) Migrating: 2016_07_22_054850_one_more_mac_addr_fix Migrated: 2016_07_22_054850_one_more_mac_addr_fix (17.65ms) Migrating: 2016_07_22_143045_add_port_to_ldap_settings Migrated: 2016_07_22_143045_add_port_to_ldap_settings (420.97ms) Migrating: 2016_07_22_153432_add_tls_to_ldap_settings Migrated: 2016_07_22_153432_add_tls_to_ldap_settings (268.47ms) Migrating: 2016_07_27_211034_add_zerofill_to_settings Migrated: 2016_07_27_211034_add_zerofill_to_settings (281.72ms) Migrating: 2016_08_02_124944_add_color_to_statuslabel Migrated: 2016_08_02_124944_add_color_to_statuslabel (238.03ms) Migrating: 2016_08_04_134500_add_disallow_ldap_pw_sync_to_settings Migrated: 2016_08_04_134500_add_disallow_ldap_pw_sync_to_settings (268.93ms) Migrating: 2016_08_09_002225_add_manufacturer_to_licenses Migrated: 2016_08_09_002225_add_manufacturer_to_licenses (255.91ms) Migrating: 2016_08_12_121613_add_manufacturer_to_accessories_table Migrated: 2016_08_12_121613_add_manufacturer_to_accessories_table (236.40ms) Migrating: 2016_08_23_143353_add_new_fields_to_custom_fields Migrated: 2016_08_23_143353_add_new_fields_to_custom_fields (267.77ms) Migrating: 2016_08_23_145619_add_show_in_nav_to_status_labels Migrated: 2016_08_23_145619_add_show_in_nav_to_status_labels (264.98ms) Migrating: 2016_08_30_084634_make_purchase_cost_nullable Migrated: 2016_08_30_084634_make_purchase_cost_nullable (246.58ms) Migrating: 2016_09_01_141051_add_requestable_to_asset_model Migrated: 2016_09_01_141051_add_requestable_to_asset_model (267.88ms) Migrating: 2016_09_02_001448_create_checkout_requests_table Migrated: 2016_09_02_001448_create_checkout_requests_table (500.01ms) Migrating: 2016_09_04_180400_create_actionlog_table Migrated: 2016_09_04_180400_create_actionlog_table (472.19ms) Migrating: 2016_09_04_182149_migrate_asset_log_to_action_log Migrated: 2016_09_04_182149_migrate_asset_log_to_action_log (0.83ms) Migrating: 2016_09_19_235935_fix_fieldtype_for_target_type Migrated: 2016_09_19_235935_fix_fieldtype_for_target_type (343.13ms) Migrating: 2016_09_23_140722_fix_modelno_in_consumables_to_string Migrated: 2016_09_23_140722_fix_modelno_in_consumables_to_string (313.81ms) Migrating: 2016_09_28_231359_add_company_to_logs Migrated: 2016_09_28_231359_add_company_to_logs (244.60ms) Migrating: 2016_10_14_130709_fix_order_number_to_varchar Migrated: 2016_10_14_130709_fix_order_number_to_varchar (685.67ms) Migrating: 2016_10_16_015024_rename_modelno_to_model_number Migrated: 2016_10_16_015024_rename_modelno_to_model_number (266.87ms) Migrating: 2016_10_16_015211_rename_consumable_modelno_to_model_number Migrated: 2016_10_16_015211_rename_consumable_modelno_to_model_number (233.73ms) Migrating: 2016_10_16_143235_rename_model_note_to_notes Migrated: 2016_10_16_143235_rename_model_note_to_notes (236.43ms) Migrating: 2016_10_16_165052_rename_component_total_qty_to_qty Migrated: 2016_10_16_165052_rename_component_total_qty_to_qty (249.83ms) Migrating: 2016_10_19_145520_fix_order_number_in_components_to_string Migrated: 2016_10_19_145520_fix_order_number_in_components_to_string (245.21ms) Migrating: 2016_10_27_151715_add_serial_to_components Migrated: 2016_10_27_151715_add_serial_to_components (384.83ms) Migrating: 2016_10_27_213251_increase_serial_field_capacity Migrated: 2016_10_27_213251_increase_serial_field_capacity (232.78ms) Migrating: 2016_10_29_002724_enable_2fa_fields Migrated: 2016_10_29_002724_enable_2fa_fields (518.36ms) Migrating: 2016_10_29_082408_add_signature_to_acceptance Migrated: 2016_10_29_082408_add_signature_to_acceptance (1,110.51ms) Migrating: 2016_11_01_030818_fix_forgotten_filename_in_action_logs Migrated: 2016_11_01_030818_fix_forgotten_filename_in_action_logs (0.82ms) Migrating: 2016_11_13_020954_rename_component_serial_number_to_serial Migrated: 2016_11_13_020954_rename_component_serial_number_to_serial (241.41ms) Migrating: 2016_11_16_172119_increase_purchase_cost_size Migrated: 2016_11_16_172119_increase_purchase_cost_size (2,217.30ms) Migrating: 2016_11_17_161317_longer_state_field_in_location Migrated: 2016_11_17_161317_longer_state_field_in_location (194.85ms) Migrating: 2016_11_17_193706_add_model_number_to_accessories Migrated: 2016_11_17_193706_add_model_number_to_accessories (256.48ms) Migrating: 2016_11_24_160405_add_missing_target_type_to_logs_table Migrated: 2016_11_24_160405_add_missing_target_type_to_logs_table (0.72ms) Migrating: 2016_12_07_173720_increase_size_of_state_in_suppliers Migrated: 2016_12_07_173720_increase_size_of_state_in_suppliers (236.50ms) Migrating: 2016_12_19_004212_adjust_locale_length_to_10 Migrated: 2016_12_19_004212_adjust_locale_length_to_10 (245.82ms) Migrating: 2016_12_19_133936_extend_phone_lengths_in_supplier_and_elsewhere Migrated: 2016_12_19_133936_extend_phone_lengths_in_supplier_and_elsewhere (246.33ms) Migrating: 2016_12_27_212631_make_asset_assigned_to_polymorphic Migrated: 2016_12_27_212631_make_asset_assigned_to_polymorphic (243.79ms) Migrating: 2017_01_09_040429_create_locations_ldap_query_field Migrated: 2017_01_09_040429_create_locations_ldap_query_field (744.86ms) Migrating: 2017_01_14_002418_create_imports_table Migrated: 2017_01_14_002418_create_imports_table (170.99ms) Migrating: 2017_01_25_063357_fix_utf8_custom_field_column_names Migrated: 2017_01_25_063357_fix_utf8_custom_field_column_names (477.52ms) Migrating: 2017_03_03_154632_add_time_date_display_to_settings Migrated: 2017_03_03_154632_add_time_date_display_to_settings (229.89ms) Migrating: 2017_03_10_210807_add_fields_to_manufacturer Migrated: 2017_03_10_210807_add_fields_to_manufacturer (244.84ms) Migrating: 2017_05_08_195520_increase_size_of_field_values_in_custom_fields Migrated: 2017_05_08_195520_increase_size_of_field_values_in_custom_fields (378.02ms) Migrating: 2017_05_22_204422_create_departments Migrated: 2017_05_22_204422_create_departments (374.24ms) Migrating: 2017_05_22_233509_add_manager_to_locations_table Migrated: 2017_05_22_233509_add_manager_to_locations_table (242.21ms) Migrating: 2017_06_14_122059_add_next_autoincrement_to_settings Migrated: 2017_06_14_122059_add_next_autoincrement_to_settings (293.68ms) Migrating: 2017_06_18_151753_add_header_and_first_row_to_importer_table Migrated: 2017_06_18_151753_add_header_and_first_row_to_importer_table (338.64ms) Migrating: 2017_07_07_191533_add_login_text Migrated: 2017_07_07_191533_add_login_text (275.88ms) Migrating: 2017_07_25_130710_add_thumbsize_to_settings Migrated: 2017_07_25_130710_add_thumbsize_to_settings (297.06ms) Migrating: 2017_08_03_160105_set_asset_archived_to_zero_default Migrated: 2017_08_03_160105_set_asset_archived_to_zero_default (341.16ms) Migrating: 2017_08_22_180636_add_secure_password_options Migrated: 2017_08_22_180636_add_secure_password_options (304.17ms) Migrating: 2017_08_25_074822_add_auditing_tables Migrated: 2017_08_25_074822_add_auditing_tables (1,167.51ms) Migrating: 2017_08_25_101435_add_auditing_to_settings Migrated: 2017_08_25_101435_add_auditing_to_settings (297.13ms) Migrating: 2017_09_18_225619_fix_assigned_type_not_being_nulled Migrated: 2017_09_18_225619_fix_assigned_type_not_being_nulled (3.37ms) Migrating: 2017_10_03_015503_drop_foreign_keys Migrated: 2017_10_03_015503_drop_foreign_keys (977.17ms) Migrating: 2017_10_10_123504_allow_nullable_depreciation_id_in_models Migrated: 2017_10_10_123504_allow_nullable_depreciation_id_in_models (487.39ms) Migrating: 2017_10_17_133709_add_display_url_to_settings Migrated: 2017_10_17_133709_add_display_url_to_settings (256.75ms) Migrating: 2017_10_19_120002_add_custom_forgot_password_url Migrated: 2017_10_19_120002_add_custom_forgot_password_url (276.00ms) Migrating: 2017_10_19_130406_add_image_and_supplier_to_accessories Migrated: 2017_10_19_130406_add_image_and_supplier_to_accessories (265.87ms) Migrating: 2017_10_20_234129_add_location_indices_to_assets Migrated: 2017_10_20_234129_add_location_indices_to_assets (611.87ms) Migrating: 2017_10_25_202930_add_images_uploads_to_locations_manufacturers_etc Migrated: 2017_10_25_202930_add_images_uploads_to_locations_manufacturers_etc (2,617.42ms) Migrating: 2017_10_27_180947_denorm_asset_locations Migrated: 2017_10_27_180947_denorm_asset_locations (249.90ms) Migrating: 2017_10_27_192423_migrate_denormed_asset_locations Migrated: 2017_10_27_192423_migrate_denormed_asset_locations (14.03ms) Migrating: 2017_10_30_182938_add_address_to_user Migrated: 2017_10_30_182938_add_address_to_user (114.85ms) Migrating: 2017_11_08_025918_add_alert_menu_setting Migrated: 2017_11_08_025918_add_alert_menu_setting (145.83ms) Migrating: 2017_11_08_123942_labels_display_company_name Migrated: 2017_11_08_123942_labels_display_company_name (172.12ms) Migrating: 2017_12_12_010457_normalize_asset_last_audit_date Migrated: 2017_12_12_010457_normalize_asset_last_audit_date (127.16ms) Migrating: 2017_12_12_033618_add_actionlog_meta Migrated: 2017_12_12_033618_add_actionlog_meta (113.39ms) Migrating: 2017_12_26_170856_re_normalize_last_audit Migrated: 2017_12_26_170856_re_normalize_last_audit (1.94ms) Migrating: 2018_01_17_184354_add_archived_in_list_setting Migrated: 2018_01_17_184354_add_archived_in_list_setting (148.49ms) Migrating: 2018_01_19_203121_add_dashboard_message_to_settings Migrated: 2018_01_19_203121_add_dashboard_message_to_settings (136.67ms) Migrating: 2018_01_24_062633_add_footer_settings_to_settings Migrated: 2018_01_24_062633_add_footer_settings_to_settings (136.15ms) Migrating: 2018_01_24_093426_add_modellist_preferenc Migrated: 2018_01_24_093426_add_modellist_preferenc (300.02ms) Migrating: 2018_02_22_160436_add_remote_user_settings Migrated: 2018_02_22_160436_add_remote_user_settings (183.12ms) Migrating: 2018_03_03_011032_add_theme_to_settings Migrated: 2018_03_03_011032_add_theme_to_settings (139.76ms) Migrating: 2018_03_06_054937_add_default_flag_on_statuslabels Migrated: 2018_03_06_054937_add_default_flag_on_statuslabels (134.20ms) Migrating: 2018_03_23_212048_add_display_in_email_to_custom_fields Migrated: 2018_03_23_212048_add_display_in_email_to_custom_fields (121.27ms) Migrating: 2018_03_24_030738_add_show_images_in_email_setting Migrated: 2018_03_24_030738_add_show_images_in_email_setting (141.74ms) Migrating: 2018_03_24_050108_add_cc_alerts Migrated: 2018_03_24_050108_add_cc_alerts (126.14ms) Migrating: 2018_03_29_053618_add_canceled_at_and_fulfilled_at_in_requests Migrated: 2018_03_29_053618_add_canceled_at_and_fulfilled_at_in_requests (142.65ms) Migrating: 2018_03_29_070121_add_drop_unique_requests Migrated: 2018_03_29_070121_add_drop_unique_requests (658.28ms) Migrating: 2018_03_29_070511_add_new_index_requestable Migrated: 2018_03_29_070511_add_new_index_requestable (153.84ms) Migrating: 2018_04_02_150700_labels_display_model_name Migrated: 2018_04_02_150700_labels_display_model_name (152.19ms) Migrating: 2018_04_16_133902_create_custom_field_default_values_table Migrated: 2018_04_16_133902_create_custom_field_default_values_table (74.06ms) Migrating: 2018_05_04_073223_add_category_to_licenses Migrated: 2018_05_04_073223_add_category_to_licenses (113.46ms) Migrating: 2018_05_04_075235_add_update_license_category Migrated: 2018_05_04_075235_add_update_license_category (13.01ms) Migrating: 2018_05_08_031515_add_gdpr_privacy_footer Migrated: 2018_05_08_031515_add_gdpr_privacy_footer (134.56ms) Migrating: 2018_05_14_215229_add_indexes Migrated: 2018_05_14_215229_add_indexes (664.24ms) Migrating: 2018_05_14_223646_add_indexes_to_assets Migrated: 2018_05_14_223646_add_indexes_to_assets (1,671.30ms) Migrating: 2018_05_14_233638_denorm_counters_on_assets Migrated: 2018_05_14_233638_denorm_counters_on_assets (324.48ms) Migrating: 2018_05_16_153409_add_first_counter_totals_to_assets Migrated: 2018_05_16_153409_add_first_counter_totals_to_assets (5.27ms) Migrating: 2018_06_21_134622_add_version_footer Migrated: 2018_06_21_134622_add_version_footer (272.43ms) Migrating: 2018_07_05_215440_add_unique_serial_option_to_settings Migrated: 2018_07_05_215440_add_unique_serial_option_to_settings (347.11ms) Migrating: 2018_07_17_005911_create_login_attempts_table Migrated: 2018_07_17_005911_create_login_attempts_table (97.82ms) Migrating: 2018_07_24_154348_add_logo_to_print_assets Migrated: 2018_07_24_154348_add_logo_to_print_assets (774.84ms) Migrating: 2018_07_28_023826_create_checkout_acceptances_table Migrated: 2018_07_28_023826_create_checkout_acceptances_table (253.27ms) Migrating: 2018_08_20_204842_add_depreciation_option_to_settings Migrated: 2018_08_20_204842_add_depreciation_option_to_settings (117.46ms) Migrating: 2018_09_10_082212_create_checkout_acceptances_for_unaccepted_assets Migrated: 2018_09_10_082212_create_checkout_acceptances_for_unaccepted_assets (0.94ms) Migrating: 2018_10_18_191228_add_kits_licenses_table Migrated: 2018_10_18_191228_add_kits_licenses_table (82.02ms) Migrating: 2018_10_19_153910_add_kits_table Migrated: 2018_10_19_153910_add_kits_table (75.02ms) Migrating: 2018_10_19_154013_add_kits_models_table Migrated: 2018_10_19_154013_add_kits_models_table (75.94ms) Migrating: 2018_12_05_211936_add_favicon_to_settings Migrated: 2018_12_05_211936_add_favicon_to_settings (109.85ms) Migrating: 2018_12_05_212119_add_email_logo_to_settings Migrated: 2018_12_05_212119_add_email_logo_to_settings (112.75ms) Migrating: 2019_02_07_185953_add_kits_consumables_table Migrated: 2019_02_07_185953_add_kits_consumables_table (101.24ms) Migrating: 2019_02_07_190030_add_kits_accessories_table Migrated: 2019_02_07_190030_add_kits_accessories_table (79.03ms) Migrating: 2019_02_12_182750_add_actiondate_to_actionlog Migrated: 2019_02_12_182750_add_actiondate_to_actionlog (133.05ms) Migrating: 2019_02_14_154310_change_auto_increment_prefix_to_nullable Migrated: 2019_02_14_154310_change_auto_increment_prefix_to_nullable (254.60ms) Migrating: 2019_02_16_143518_auto_increment_back_to_string Migrated: 2019_02_16_143518_auto_increment_back_to_string (106.75ms) Migrating: 2019_02_17_205048_add_label_logo_to_settings Migrated: 2019_02_17_205048_add_label_logo_to_settings (139.35ms) Migrating: 2019_02_20_234421_make_serial_nullable Migrated: 2019_02_20_234421_make_serial_nullable (106.99ms) Migrating: 2019_02_21_224703_make_fields_nullable_for_integrity Migrated: 2019_02_21_224703_make_fields_nullable_for_integrity (936.00ms) Migrating: 2019_04_06_060145_add_user_skin_setting Migrated: 2019_04_06_060145_add_user_skin_setting (120.13ms) Migrating: 2019_04_06_205355_add_setting_allow_user_skin Migrated: 2019_04_06_205355_add_setting_allow_user_skin (156.71ms) Migrating: 2019_06_12_184327_rename_groups_table Migrated: 2019_06_12_184327_rename_groups_table (0.80ms) Migrating: 2019_07_23_140906_add_show_assigned_assets_to_settings Migrated: 2019_07_23_140906_add_show_assigned_assets_to_settings (133.08ms) Migrating: 2019_08_20_084049_add_custom_remote_user_header Migrated: 2019_08_20_084049_add_custom_remote_user_header (115.03ms) Migrating: 2019_12_04_223111_passport_upgrade Migrated: 2019_12_04_223111_passport_upgrade (105.04ms) Migrating: 2020_02_04_172100_add_ad_append_domain_settings Migrated: 2020_02_04_172100_add_ad_append_domain_settings (116.07ms) Migrating: 2020_04_29_222305_add_saml_fields_to_settings Migrated: 2020_04_29_222305_add_saml_fields_to_settings (111.27ms) Migrating: 2020_08_11_200712_add_saml_key_rollover Migrated: 2020_08_11_200712_add_saml_key_rollover (112.74ms) Migrating: 2020_10_22_233743_move_accessory_checkout_note_to_join_table Migrated: 2020_10_22_233743_move_accessory_checkout_note_to_join_table (116.26ms) Migrating: 2020_10_23_161736_fix_zero_values_for_locations Migrated: 2020_10_23_161736_fix_zero_values_for_locations (5.84ms) Migrating: 2020_11_18_214827_widen_license_serial_field Migrated: 2020_11_18_214827_widen_license_serial_field (173.87ms) Migrating: 2020_12_14_233815_add_digit_separator_to_settings Migrated: 2020_12_14_233815_add_digit_separator_to_settings (143.94ms) Migrating: 2020_12_18_090026_swap_target_type_index_order Migrated: 2020_12_18_090026_swap_target_type_index_order (890.05ms) Migrating: 2020_12_21_153235_update_min_password Migrated: 2020_12_21_153235_update_min_password (1.33ms) Migrating: 2020_12_21_210105_fix_bad_ldap_server_url_for_v5 Migrated: 2020_12_21_210105_fix_bad_ldap_server_url_for_v5 (1.39ms) Migrating: 2021_02_05_172502_add_provider_to_oauth_table Migrated: 2021_02_05_172502_add_provider_to_oauth_table (133.82ms) Migrating: 2021_03_18_184102_adds_several_ldap_fields Migrated: 2021_03_18_184102_adds_several_ldap_fields (113.68ms) Migrating: 2021_04_07_001811_add_ldap_dept Migrated: 2021_04_07_001811_add_ldap_dept (174.17ms) Migrating: 2021_04_14_180125_add_ids_to_tables Migrated: 2021_04_14_180125_add_ids_to_tables (227.42ms) Migrating: 2021_06_07_155421_add_serial_number_indexes Migrated: 2021_06_07_155421_add_serial_number_indexes (135.88ms) Migrating: 2021_06_07_155436_add_company_id_indexes Migrated: 2021_06_07_155436_add_company_id_indexes (1,392.85ms) Migrating: 2021_07_28_031345_add_client_side_l_d_a_p_cert_to_settings Migrated: 2021_07_28_031345_add_client_side_l_d_a_p_cert_to_settings (123.62ms) Migrating: 2021_07_28_040554_add_client_side_l_d_a_p_key_to_settings Migrated: 2021_07_28_040554_add_client_side_l_d_a_p_key_to_settings (117.03ms) Migrating: 2021_08_11_005206_add_depreciation_minimum_value Migrated: 2021_08_11_005206_add_depreciation_minimum_value (135.97ms) Migrating: 2021_08_24_124354_make_ldap_client_certs_nullable Migrated: 2021_08_24_124354_make_ldap_client_certs_nullable (129.44ms) Migrating: 2021_09_20_183216_change_default_label_to_nullable Migrated: 2021_09_20_183216_change_default_label_to_nullable (113.40ms) Migrating: 2021_12_27_151849_change_supplier_address_length Migrated: 2021_12_27_151849_change_supplier_address_length (209.01ms) Migrating: 2022_01_10_182548_add_license_id_index_to_license_seats Migrated: 2022_01_10_182548_add_license_id_index_to_license_seats (172.94ms) Migrating: 2022_02_03_214958_blank_out_ldap_active_flag Migrated: 2022_02_03_214958_blank_out_ldap_active_flag (2.05ms) Migrating: 2022_02_16_152431_add_unique_constraint_to_custom_field Migrated: 2022_02_16_152431_add_unique_constraint_to_custom_field (126.94ms) Migrating: 2022_03_03_225655_add_notes_to_accessories Migrated: 2022_03_03_225655_add_notes_to_accessories (121.38ms) Migrating: 2022_03_03_225754_add_notes_to_components Migrated: 2022_03_03_225754_add_notes_to_components (120.93ms) Migrating: 2022_03_03_225824_add_notes_to_consumables Migrated: 2022_03_03_225824_add_notes_to_consumables (127.92ms) Migrating: 2022_03_04_080836_add_remote_to_user Migrated: 2022_03_04_080836_add_remote_to_user (160.44ms) Migrating: 2022_03_09_001334_add_eula_to_checkout_acceptance Migrated: 2022_03_09_001334_add_eula_to_checkout_acceptance (634.52ms) Migrating: 2022_03_10_175740_add_eula_to_action_logs Migrated: 2022_03_10_175740_add_eula_to_action_logs (117.68ms) Migrating: 2022_03_21_162724_adds_ldap_manager Migrated: 2022_03_21_162724_adds_ldap_manager (137.11ms) Migrating: 2022_04_05_135340_add_primary_key_to_custom_fields_pivot Migrated: 2022_04_05_135340_add_primary_key_to_custom_fields_pivot (0.81ms) Migrating: 2022_05_16_235350_remove_stored_eula_field Migrated: 2022_05_16_235350_remove_stored_eula_field (137.37ms) Migrating: 2022_06_23_164407_add_user_id_to_users Migrated: 2022_06_23_164407_add_user_id_to_users (131.07ms) Migrating: 2022_06_28_234539_add_username_index_to_users Migrated: 2022_06_28_234539_add_username_index_to_users (156.08ms) Migrating: 2022_07_07_010406_add_indexes_to_license_seats Migrated: 2022_07_07_010406_add_indexes_to_license_seats (307.05ms) Migrating: 2022_08_10_141328_add_notes_denorm_to_consumables_users Migrated: 2022_08_10_141328_add_notes_denorm_to_consumables_users (250.97ms) Migrating: 2022_09_29_040231_add_chart_type_to_settings Migrated: 2022_09_29_040231_add_chart_type_to_settings (119.34ms) Migrating: 2022_10_05_163044_add_start_termination_date_to_users Migrated: 2022_10_05_163044_add_start_termination_date_to_users (160.19ms)

snipe commented 2 years ago

I'd expect to see that with a brand new database though. It's starting from the very first migration (from 2013!) How me the output of the command line restore, not migrate.

myriad007 commented 2 years ago

Ok, that's funny but I still have all my data now. But I am still being sent to the preflight screen...

myriad007 commented 2 years ago

When I run restore from CLI I get the error: Class "ZipArchive" not found

snipe commented 2 years ago

Yeah, that would be a problem. PHPZip is a required extension.

Screen Shot 2022-10-20 at 4 41 17 PM

You'll need to install or enable that for a restore to work.

myriad007 commented 2 years ago

Well, I installed zip and it restores v6 backups but it won't restore my v5.3.9 backup. All the data is there but I get re-directed to the pre-flight again!

snipe commented 2 years ago

If your data is actually there and the database name is correct, you wouldn't see preflight though.

https://github.com/snipe/snipe-it/blob/293e3e02e416b36de36294d4b2ec331213cfab50/app/Http/Middleware/CheckForSetup.php#L8-L35

https://github.com/snipe/snipe-it/blob/e94b5ac435c67c8f52f383597924eb3204b453a7/app/Models/Setting.php#L111-L129

myriad007 commented 2 years ago

Do you think it could be an oauth thing?

snipe commented 2 years ago

Definitely not.

myriad007 commented 2 years ago

I think I might have figured it out, but I still have an error. My old env. had DB_PREFIX=ver1_ and my new .env had DB_PREFIX=null

Now migrate throws this error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=nullassets CHANGE warrantee_months warranty_months INT DEFAULT NULL' at line 1 (SQL: ALTER TABLE ver1_DB_PREFIX=nullassets CHANGE warrantee_months warranty_months INT DEFAULT NULL)

snipe commented 2 years ago

I suspected as much, that's why I was asking about DB settings. With table prefixes, the table names will not be the same (and the restore script cannot grok table prefixes - it's a known limitation.)

That error looks like maybe a parse error in your .env. ver1_DB_PREFIX=nullassets? Maybe a typo?

myriad007 commented 2 years ago

OK, thanks for your help. I'll try reinstalling from scratch and re-uploading tomorrow.

Muralik7957 commented 1 year ago

snipe-it backup when i restore it redirecting to the pre-flight again

Path : [snipe-it/app/Console/Commands/RestoreFromBackup.php] Line 217 : $mysql_binary = config('database.connections.mysql.dump.dump_binary_path').'/mysql'; changed to : $mysql_binary = config('database.connections.mysql.dump.dump_binary_path').'\mysql.exe';

it started working.

aquadiode commented 1 year ago

snipe-it backup when i restore it redirecting to the pre-flight again

Path : [snipe-it/app/Console/Commands/RestoreFromBackup.php] Line 217 : $mysql_binary = config('database.connections.mysql.dump.dump_binary_path').'/mysql'; changed to : $mysql_binary = config('database.connections.mysql.dump.dump_binary_path').'\mysql.exe';

it started working.

Check whether the dump path is set correctly in .env file. From the docs: Windows users should use something like: 'C:\PROGRA~1\MARIAD~1.0\bin' or 'C:\PROGRA~1\MARIAD~1.1\bin', depending your version (note the double-slashes).

If you're not sure what the path is to mysqldump, linux users can run which mysqldump and Windows users can use cmd /c for %A in ("C:\Program Files\MariaDB 10.1\bin") do @echo %~sA via command line to reveal the path information.

uberbrady commented 1 year ago

Okay, so this one is my fault - I wrote that line and didn't take Windows users into consideration. If anyone else is having this problem and would like to give me a hand, I'd like to test if you can change that line to instead be:

$mysql_binary = config('database.connections.mysql.dump.dump_binary_path').\DIRECTORY_SEPARATOR.'mysql'.(\DIRECTORY_SEPARATOR == '\\' ? ".exe" : "");

What that should do is use a / or a \ (as appropriate) to concatenate the dump_binary_path with the word mysql. Then, if the DIRECTORY_SEPARATOR is \, it should append .exe to the string. So I can confirm this works on the Mac (and, thus, Linux) side, I just don't know if this works on the Windows side yet...

As soon as we can confirm that this works, I'll try and get it merged into the main line of development as soon as we can. Thanks for everyone's excellent sleuthing on this issue!

uberbrady commented 1 year ago

We got a report from a customer that this does work on Windows now, so the PR has been merged to the develop branch. The next point-release (6.0.15 I think?) should have this change in it.