sequelize / cli

The Sequelize CLI
MIT License
2.52k stars 528 forks source link

Subsequent migrations fail after running db:migrate:schema:timestamps:add command #1478

Open wachukxs opened 4 months ago

wachukxs commented 4 months ago

Issue Creation Checklist

Bug Description

Reproducible Example

Start up a new sequelize project; Run npx sequelize-cli db:migrate:schema:timestamps:add command

Subsequent migrations will fail to run returning the following error:

ERROR: Field 'createdAt' doesn't have a default value

From my investigation, what's happening is that createdAt field in SequelizeMeta table doesn't have a default value - and that's where that error is thrown from.

What do you expect to happen?

For the migration to run successfully.

What is actually happening?

Environment

Would you be willing to resolve this issue by submitting a Pull Request?


Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.