dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33817
Re: What is the purpose of the lockexceptionid in lockexception?
Hi Jason,
you are right, we actually miss a composite constraint on these three
columns. Will add it.
Re primary key, its considered good practice to have a single-column
primary key as it makes the programming easier in many ways.
Lars
On Fri, Oct 31, 2014 at 5:26 AM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:
> I had a request today to deal with some lock exceptions..rather large
> numbers of them. With several hundred facilities, 10 data sets, and 12
> periods, we ended up with many, and it was not really efficient to use the
> user interface for this. So, we created some SQL to inject these into the
> lockexception table. When looking at the table, what is not really clear is
> why there is a separate primary key (lockexceptionid). Why is there a need
> to have multiple orgunit/period/dataset combinations here? It would seem
> that a unique constraint on orgunit/periodid/dataset would be much simpler
> and enforce some integrity as well.
>
> Regards,
> Jason
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+46764147049
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References