SQL error while import from backup
Please confirm you have done the following before posting your bug report:
- [V] I have enabled debug mode
- [V] I have read checked the Common Issues page
Describe the bug Hi Snipers,
I am forced to migrate my installation from a macOS server to a Debian 10 Buster VM. The clean install on Debian 10 runs OK, the interface is fully functional and I can create assets and other records. When I import the .sql file created by the Snipe backup on my Mac into the mySQL server on Debian, I get an error:
ERROR 1118 (42000) at line 16: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
I’ve narrowed the problem down to the assets table. If I remove the assets table from the .sql file, everything imports correctly and I have a working Snipe. Except, I can’t create any new assets from that point on. In DEBUG mode, Snipe mentions the lack of a number of columns, which seems logic to me.
I should mention I have an extensive set of custom fields and fieldsets in my assets setup. Though I’m fairly certain this is the cause of the issue, I’m in the dark on how to solve it. As mentioned in the mySQL error statement, I’ve tried to alter the columns stated in the error to TEXT or BLOB in the .sql file, to no avail. I must admit I’m not very familiar with altering .sql files by hand, and I know I probably shouldn’t.
Anyway, could you please guide me on why I can have an extensive set of custom fields on a Mac, but can not migrate it to the new Debian 10 host?
Thank you.
Server (please complete the following information): Source server:
- Snipe-IT Version: 5.0.11
- OS: macOS 10.13.6
- Web Server: Apache 2
- PHP Version: 7.2.21
- mySQL: 8.0.16
New server:
- Snipe-IT Version: 5.0.11
- OS: Debian 10.6
- Web Server: Apache 2.4.38
- PHP Version: 7.3.19
- mySQL: 8.0.22
Error Messages
-
mySQL error: ERROR 1118 (42000) at line 16: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-
WITH DEBUG TURNED ON: SQLSTATE[42S22]: Column not found: 1054 Unknown column '_snipeit_port_01_mac_address_1' in 'field list' (SQL: insert into
assets(model_id,name,serial,asset_tag,company_id,order_number,notes,user_id,archived,physical,depreciate,status_id,warranty_months,purchase_cost,purchase_date,assigned_to,supplier_id,requestable,rtd_location_id,location_id,_snipeit_os_18,_snipeit_local_user_1_name_7,_snipeit_local_user_1_password_8,_snipeit_local_user_2_name_9,_snipeit_local_user_2_password_10,_snipeit_local_user_3_name_218,_snipeit_local_user_3_password_219,_snipeit_vpn_psk_169,_snipeit_management_url_1_145,_snipeit_management_url_2_146,_snipeit_management_url_3_147,_snipeit_port_01_type_12,_snipeit_port_01_dhcp_15,_snipeit_port_01_ip_11,_snipeit_port_01_subnet_14,_snipeit_port_01_router_21,_snipeit_port_01_dns_13,_snipeit_port_01_speed_20,_snipeit_port_01_vlan_id_19,_snipeit_port_01_hostname_121,_snipeit_port_01_mac_address_1,_snipeit_port_01_dhcp_address_range_133,_snipeit_port_02_type_22,_snipeit_port_02_dhcp_23,_snipeit_port_02_ip_24,_snipeit_port_02_subnet_25,_snipeit_port_02_router_26,_snipeit_port_02_dns_27,_snipeit_port_02_speed_28,_snipeit_port_02_vlan_id_29,_snipeit_port_02_hostname_122,_snipeit_port_02_mac_address_30,_snipeit_port_02_dhcp_address_range_134,_snipeit_port_03_type_31,_snipeit_port_03_dhcp_32,_snipeit_port_03_ip_33,_snipeit_port_03_subnet_34,_snipeit_port_03_router_35,_snipeit_port_03_dns_36,_snipeit_port_03_speed_37,_snipeit_port_03_vlan_id_38,_snipeit_port_03_hostname_123,_snipeit_port_03_mac_address_39,_snipeit_port_03_dhcp_address_range_135,_snipeit_port_04_type_40,_snipeit_port_04_dhcp_41,_snipeit_port_04_ip_42,_snipeit_port_04_subnet_43,_snipeit_port_04_router_44,_snipeit_port_04_dns_45,_snipeit_port_04_speed_46,_snipeit_port_04_vlan_id_47,_snipeit_port_04_hostname_124,_snipeit_port_04_mac_address_48,_snipeit_port_04_dhcp_address_range_136,_snipeit_port_05_type_49,_snipeit_port_05_dhcp_50,_snipeit_port_05_ip_51,_snipeit_port_05_subnet_52,_snipeit_port_05_router_53,_snipeit_port_05_dns_54,_snipeit_port_05_speed_55,_snipeit_port_05_vlan_id_56,_snipeit_port_05_hostname_125,_snipeit_port_05_mac_address_57,_snipeit_port_05_dhcp_address_range_137,_snipeit_port_06_type_58,_snipeit_port_06_dhcp_59,_snipeit_port_06_ip_60,_snipeit_port_06_subnet_61,_snipeit_port_06_router_62,_snipeit_port_06_dns_63,_snipeit_port_06_speed_64,_snipeit_port_06_vlan_id_65,_snipeit_port_06_hostname_126,_snipeit_port_06_mac_address_66,_snipeit_port_06_dhcp_address_range_138,_snipeit_port_07_type_67,_snipeit_port_07_dhcp_68,_snipeit_port_07_ip_69,_snipeit_port_07_subnet_70,_snipeit_port_07_router_71,_snipeit_port_07_dns_72,_snipeit_port_07_speed_73,_snipeit_port_07_vlan_id_74,_snipeit_port_07_hostname_127,_snipeit_port_07_mac_address_75,_snipeit_port_07_dhcp_address_range_139,_snipeit_port_08_type_76,_snipeit_port_08_dhcp_77,_snipeit_port_08_ip_78,_snipeit_port_08_subnet_79,_snipeit_port_08_router_80,_snipeit_port_08_dns_81,_snipeit_port_08_speed_82,_snipeit_port_08_vlan_id_83,_snipeit_port_08_hostname_128,_snipeit_port_08_mac_address_84,_snipeit_port_08_dhcp_address_range_140,_snipeit_port_09_type_85,_snipeit_port_09_dhcp_86,_snipeit_port_09_ip_87,_snipeit_port_09_subnet_88,_snipeit_port_09_router_89,_snipeit_port_09_dns_90,_snipeit_port_09_speed_91,_snipeit_port_09_vlan_id_92,_snipeit_port_09_hostname_129,_snipeit_port_09_mac_address_93,_snipeit_port_09_dhcp_address_range_141,_snipeit_port_10_type_94,_snipeit_port_10_dhcp_95,_snipeit_port_10_ip_96,_snipeit_port_10_subnet_97,_snipeit_port_10_router_98,_snipeit_port_10_dns_99,_snipeit_port_10_speed_100,_snipeit_port_10_vlan_id_101,_snipeit_port_10_hostname_130,_snipeit_port_10_mac_address_102,_snipeit_port_10_dhcp_address_range_142,_snipeit_port_11_type_103,_snipeit_port_11_dhcp_104,_snipeit_port_11_ip_105,_snipeit_port_11_subnet_106,_snipeit_port_11_router_107,_snipeit_port_11_dns_108,_snipeit_port_11_speed_109,_snipeit_port_11_vlan_id_110,_snipeit_port_11_hostname_131,_snipeit_port_11_mac_address_111,_snipeit_port_11_dhcp_address_range_143,_snipeit_port_12_type_112,_snipeit_port_12_dhcp_113,_snipeit_port_12_ip_114,_snipeit_port_12_subnet_115,_snipeit_port_12_router_116,_snipeit_port_12_dns_117,_snipeit_port_12_speed_118,_snipeit_port_12_vlan_id_119,_snipeit_port_12_hostname_132,_snipeit_port_12_mac_address_120,_snipeit_port_12_dhcp_address_range_144,_snipeit_support_contract_type_148,_snipeit_support_contract_end_date_149,_snipeit_support_account_login_150,_snipeit_support_account_password_151,updated_at,created_at) values (101, ?, ?, TEST_003, ?, ?, ?, 1, 0, 1, 0, 4, ?, ?, ?, ?, ?, 0, ?, ?, ?, ?, eyJpdiI6ImpCWDZWRDBHenRkaE1OZ1VUcEd2cHc9PSIsInZhbHVlIjoiTTRjbExlaFNyY21McXlFTlk3RTVXQT09IiwibWFjIjoiMjA5YzI0YjViYjlmZDhkNWRkODk4YTA1NDVjNDQ5Y2NmOGFkOTEwNjJlZDVmMTk0NGI2MWRhNzgyNjE0NDcyYSJ9, ?, eyJpdiI6InlFSVdqTnJIb2JrUGZiU2VcLzczR2Z3PT0iLCJ2YWx1ZSI6ImtHMGdGNlg0WWphUEJ0SGV6TDdjXC93PT0iLCJtYWMiOiJlZjIxODNmMzkxZWMwZDkwNjE5OGEyOTI1NGIyODJhMTFjNjI3NWU0NmU0NzJmOTM1NzMyMDVlZTQ5OTliY2NmIn0=, ?, eyJpdiI6ImQ3RWFyVk1CXC90KytCaldHZHdOMERRPT0iLCJ2YWx1ZSI6InlcLzh4Z2F0eXozYmV5VkJFYSt0TnpRPT0iLCJtYWMiOiI3MWJlMjcwYmZiNmEyZjVjZDlhMWU3MTMxNmRhOWE2NDI4ZGVlOTU4YTU2ODBkNmE1YWIxMmZiYjNmZmM0ZGM5In0=, eyJpdiI6IjJnakZXXC94WitCSzU2VnBhNXpUemJBPT0iLCJ2YWx1ZSI6IkY0NzVMVHNYM2w5UDBzNGd1TkJqUlE9PSIsIm1hYyI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