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

Restoring dumps which contain AUTOINCREMENT columns #8

Open
Timmeey86 opened this issue Mar 9, 2023 · 0 comments
Open

Restoring dumps which contain AUTOINCREMENT columns #8

Timmeey86 opened this issue Mar 9, 2023 · 0 comments

Comments

@Timmeey86
Copy link

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

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