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

[Feature request] Can't make a PK AI "signed" it's forcing to create as "unsigned" #3864

Open
thiago-shopper opened this issue May 22, 2020 · 0 comments

Comments

@thiago-shopper
Copy link

Environment

Knex version: 0.20.14
Database + version: mysql 5.8
OS: linux

Feature discussion / request

  1. Explain what is your use case
    I want to create a table with PK AI but not "unsigned" and i checked out that is not possible.
    I think it is related to this part of the code.
    https://github.com/tgriesser/knex/blob/master/lib/dialects/mysql/schema/column.js#L30
    ColumnCompiler_MySQL.prototype.increments = 'int unsigned not null auto_increment primary key';

  2. Explain what kind of feature would support this
    I think it should has a way to force to the column to be signed.

  3. Give some API proposal, how the feature should work
    table.increments('id').signed().primary()

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

1 participant