Skip to content

Generate create table script does not work properly when a column is auto increment and primary key #29

@MitchellPuls

Description

@MitchellPuls

When you create a table that has a column that is both auto increment, and a primary key, and you afterwards try to export a create table script from it, it will remove the auto increment part of it.

Steps to reproduce:

  1. Create a table: CREATE TABLE TEST (TEST INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1) PRIMARY KEY);
  2. Verify table in objects view > columns
    image
  3. Right click table TEST > Scripts > Create table script

Expected result: Create table query with a column with both auto increment, and primary key properties
Actual result: Create table query with only a primary key property

This is a property I found now, do not know if other column properties have the same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions