I'm using phalcon devtools for DB's migration.
so, I wanted to create a table that have deleted_at column as the below.
new Column(
'deleted_at',
[
'type' => Column::TYPE_TIMESTAMP,
'default' => null,
'notNull' => false,
'after' => 'updated_at'
]
)
I assumed that deleted_at column is TYPE_TIMESTAMP and default value is null .But, an error occured.
ERROR: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'deleted_at'
so, I deleted 'default' => null as the below.
new Column(
'deleted_at',
[
'type' => Column::TYPE_TIMESTAMP,
'notNull' => false,
'after' => 'updated_at'
]
)
But, The results are the same.
Please help me for creating TIMESTAMPcolumn that has default value NULL.