Skip to content

Restoring dumps which contain AUTOINCREMENT columns #8

@Timmeey86

Description

@Timmeey86

Hi, great tool, this is exactly what I'm looking for.

I do however have an issue when using AUTOINCREMENT columns.

If you create a table like this

CREATE TABLE IF NOT EXISTS DummyTable (
    DummyTableId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
);

and insert a row into that table

INSERT INTO DummyTable VALUES(NULL);

the exported dump will contain both the .metadata.json and the .json file of the sqlite_sequence table.

When trying to import that, the import into a new file fails with:

Error: object name reserved for internal use: sqlite_sequence

Importing into an existing file will fail when trying to drop that table.

Updating the table seems to work though, so programming a special case for this to just insert/update any values might work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions