My existing table:
+-----------------+---------------+------+-----+---------+-------------------+
| Field | Type | Null | Key | Default |
You can't use this query until you have NO
NULL
values in thecreation_date
column.
Update your creation_date
column with some default date and then alter the table.
Like this
UPDATE enterprise SET creation_date = CURRENT_TIMESTAMP WHERE creation_date IS NULL;
ALTER TABLE enterprise MODIFY creation_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;