SQL Error [1292] [22001]: Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'deleted_at' at row 22

Viewed 36

I'm trying to execute this:

ALTER TABLE categories
ADD COLUMN country_id int unsigned DEFAULT NULL,
ADD CONSTRAINT categories_country_id_foreign FOREIGN KEY (country_id) REFERENCES countries (id) ON DELETE CASCADE ON UPDATE CASCADE;

Countries table enter image description here

Categories table enter image description here

0 Answers
Related