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 bigint #87

Open
mybigman opened this issue Oct 27, 2021 · 1 comment
Open

mysql bigint #87

mybigman opened this issue Oct 27, 2021 · 1 comment

Comments

@mybigman
Copy link

Our vendor databases use bigint as the primary key which is rather annoying.

Out of the box lucid (mysql driver) doesn't appear to support it.

After a few hours of trying to find a solution there is a setting that can be enabled to support this.

connections: {
    mysql: {
      client: 'mysql',
      connection: {
        host: Env.get('MYSQL_HOST'),
        port: Env.get('MYSQL_PORT'),
        user: Env.get('MYSQL_USER'),
        password: Env.get('MYSQL_PASSWORD', ''),
        database: Env.get('MYSQL_DB_NAME'),
        supportBigNumbers: true, // <---- here
      },
      migrations: {
        naturalSort: true,
      },
      healthCheck: false,
      debug: false,
    },
  }

Can you please add this to the documentation regarding supportBigNumbers: true as it would save a lot of headaches.

Thanks

@thetutlage thetutlage transferred this issue from adonisjs/core Oct 27, 2021
@thetutlage
Copy link
Member

Feel free to create a PR for the same :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants