Phalcon 3.1.2, devtools 3.1.2, PHP 7.0, Mysql server 5.7
The devtools apply alter table where don't really need.
Complete error:
ALTER TABLE temp_importacao_di
MODIFY datadi
DATE NOT NULL AFTER numerodi
ERROR: SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value
Describe of table
+------------------+-----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-----------------------+------+-----+---------+-------+
| idtproduto | int(11) unsigned | NO | PRI | NULL | |
| numtemp | int(10) unsigned | NO | | NULL | |
| codproduto | varchar(14) | NO | | NULL | |
| numerodi | char(12) | NO | PRI | NULL | |
| datadi | date | NO | | NULL | |
| datadesem | date | NO | | NULL | |
| codexportador | mediumint(8) unsigned | NO | | NULL | |
| ufdesem | char(2) | NO | | NULL | |
| localdesem | varchar(60) | NO | | NULL | |
| viatranpinter | varchar(2) | YES | | NULL | |
| vafrmm | decimal(15,2) | YES | | NULL | |
| formaimportacao | varchar(1) | YES | | NULL | |
| cnpjadquirente | varchar(18) | YES | | NULL | |
| estadoadquirente | varchar(2) | YES | | NULL | |
+------------------+-----------------------+------+-----+---------+-------+