Problem during upgrade from v3.0.x to v3.2.x.
Closed this issue · 1 comments
Hello,
We encounter a problem when upgrading textmaster/akeneo-extension from v3.0.x to v3.2.x.
When running the "doctrine:schema:update" command, an error is raised when executing the current SQL query :
ALTER TABLE textmaster_document
ADD project_id INT NOT NULL,
ADD textmaster_document_id VARCHAR(255) DEFAULT NULL,
ADD data_to_send JSON NOT NULL,
ADD language_from VARCHAR(255) NOT NULL,
ADD language_to VARCHAR(255) NOT NULL,
ADD created_at DATETIME NOT NULL COMMENT '(DC2Type:datetime)',
DROP project_identifier,
DROP document_identifier,
DROP language,
CHANGE status status VARCHAR(255) DEFAULT NULL;
The error raised is :
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'created_at' at row 1
Because created_at
field is non nullable without any default value, MySQL tries to set the "Zero Date" (0000-00-00 00:00:00) for the existing rows. But standard Akeneo configuration disables the ability to set the zero date.
It is also a standard best practice to avoid the Zero Date in MySQL Databases.
I recommand to make nullable the created_at
field, if extension codebase makes it possible.
Should it bit possible ?
Thanks in advance.
Hi @ndeg ,
That is possible. We can update the codebase to make created_at nullable.
This is the release for your issue: https://github.com/textmaster/akeneo-extension/releases/tag/v3.2.9