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

Mysql not insert 0 to column #16877

Closed
3 of 6 tasks
keitetran opened this issue Dec 15, 2023 · 1 comment
Closed
3 of 6 tasks

Mysql not insert 0 to column #16877

keitetran opened this issue Dec 15, 2023 · 1 comment
Labels
pending-approval Bug reports that have not been verified yet, or feature requests that have not been accepted yet type: bug

Comments

@keitetran
Copy link

keitetran commented Dec 15, 2023

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

Mysql not insert 0 to column

In 500 record, but 20 record not work

Model:

access_d: {
  type: DataTypes.STRING(2),
  allowNull: false,
  primaryKey: true,
  comment: "日"
},

Nodejs code:

_data = {
  access_d: "01" // Error from 01 - 09
};
logger.debug("Insert data:", _data)
return db[_table].create(_data, {
  transaction: tx
});

SQL log

{"timestamp":"2021/12/09 10:04:07.818","type":"sql","level":"verbose","message":"eUsTc Executing (f3b0a8cd-e596-4e33-b220-84e4a57f4676): INSERT INTO `table name` (`access_ym`,`access_d`) VALUES (?,?);"}

Create method is worked, i'm insert debug code befor create method. Create data no problem.
But i got wrong data on database

image

How to debug it ? :(

Thank you very much.

Environment

  • Sequelize version: 6.32.1
  • Node.js version: 20.10.0
  • Database & Version: Mysql 8.2

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.

@keitetran keitetran added pending-approval Bug reports that have not been verified yet, or feature requests that have not been accepted yet type: bug labels Dec 15, 2023
@ephys
Copy link
Member

ephys commented Jan 30, 2024

Very sorry but we won't be able to help you without a reproducible example built on something like https://github.com/sequelize/sequelize-sscce

@ephys ephys closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-approval Bug reports that have not been verified yet, or feature requests that have not been accepted yet type: bug
Projects
None yet
Development

No branches or pull requests

2 participants