Dbeaver does not detect unique key on a table despite primary key being present

See original GitHub issue

System information:

  • win10 x64
  • dbeaver 6.1.1

Connection specification:

  • org.sqlite.JDBC 3.28.0

Describe the problem you’re observing:

I am trying to remove a record from sqlite database. I use dbeaver program for all operations. So when the action is performed, following error is shown:

No unique key is defined

Steps to reproduce, if exist:

Query for table creation was this:

CREATE TABLE betGroups ( 
id INTEGER PRIMARY KEY AUTOINCREMENT, 
betgroupstatus INTEGER NOT NULL,
dateInserted DATETIME DEFAULT CURRENT_TIMESTAMP)

Insert some dummy data. Then I select a record in “data” view. Press “delete” on a keyboard. and then click “save” button below. First the warning is shown that no physical unique key is found, so he program suggests to use ALL ROW as a key. If I press cancel, then the above mentioned error is shown.

image

image

However, If we check the unique keys tab - we will see that a unique key is present as well as the primary key.

image

image

So as far as Sqlite database is concerned - unique key exists, bu the program fails to detect it for some reason during manual delete operation. Please investigate.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Jul 24, 2019

Now I’ve reproduced this. Thanks for detailed bug report

0reactions
kseniiaguzeevacommented, Jul 29, 2019

Verified

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sqlite does not detect unique key on a table despite primary ...
Currently DBeaver doesn't use unique keys with nullable columns. I believe we should use them in SQLite at least.
Read more >
Problem with a foreign key referencing a primary key which is ...
I created the foreign keys using DBeaver. Although I selected PRIMARY as the unique key, in the list of foreign keys it always...
Read more >
How to find the Primary & Foreign Keys & How to access ...
The RowId can be overridden by creating an Index on a property of the class and assigning it the attributes [Unique, PrimaryKey, IDKey]....
Read more >
PostgreSQL unique key - DBeaver Forum • View topic
Currently PostgreSQL driver is based on Generic extension which supports just entities provided by JDBC API.
Read more >
DBeaver user guide
If the check is not disabled and a new version is available, it will ... a table must have some unique key (primary...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found