Reply To: Unable to parse ini file: config/custom.config.ini

#1980
Fuquar7
Participant

I am making notes as I go, I have a MariaDB 10.6 database with utf8mb4_general_ci Collation

There are no problems Importing the structure

With Enable foreign key checks I get the following error

Error
SQL query:


— Dumping data for table si_inventory

INSERT INTO si_inventory (id, domain_id, product_id, quantity, cost, date, note) VALUES
(1, 1, 1, ‘1000.000000’, ‘0.000000’, ‘2014-03-29’, ”),
(2, 1, 2, ‘100.000000’, ‘0.000000’, ‘2014-03-29’, ”),
(3, 1, 18, ‘1.000000’, ‘124.990000’, ‘2014-03-29’, ”),
(4, 1, 19, ‘1.000000’, ‘43.000000’, ‘2014-03-29’, ”),
(5, 1, 20, ‘1.000000’, ‘5.990000’, ‘2014-03-29’, ”),
(6, 1, 21, ‘1.000000’, ‘44.990000’, ‘2014-03-29’, ”),
(7, 1, 4, ‘2.000000’, ‘14.920000’, ‘2014-03-29’, ”),
(8, 1, 5, ‘2.000000’, ‘0.940000’, ‘2014-03-30’, ”),
(9, 1, 6, ‘2.000000’, ‘0.340000’, ‘2014-03-30’, ”),
(10, 1, 3, ‘5.000000’, ‘1.270000’, ‘2014-03-30’, ”),
(11, 1, 14, ‘1.000000’, ‘2.290000’, ‘2014-03-30’, ”),
(12, 1, 13, ‘1.000000’, ‘3.450000’, ‘2014-03-30’, ”),
(13, 1, 8, ‘1.000000’, ‘6.760000’, ‘2014-03-30’, ”),
(14, 1, 9, ‘1.000000’, ‘9.530000’, ‘2014-03-30’, ”),
(15, 1, 16, ‘2.000000’, ‘0.390000’, ‘2014-03-30’, ”),
(16, 1, 17, ‘1.000000’, ‘1.770[…]
MySQL said: Documentation

#1452 – Cannot add or update a child row: a foreign key constraint fails (dbs11545668.si_inventory, CONSTRAINT si_inventory_ibfk_1 FOREIGN KEY (product_id) REFERENCES si_products (id) ON UPDATE CASCADE)

Without foreign key checks the data imports successfully. I’m assuming it’s a matter of eliminating all the orphaned records… the how? I have no idea but I’m assuming my database is in this state because I’ve been using it since March 2013