← Back to team overview

dhis2-devs team mailing list archive

Re: Discrepancy in table table programstageusergroupaccesses in version 2.29

 

Hi,

Well spotted - the problem here is the NAMES for the column and the
constraints' foreign key - I presume it is supposed to be column
programstageid (not programid) and constraint foreign key programstageid
(not programid). NOTE that both FK constrainst need updating.

i can confirm that the "programid" DATA stored in the
programstageusergroupaccesses table refers to the programstageid values in
the programstaget table, NOT the programid values in the same table.

So submit a JIRA "bug" report for it - I cannot see that it will result in
any failures, but naming conventions should be consistent.

Regards
Calle

On Tue, 28 Aug 2018 at 12:55, Mithilesh Kumar Thakur <
mithilesh.hisp@xxxxxxxxx> wrote:

> Hi,Team
>
> while i am checking database structure of version 2.29 i am see the
> following  discrepancy
>
> in programstageusergroupaccesses table there is two columns  programid
> and usergroupaccessid and  column programid is reference to table
> programstage (programstageid)
>
> please see below the structure of table programstageusergroupaccesses
>
> CREATE TABLE public.programstageusergroupaccesses
> (
>   programid integer NOT NULL,
>   usergroupaccessid integer NOT NULL,
>   CONSTRAINT programstageusergroupaccesses_pkey PRIMARY KEY (programid,
> usergroupaccessid),
>   CONSTRAINT fkbm0pqhdj9xudinnssoxjdgq6b FOREIGN KEY (programid)
>       REFERENCES public.programstage (programstageid) MATCH SIMPLE
>       ON UPDATE NO ACTION ON DELETE NO ACTION,
>   CONSTRAINT fkhrmc5b26i4fv714agdvwm2tly FOREIGN KEY (usergroupaccessid)
>       REFERENCES public.usergroupaccess (usergroupaccessid) MATCH SIMPLE
>       ON UPDATE NO ACTION ON DELETE NO ACTION,
>   CONSTRAINT uk_tcggvcb1rsd9tlnd1ub7mt0e0 UNIQUE (usergroupaccessid)
> )
> WITH (
>   OIDS=FALSE
> );
> ALTER TABLE public.programstageusergroupaccesses
>   OWNER TO dhis;
> --
>
> Thanks and Regards
>
> Mithilesh Kumar Thakur
> _______________________________________________
> 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
>


-- 

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

References