Skip to content

The generated "Create Code" for a table in a sqlite database is invalid #2589

Description

@Virock

Description

I created a table "Recents" in an sqlite database using the app, and the generated sql is the following (I removed the quotation marks):

CREATE TABLE Recents (
  id INTEGER NOT NULL AUTO_INCREMENT,
  path TEXT NOT NULL,
  accessTime INTEGER NOT NULL,
  PRIMARY KEY (id)
);
CREATE INDEX accessTime ON Recents (accessTime);

But this is invalid sql for sqlite.
The correct sql would be:

CREATE TABLE Recents (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    path TEXT NOT NULL,
    accessTime INTEGER NOT NULL
);

CREATE INDEX accessTime ON Recents (accessTime);

Can you please fix the system that generated the "Create Code"

HeidiSQL version and OS

12.21.0.7346 Windows

Database server version

Sqlite

Reproduction recipe

Create a table using the app gui in an sqlite database that would have the configuration as in the description form above.

Error/Backtrace

Activity

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

    bugDefective behaviour in HeidiSQL

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions