Subsequent migrations fail after running db:migrate:schema:timestamps:add command
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, mysql
調査の方向性
Start with the db:migrate:schema:timestamps:add command and the migration setup that creates or updates the SequelizeMeta table. Reproduce on MySQL 5.7 with Sequelize CLI and inspect why createdAt lacks a default value; done means subsequent migrations run successfully without the Field 'createdAt' error.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 2.6k
- フォーク
- 524
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sequelize/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/studio#4908 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sugarlabs/musicblocks#8847 ·