-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Description
Describe the bug
I have an entity that has a signed primary key like so:
@PrimaryKey({ autoincrement: false, type: new BigIntType('bigint'), unsigned: false })`
id!: number;
I am trying to use in another class as a ManyToOne reference, but in the generated migrations, the generated foreign key user_id is of type unsigned so running the migration fails with error Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'message_user_id_foreign' are incompatible (or similar error, in repro the error is a missing index). Am I missing something that can get this working?
Reproduction
https://github.com/HermanFassett/mikro-orm-repro/
What driver are you using?
@mikro-orm/mysql
MikroORM version
6.2.2
Node.js version
20.12.0
Operating system
Windows 10
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Slack.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels