Skip to content

getQueryInterface().describeTable() doesn't return autoIncrement on MySQL #9826

Closed

Description

@poison

What are you doing?

While querying the table scheme with describeTable(), the autoIncrement value is not returned with the MySQL dialect

CREATE TABLE Users (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
);
    const syntax = await db.getQueryInterface().describeTable('Users');
    console.log(syntax);

What do you expect to happen?

{ id:
   { type: 'BIGINT(20) UNSIGNED',
     allowNull: false,
     defaultValue: null,
     primaryKey: true,
     autoIncrement: true } }

What is actually happening?

{ id:
   { type: 'BIGINT(20) UNSIGNED',
     allowNull: false,
     defaultValue: null,
     primaryKey: true } }

Dialect: mysql
Dialect version: 1.5.3
Database version: 5.7.22
Sequelize version: 4.38.0
Tested with latest release: YES (4.38.0)

It's basically a lack of implementation, I'll submit a PR to this.

Activity

  1. added
    type: feature
    dialect: mysql
    on Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dialect: mysqltype: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions