Bug report #17992

DB Manager Versioning: _current view lacks primary key

Added by Paolo Cavallini about 6 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:DB Manager
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25888

Description

The Versioning / Change logging automatically creates a view with the current elements. Unfortunately, in the view it is not included the `id_hist`, but only the `id`, which can be duplicated, e.g. in case of a split polygon.
As a consequence, the view cannot be loaded.
I suggest to simply add `id_hist` to the view.
The fix can be easily backported to 2.18.

History

#1 Updated by Paolo Cavallini about 6 years ago

See also #14013

#2 Updated by Giovanni Manghi about 6 years ago

  • Affected QGIS version changed from master to 3.0.0

PLEASE UPDATE THE AFFECTED VERSION!

#3 Updated by Loïc BARTOLETTI over 5 years ago

Should be closed? Now you can define the name of PK (and others)

#4 Updated by Paolo Cavallini over 5 years ago

AFAICT this is still valid: in the view simply there is not a PK, it's not a matter of its name.

#5 Updated by Giovanni Manghi over 5 years ago

Paolo Cavallini wrote:

AFAICT this is still valid: in the view simply there is not a PK, it's not a matter of its name.

checked on master? if yes change the affected version.

#6 Updated by Paolo Cavallini over 5 years ago

  • Affected QGIS version changed from 3.0.0 to 3.3(master)

Confirmed

Also available in: Atom PDF