Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 of 6 tasks
wachukxs opened this issue Mar 7, 2024 · 0 comments
Open
3 of 6 tasks

Comments

@wachukxs
Copy link

wachukxs commented Mar 7, 2024

Issue Creation Checklist

  • I understand that my issue will be automatically closed if I don't fill in the requested information
  • I have read the contribution guidelines

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

  • Sequelize version: ^6.37.0
  • Node.js version: v18.19.0
  • If TypeScript related: TypeScript version: N\A
  • Database & Version: MySQL v5.7.39
  • Connector library & Version:

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

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I will need guidance.
  • No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
  • No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in resolving my issue.

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

@ephys ephys transferred this issue from sequelize/sequelize Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant