jkall / qgis-midvatten-plugin

Midvatten plugin for QGIS
23 stars 8 forks source link

w_qual_field/lab duplicate import when unit is NULL (pH) #320

Closed HenrikSpa closed 3 years ago

HenrikSpa commented 5 years ago

When unit is NULL, an otherwise duplicate row can be imported. This happens for pH as unit for pH is NULL.

HenrikSpa commented 3 years ago

This has been fixed using this index:

CREATE UNIQUE INDEX w_qual_field_unit_unique_index_null ON w_qual_field / Index to stop duplicate values where unit is null / (obsid, date_time, parameter, COALESCE(unit, '') );