ALTER TABLE ONLY dataapproval
    ADD CONSTRAINT dataapproval_unique_key UNIQUE (dataapprovallevelid, datasetid, periodid, organisationunitid, attributeoptioncomboid);

--
ALTER TABLE ONLY dataelement
    ADD CONSTRAINT dataelement_code_key UNIQUE (code);

--
ALTER TABLE ONLY indicator
    ADD CONSTRAINT indicator_code_key UNIQUE (code);

--
ALTER TABLE ONLY section
    ADD CONSTRAINT key_sectionnamedataset UNIQUE (name, datasetid);

--
ALTER TABLE ONLY organisationunit
    ADD CONSTRAINT organisationunit_code_key UNIQUE (code);

--
ALTER TABLE ONLY orgunitgroup
    ADD CONSTRAINT orgunitgroup_name_key UNIQUE (name);

--
ALTER TABLE ONLY orgunitgroupset
    ADD CONSTRAINT orgunitgroupset_name_key UNIQUE (name);

--
ALTER TABLE ONLY programstagedataelement
    ADD CONSTRAINT programstagedataelement_unique_key UNIQUE (programstageid, dataelementid);

--
ALTER TABLE ONLY translation
    ADD CONSTRAINT translation_composite_key UNIQUE (objectclass, objectuid, locale, objectproperty);

--
ALTER TABLE ONLY validationrule
    ADD CONSTRAINT uk_13x63e3skbl5qj4mc1qgq2xex UNIQUE (code);

--
ALTER TABLE ONLY attribute
    ADD CONSTRAINT uk_1774shfid1uaopl9tu8am19fq UNIQUE (code);

--
ALTER TABLE ONLY optionvalue
    ADD CONSTRAINT uk_18b68rcofdwt1sbr6rf55poog UNIQUE (uid);

--
ALTER TABLE ONLY chartusergroupaccesses
    ADD CONSTRAINT uk_191y3j7pfufwrenbd2h9q3pek UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY dataelementcategory
    ADD CONSTRAINT uk_1ev6xqtcsfr4wv6rel0lkg44n UNIQUE (uid);

--
ALTER TABLE ONLY report
    ADD CONSTRAINT uk_1ie06vhy3begtwuuvrv0f71se UNIQUE (uid);

--
ALTER TABLE ONLY validationrulegroup
    ADD CONSTRAINT uk_1lvk8ftq028jrr28qouou9q3c UNIQUE (code);

--
ALTER TABLE ONLY programstageinstancecomments
    ADD CONSTRAINT uk_1n7xvxj0jupob5f2v86cv8qer UNIQUE (trackedentitycommentid);

--
ALTER TABLE ONLY programusergroupaccesses
    ADD CONSTRAINT uk_1naq88t24viefq6h7lcx3lbx4 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY chart
    ADD CONSTRAINT uk_1sp445tglu49hyfwokjqn5bf6 UNIQUE (uid);

--
ALTER TABLE ONLY dataelementgroupset
    ADD CONSTRAINT uk_1xk8j7j0a3li8o0ukblanosky UNIQUE (name);

--
ALTER TABLE ONLY programstagesection
    ADD CONSTRAINT uk_22wt9yk9idujmywno44v9qf66 UNIQUE (code);

--
ALTER TABLE ONLY programstagedataelement
    ADD CONSTRAINT uk_2ejl9l5vm4rhtqj8eit31g0u6 UNIQUE (code);

--
ALTER TABLE ONLY i18nlocale
    ADD CONSTRAINT uk_2l0ovv74pjtairmeyiwy4i2ui UNIQUE (uid);

--
ALTER TABLE ONLY dataelement
    ADD CONSTRAINT uk_2nhc265rlfu3dlc3qouvjdprl UNIQUE (name);

--
ALTER TABLE ONLY dataapprovallevel
    ADD CONSTRAINT uk_2r18tvmbtksk69j35uxpwej44 UNIQUE (code);

--
ALTER TABLE ONLY map
    ADD CONSTRAINT uk_37l2m3o1xfuagpki90gfh5kqb UNIQUE (code);

--
ALTER TABLE ONLY categorycombo
    ADD CONSTRAINT uk_3a4ee92kxafw85hsopq4qle47 UNIQUE (code);

--
ALTER TABLE ONLY programruleaction
    ADD CONSTRAINT uk_3c2n8db21er764e4skh3qg57w UNIQUE (uid);

--
ALTER TABLE ONLY validationrulegroup
    ADD CONSTRAINT uk_3cl2o6ha8naw5w6my3q4el6gk UNIQUE (name);

--
ALTER TABLE ONLY dashboarditem
    ADD CONSTRAINT uk_3idqsvkpmxpehxqv615s952vd UNIQUE (uid);

--
ALTER TABLE ONLY orgunitgroup
    ADD CONSTRAINT uk_3phvecdmy2msmcpitqifpcy3c UNIQUE (code);

--
ALTER TABLE ONLY dataelement
    ADD CONSTRAINT uk_3r6dr8m9qwa89afngtr43x9jh UNIQUE (uid);

--
ALTER TABLE ONLY categoryoptiongroupsetusergroupaccesses
    ADD CONSTRAINT uk_3tn4w8rs68lpvrdaksbsalta7 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY orgunitgroupsetusergroupaccesses
    ADD CONSTRAINT uk_3uh2stfqjquour25m5gjfdroi UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY trackedentityattributeusergroupaccesses
    ADD CONSTRAINT uk_3va2lo93o5x8of9r244sb0ini UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY report
    ADD CONSTRAINT uk_478bg522jkn8460hkeshlw1j1 UNIQUE (relativeperiodsid);

--
ALTER TABLE ONLY dataelementcategoryoption
    ADD CONSTRAINT uk_4pi5lfmisrt8un89dnb17xrdy UNIQUE (uid);

--
ALTER TABLE ONLY translation
    ADD CONSTRAINT uk_4tswo711nejksm9k8cbmlkj77 UNIQUE (uid);

--
ALTER TABLE ONLY indicatorgroupusergroupaccesses
    ADD CONSTRAINT uk_4wluhhaibua3a52cts7jnrt5b UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY sqlview
    ADD CONSTRAINT uk_50aqn6tun6lt4u3ablvdxgoi6 UNIQUE (code);

--
ALTER TABLE ONLY programindicator
    ADD CONSTRAINT uk_59abitsfd3u0jx4ntrrblven0 UNIQUE (uid);

--
ALTER TABLE ONLY organisationunit
    ADD CONSTRAINT uk_5a5jsn8bx5phnsjnbxc3donn UNIQUE (uuid);

--
ALTER TABLE ONLY metadatafilter
    ADD CONSTRAINT uk_5j9yoodla0votbmjtfy3clgva UNIQUE (code);

--
ALTER TABLE ONLY translation
    ADD CONSTRAINT uk_5ja97bh6qdr10ovrfgvyabaeq UNIQUE (code);

--
ALTER TABLE ONLY orgunitlevel
    ADD CONSTRAINT uk_5km0xiwk0dg7pnoru5yfvqsdo UNIQUE (uid);

--
ALTER TABLE ONLY dataapprovallevel
    ADD CONSTRAINT uk_5mq4bmpyevmr1ddkkopweted1 UNIQUE (name);

--
ALTER TABLE ONLY eventchart
    ADD CONSTRAINT uk_5w429v9hdlvivan4a69x3ntx5 UNIQUE (relativeperiodsid);

--
ALTER TABLE ONLY categoryoptioncombo
    ADD CONSTRAINT uk_60p9gh2un0pb7l9tctfd4o3b3 UNIQUE (code);

--
ALTER TABLE ONLY usergroupattributevalues
    ADD CONSTRAINT uk_61yelmsucg67isxc2habccq57 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY eventchart
    ADD CONSTRAINT uk_679r4uoqpust6h694bed8nrh9 UNIQUE (uid);

--
ALTER TABLE ONLY eventchart
    ADD CONSTRAINT uk_6dyim42vl218i9e9waqrvw36k UNIQUE (code);

--
ALTER TABLE ONLY indicatorusergroupaccesses
    ADD CONSTRAINT uk_6gnwbmpissx2s1manr6bwxriu UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY categoryoptiongroupset
    ADD CONSTRAINT uk_6itpx2frqt3msln8p32rk7qta UNIQUE (uid);

--
ALTER TABLE ONLY indicatorattributevalues
    ADD CONSTRAINT uk_6sq5y5hpb4kqf2fmas69rql3g UNIQUE (attributevalueid);

--
ALTER TABLE ONLY dataelementgroup
    ADD CONSTRAINT uk_6x37lph70r5mh15a71pf1tj17 UNIQUE (shortname);

--
ALTER TABLE ONLY dashboardusergroupaccesses
    ADD CONSTRAINT uk_75d35u3n0i5wea6bevn7v6t3l UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY programvalidation
    ADD CONSTRAINT uk_77crrlh4cbe91h32mnspu2bqx UNIQUE (code);

--
ALTER TABLE ONLY metadatafilter
    ADD CONSTRAINT uk_7esqbdqxkias3jcev9elqks9y UNIQUE (uid);

--
ALTER TABLE ONLY reporttable
    ADD CONSTRAINT uk_7if26yibpw5hn2gjsrn2xst0m UNIQUE (uid);

--
ALTER TABLE ONLY programrule
    ADD CONSTRAINT uk_7odx4uo6s5bg55kt1fxky4a8v UNIQUE (code);

--
ALTER TABLE ONLY relationshiptype
    ADD CONSTRAINT uk_7rnfvkitq6l0kr5ju2slxopfi UNIQUE (uid);

--
ALTER TABLE ONLY programindicator
    ADD CONSTRAINT uk_7udjng39j4ddafjn57r58v7oq UNIQUE (name);

--
ALTER TABLE ONLY optionset
    ADD CONSTRAINT uk_81gfx3yt7ngwmkk0t8qgcovhi UNIQUE (uid);

--
ALTER TABLE ONLY maplegendset
    ADD CONSTRAINT uk_842ips1xb81udqc3dw5uax7u5 UNIQUE (name);

--
ALTER TABLE ONLY validationrulegroup
    ADD CONSTRAINT uk_8alvmsgu0onl4i0a0sqb6mqx UNIQUE (uid);

--
ALTER TABLE ONLY relationshiptype
    ADD CONSTRAINT uk_8d4xrx2gygb4aivpcwrp613hj UNIQUE (name);

--
ALTER TABLE ONLY indicatortype
    ADD CONSTRAINT uk_8dcmrupnoi7hiiom466aoa2y UNIQUE (code);

--
ALTER TABLE ONLY mapview
    ADD CONSTRAINT uk_8eyremdx683wcd9owh1t5jufs UNIQUE (relativeperiodsid);

--
ALTER TABLE ONLY trackedentityattributegroup
    ADD CONSTRAINT uk_8ua8n1965xfvefwmpl7xld6lf UNIQUE (uid);

--
ALTER TABLE ONLY dataelement
    ADD CONSTRAINT uk_94srnunkibylfaxt4knxfn58e UNIQUE (code);

--
ALTER TABLE ONLY constantusergroupaccesses
    ADD CONSTRAINT uk_9a0eh0b7g9invjjs34nuvntkd UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY optionsetusergroupaccesses
    ADD CONSTRAINT uk_9bk8wrffte75y236jgv1pmp81 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY section
    ADD CONSTRAINT uk_9hvlbsw019hscf35xb5behfx9 UNIQUE (code);

--
ALTER TABLE ONLY i18nlocale
    ADD CONSTRAINT uk_9j6xjgegveyc0uqs506yy2wrp UNIQUE (locale);

--
ALTER TABLE ONLY attribute
    ADD CONSTRAINT uk_9mqbhximifdn1n8ru52lan3fw UNIQUE (uid);

--
ALTER TABLE ONLY chart
    ADD CONSTRAINT uk_9nbu5m63pd0n13liu13i3nvb5 UNIQUE (relativeperiodsid);

--
ALTER TABLE ONLY validationrule
    ADD CONSTRAINT uk_9ut6k8m3216v5kjcryy7d2y9w UNIQUE (name);

--
ALTER TABLE ONLY section
    ADD CONSTRAINT uk_a50otc0l2chm0heii6scpit4k UNIQUE (uid);

--
ALTER TABLE ONLY indicatorgroupset
    ADD CONSTRAINT uk_actuoxkkqulslxjpj5hagib9r UNIQUE (code);

--
ALTER TABLE ONLY dataelementgroup
    ADD CONSTRAINT uk_aqbaj76r9qxmnylr6p8kj9g37 UNIQUE (name);

--
ALTER TABLE ONLY reportusergroupaccesses
    ADD CONSTRAINT uk_asp8ntgg2muwvqbs60qnm1vq7 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY constant
    ADD CONSTRAINT uk_aygjfui3fpgrsxbj6qj782h6f UNIQUE (shortname);

--
ALTER TABLE ONLY dataset
    ADD CONSTRAINT uk_ayk5ey2r1fh1akknxtpcpyp9r UNIQUE (uid);

--
ALTER TABLE ONLY trackedentity
    ADD CONSTRAINT uk_b0aojuanxabfuylrbc2k6xk20 UNIQUE (name);

--
ALTER TABLE ONLY dataelementcategory
    ADD CONSTRAINT uk_b0ii4jdfy88pffbapohsr2lor UNIQUE (name);

--
ALTER TABLE ONLY reporttable
    ADD CONSTRAINT uk_b39cpkfasrbt96274tbaedtmp UNIQUE (relativeperiodsid);

--
ALTER TABLE ONLY programstage
    ADD CONSTRAINT uk_b3oan3noe4cj9dvyi0amofndv UNIQUE (uid);

--
ALTER TABLE ONLY users
    ADD CONSTRAINT uk_badofxhbq3oi2d4u7fj8w1kt8 UNIQUE (openid);

--
ALTER TABLE ONLY categoryoptiongroupset
    ADD CONSTRAINT uk_bjs0n874pj6eoag98jmeidy9a UNIQUE (code);

--
ALTER TABLE ONLY maplegendset
    ADD CONSTRAINT uk_bv71u83esume24hp4gsaj5p4f UNIQUE (code);

--
ALTER TABLE ONLY organisationunitattributevalues
    ADD CONSTRAINT uk_c7e1q9b728qh7iki2cvdbpfrb UNIQUE (attributevalueid);

--
ALTER TABLE ONLY dashboarditem
    ADD CONSTRAINT uk_c8bnosb06cchme5sig7b54uot UNIQUE (code);

--
ALTER TABLE ONLY programrulevariable
    ADD CONSTRAINT uk_cto4jvd9q49voite13v0egy3i UNIQUE (code);

--
ALTER TABLE ONLY programinstance
    ADD CONSTRAINT uk_d3lsa2h8me94ksyp53l6rpe3g UNIQUE (uid);

--
ALTER TABLE ONLY validationcriteria
    ADD CONSTRAINT uk_d4l5rkqnmc6qdfa6hh11g3h74 UNIQUE (name);

--
ALTER TABLE ONLY dataelementgroupusergroupaccesses
    ADD CONSTRAINT uk_dfbmp0sfgkcpxtwrfw2rejumg UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY categorycombo
    ADD CONSTRAINT uk_dlhi39gmt2e0dun73f04w7w7u UNIQUE (uid);

--
ALTER TABLE ONLY programindicator
    ADD CONSTRAINT uk_do17h5nk71uvc3xjry6kgevj9 UNIQUE (code);

--
ALTER TABLE ONLY systemsetting
    ADD CONSTRAINT uk_do99wgsyk5wflbhb937u5av8m UNIQUE (name);

--
ALTER TABLE ONLY maplayer
    ADD CONSTRAINT uk_dp5tf46w1wmujd4tnvk82f99y UNIQUE (uid);

--
ALTER TABLE ONLY dataelementusergroupaccesses
    ADD CONSTRAINT uk_dq1cneyi4cgarkqaspifgmjqn UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY validationcriteria
    ADD CONSTRAINT uk_dvxv0mw5bonk4pb38o8rctku3 UNIQUE (uid);

--
ALTER TABLE ONLY programrulevariable
    ADD CONSTRAINT uk_e5mhmtj1h7xdfiio2panhapgg UNIQUE (uid);

--
ALTER TABLE ONLY programstage
    ADD CONSTRAINT uk_e6s6o9jau6tx04m62t7ey4i81 UNIQUE (code);

--
ALTER TABLE ONLY trackedentityattributeattributevalues
    ADD CONSTRAINT uk_eb7jbyiwhse2kd64y3ufee977 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY maplegendset
    ADD CONSTRAINT uk_ec7ehyocpresxxhm7yjstdnwt UNIQUE (uid);

--
ALTER TABLE ONLY constant
    ADD CONSTRAINT uk_edy7cktu2fqg01r3n0fjyk1kk UNIQUE (code);

--
ALTER TABLE ONLY trackedentityattribute
    ADD CONSTRAINT uk_eh4c3whbwi94nhh772q6l5t7m UNIQUE (code);

--
ALTER TABLE ONLY organisationunit
    ADD CONSTRAINT uk_ehl4v33tq7hlkmc28vbno1b4n UNIQUE (code);

--
ALTER TABLE ONLY usergroup
    ADD CONSTRAINT uk_ekb018cvmpvll5dgtn97leerj UNIQUE (uid);

--
ALTER TABLE ONLY document
    ADD CONSTRAINT uk_elt3kiqdmmm5fwqfxsxk9lvh0 UNIQUE (code);

--
ALTER TABLE ONLY version
    ADD CONSTRAINT uk_emoyyyy114ofh6cwo6do8xsi0 UNIQUE (versionkey);

--
ALTER TABLE ONLY dashboard
    ADD CONSTRAINT uk_emyh4fed0f1kknqhimmrhnek8 UNIQUE (code);

--
ALTER TABLE ONLY dataapprovallevelusergroupaccesses
    ADD CONSTRAINT uk_eol69wovoy6rdsf83affs376e UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY eventreport
    ADD CONSTRAINT uk_eqd95mucf5pd856dqlwe6y36c UNIQUE (code);

--
ALTER TABLE ONLY smscommandspecialcharacters
    ADD CONSTRAINT uk_etm1elt7pbwyia8e0kfnrvqo3 UNIQUE (specialcharacterid);

--
ALTER TABLE ONLY trackedentityattribute
    ADD CONSTRAINT uk_evp7d8obarxt3kewepigkwahc UNIQUE (name);

--
ALTER TABLE ONLY chart
    ADD CONSTRAINT uk_eyke73kujhkth5elabmkpy4ca UNIQUE (code);

--
ALTER TABLE ONLY metadatafilter
    ADD CONSTRAINT uk_f1lcs0g7sjp18kn76owjsf2hv UNIQUE (name);

--
ALTER TABLE ONLY programruleaction
    ADD CONSTRAINT uk_fbferisvig2o4f5owb5lnygf3 UNIQUE (code);

--
ALTER TABLE ONLY userrole
    ADD CONSTRAINT uk_ff1da38in40mg91rlgqhw02ff UNIQUE (uid);

--
ALTER TABLE ONLY dataelementgroupattributevalues
    ADD CONSTRAINT uk_fokuy0yq9krttmqaf95ne7ql7 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY sqlview
    ADD CONSTRAINT uk_fps2ja521pudngaitlp0805du UNIQUE (uid);

--
ALTER TABLE ONLY orgunitgroupset
    ADD CONSTRAINT uk_fuentbuhbbr0ix49td9jqlfe5 UNIQUE (uid);

--
ALTER TABLE ONLY program
    ADD CONSTRAINT uk_fuq6kda6folarp19oggaf02vb UNIQUE (code);

--
ALTER TABLE ONLY orgunitlevel
    ADD CONSTRAINT uk_fvgc7isaflcan55g51ysm9df2 UNIQUE (code);

--
ALTER TABLE ONLY oauth2client
    ADD CONSTRAINT uk_fx3xx9xe0xpurjt6v5p7rv8da UNIQUE (uid);

--
ALTER TABLE ONLY trackedentity
    ADD CONSTRAINT uk_fymtho48lmccwmlag2amy7gc1 UNIQUE (uid);

--
ALTER TABLE ONLY organisationunit
    ADD CONSTRAINT uk_g1nrfjv5x04ap1ceohiwah380 UNIQUE (uid);

--
ALTER TABLE ONLY maplayer
    ADD CONSTRAINT uk_g51ij19h9pv4bythd05ajm284 UNIQUE (name);

--
ALTER TABLE ONLY dataelementgroupsetusergroupaccesses
    ADD CONSTRAINT uk_g7l1v9ghhdmxbyagk6s61ym27 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY dataelementcategoryoptionusergroupaccesses
    ADD CONSTRAINT uk_gdawhakuh5sgetn8agy2y8iqs UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY oauth2client
    ADD CONSTRAINT uk_gdfuf3j66jxnvwwnksjxqysac UNIQUE (code);

--
ALTER TABLE ONLY categoryoptiongroup
    ADD CONSTRAINT uk_ge3y4pf6qlne9p7rfmhlvg941 UNIQUE (code);

--
ALTER TABLE ONLY trackedentityattribute
    ADD CONSTRAINT uk_gg9gc0pyaqjuxi8mr4y93i03w UNIQUE (shortname);

--
ALTER TABLE ONLY dataelementcategoryusergroupaccesses
    ADD CONSTRAINT uk_gi1od6nead01u7wxu6h10k76j UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY relationshiptype
    ADD CONSTRAINT uk_gio4nn8l23jikmebud3jwql43 UNIQUE (code);

--
ALTER TABLE ONLY userinfo
    ADD CONSTRAINT uk_gky85ptfkcumyuqhr5yvjxwsa UNIQUE (code);

--
ALTER TABLE ONLY map
    ADD CONSTRAINT uk_grp9b5jne53f806pc92sfd5s8 UNIQUE (uid);

--
ALTER TABLE ONLY programstageinstance
    ADD CONSTRAINT uk_gy44hufdeduoma7eeh3j6abm7 UNIQUE (uid);

--
ALTER TABLE ONLY userroleusergroupaccesses
    ADD CONSTRAINT uk_h3qgkg0gvi3c0ohs07y00c96p UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY program
    ADD CONSTRAINT uk_h4omjcs2ktifdrf2m36u886ae UNIQUE (uid);

--
ALTER TABLE ONLY categorycombo
    ADD CONSTRAINT uk_h97pko7n41oky8pfptkflp8l6 UNIQUE (name);

--
ALTER TABLE ONLY dataelementattributevalues
    ADD CONSTRAINT uk_hbpqcltj8paday3y0yystbw6p UNIQUE (attributevalueid);

--
ALTER TABLE ONLY userrole
    ADD CONSTRAINT uk_hebhkhm8gpwg9xsp8q4f7wlx1 UNIQUE (code);

--
ALTER TABLE ONLY userrole
    ADD CONSTRAINT uk_hjocbvo9fla04bgj7ku32vwsn UNIQUE (name);

--
ALTER TABLE ONLY attribute
    ADD CONSTRAINT uk_hpwum0iq12fs4ej5d0tgy6wsn UNIQUE (name);

--
ALTER TABLE ONLY dataapprovallevel
    ADD CONSTRAINT uk_hqekpuhjg3g4k4t7xdnu10jy4 UNIQUE (orgunitlevel, categoryoptiongroupsetid);

--
ALTER TABLE ONLY orgunitgroupset
    ADD CONSTRAINT uk_hs57i9hma97ps6jpsrbb24lm9 UNIQUE (code);

--
ALTER TABLE ONLY dataapprovallevel
    ADD CONSTRAINT uk_i1uhc0c8jgxkhlswl9fujsicf UNIQUE (uid);

--
ALTER TABLE ONLY trackedentityinstancereminder
    ADD CONSTRAINT uk_i5fq2uvmldylk7kkwxhmap5d1 UNIQUE (uid);

--
ALTER TABLE ONLY programvalidation
    ADD CONSTRAINT uk_i8fi14r4cfuvmqhaai5w1x6fl UNIQUE (name);

--
ALTER TABLE ONLY maplegend
    ADD CONSTRAINT uk_id4stsb5slq35axmjeojnjnoa UNIQUE (code);

--
ALTER TABLE ONLY sqlview
    ADD CONSTRAINT uk_iedy6hh42wl3gr3m87ntd6so8 UNIQUE (name);

--
ALTER TABLE ONLY messageconversation_usermessages
    ADD CONSTRAINT uk_j5pi1qwi2m228qrsxql48o61s UNIQUE (usermessageid);

--
ALTER TABLE ONLY categoryoptiongroup
    ADD CONSTRAINT uk_j9oya1t1tvj8yn5h8fega4ltr UNIQUE (name);

--
ALTER TABLE ONLY dataelement
    ADD CONSTRAINT uk_jc27pe1xeptws5xprct7mgxrj UNIQUE (shortname);

--
ALTER TABLE ONLY orgunitlevel
    ADD CONSTRAINT uk_jfy289hg8eudoop91b1496ba3 UNIQUE (name);

--
ALTER TABLE ONLY orgunitgroupattributevalues
    ADD CONSTRAINT uk_jga8ebd6t2nkrfcapucx1wcbq UNIQUE (attributevalueid);

--
ALTER TABLE ONLY programvalidation
    ADD CONSTRAINT uk_ji8e92141qdirt8ycldqfkkb9 UNIQUE (uid);

--
ALTER TABLE ONLY dataelementgroup
    ADD CONSTRAINT uk_jo65jc3wyrxfekiu3upk80mtr UNIQUE (code);

--
ALTER TABLE ONLY document
    ADD CONSTRAINT uk_jxodv1lvot26euasttk021jio UNIQUE (uid);

--
ALTER TABLE ONLY interpretation_comments
    ADD CONSTRAINT uk_k48tayhxu52jiq782pikev9d9 UNIQUE (interpretationcommentid);

--
ALTER TABLE ONLY trackedentityattribute
    ADD CONSTRAINT uk_kbqnrdakcjfooofmti30d4p8x UNIQUE (uid);

--
ALTER TABLE ONLY report
    ADD CONSTRAINT uk_kc1wmcky1ooleovi36oqcqmqe UNIQUE (code);

--
ALTER TABLE ONLY categoryoptiongroupset
    ADD CONSTRAINT uk_ke8p30sy68dl7fggednkimdb6 UNIQUE (name);

--
ALTER TABLE ONLY indicatorgroupsetusergroupaccesses
    ADD CONSTRAINT uk_kk6o2c0eb5bex4sn1p5n7juu5 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY validationrulegroupusergroupaccesses
    ADD CONSTRAINT uk_klp41jyfuo6kfe8akt58fk1am UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY indicator
    ADD CONSTRAINT uk_kmpefoaw81v4bxpoey6y1y3xl UNIQUE (code);

--
ALTER TABLE ONLY indicatorgroup
    ADD CONSTRAINT uk_kqbwxccoqctky1kdkimjya03s UNIQUE (uid);

--
ALTER TABLE ONLY eventchartusergroupaccesses
    ADD CONSTRAINT uk_krfvmvcrf3agy0jlmbh7n2kvb UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY i18nlocale
    ADD CONSTRAINT uk_krm9w69donjqsejkmfw17jbcx UNIQUE (code);

--
ALTER TABLE ONLY categoryoptiongroupusergroupaccesses
    ADD CONSTRAINT uk_kw8ong945syafd2310ahwfu9l UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY orgunitgroupsetattributevalues
    ADD CONSTRAINT uk_l1cufoqirp2onveti3bpuyo92 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY maplayer
    ADD CONSTRAINT uk_l4rldmsxivwmlhg2xt9bn0k25 UNIQUE (code);

--
ALTER TABLE ONLY programattributevalues
    ADD CONSTRAINT uk_ldbbgacwc69ab5tha0u7dhg82 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY eventreport
    ADD CONSTRAINT uk_lnnx8vmalkhkmneryv1ytjq68 UNIQUE (uid);

--
ALTER TABLE ONLY categoryoptiongroup
    ADD CONSTRAINT uk_lrnagoy2wi83nwmataolh7t6d UNIQUE (shortname);

--
ALTER TABLE ONLY orgunitgroup
    ADD CONSTRAINT uk_lswbn93sime7vmdqqe9lks7ge UNIQUE (uid);

--
ALTER TABLE ONLY orgunitlevel
    ADD CONSTRAINT uk_ltwhby0s0iwayxrcdu6yefeqt UNIQUE (level);

--
ALTER TABLE ONLY dataelementgroupset
    ADD CONSTRAINT uk_lu295rc1y01c7p7t76y6ajaas UNIQUE (uid);

--
ALTER TABLE ONLY reporttable
    ADD CONSTRAINT uk_lvk31hlxg4sl301nxyt1iupd6 UNIQUE (code);

--
ALTER TABLE ONLY programinstancecomments
    ADD CONSTRAINT uk_lwep604j10w1ey7vunqdmotx2 UNIQUE (trackedentitycommentid);

--
ALTER TABLE ONLY programstagesection
    ADD CONSTRAINT uk_lycal9jdw3cs0wwebxciswwgr UNIQUE (uid);

--
ALTER TABLE ONLY dataelementcategoryoption
    ADD CONSTRAINT uk_mlop2afk26fwowa69lr9a138y UNIQUE (code);

--
ALTER TABLE ONLY dashboard
    ADD CONSTRAINT uk_myox13mr8r27oxl7ts33ntpd5 UNIQUE (uid);

--
ALTER TABLE ONLY indicatorgroupset
    ADD CONSTRAINT uk_n4xputyk31femiaxls6lbl2rw UNIQUE (uid);

--
ALTER TABLE ONLY indicatortype
    ADD CONSTRAINT uk_n8mbmryeksa80ucyxj0vg6p9b UNIQUE (name);

--
ALTER TABLE ONLY oauth2client
    ADD CONSTRAINT uk_ni7epmbxtn4jcax3ya324ff9w UNIQUE (cid);

--
ALTER TABLE ONLY messageconversation_messages
    ADD CONSTRAINT uk_nqdtggpr548q0tnbu919puw0p UNIQUE (messageid);

--
ALTER TABLE ONLY oauth2client
    ADD CONSTRAINT uk_nwgvrevv2slj1bvc9m01p89lf UNIQUE (name);

--
ALTER TABLE ONLY trackedentityattributegroup
    ADD CONSTRAINT uk_nwomu20vyjce2jxwdjdfx29lx UNIQUE (name);

--
ALTER TABLE ONLY constant
    ADD CONSTRAINT uk_nywvip5682tuvxrnwjomeyg6y UNIQUE (uid);

--
ALTER TABLE ONLY constant
    ADD CONSTRAINT uk_o2xbcli806eba6dkdfco0o3kc UNIQUE (name);

--
ALTER TABLE ONLY trackedentityattributegroup
    ADD CONSTRAINT uk_oaeinmk3jp70e5pkrffra5oak UNIQUE (code);

--
ALTER TABLE ONLY dataset
    ADD CONSTRAINT uk_oeni5ndit5g033f1s1j08bdry UNIQUE (code);

--
ALTER TABLE ONLY sqlviewusergroupaccesses
    ADD CONSTRAINT uk_og1fdqhhylbk69fxpoth4bd36 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY eventreportusergroupaccesses
    ADD CONSTRAINT uk_oith7i266qbjggmij30psueoo UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY categoryoptiongroup
    ADD CONSTRAINT uk_ol8n7oq6clgxvqjedlpn85aqo UNIQUE (uid);

--
ALTER TABLE ONLY trackedentityinstance
    ADD CONSTRAINT uk_orq3pwtro2yu9yydh046bn40j UNIQUE (code);

--
ALTER TABLE ONLY programstagedataelement
    ADD CONSTRAINT uk_os4r1umsvtmbuqm2bo25s5ej0 UNIQUE (uid);

--
ALTER TABLE ONLY dataelementgroup
    ADD CONSTRAINT uk_otvwcgv4bxjtqfj3flhrnmgf7 UNIQUE (uid);

--
ALTER TABLE ONLY indicatortype
    ADD CONSTRAINT uk_p0p3bwhgbsdemu14v23p47qne UNIQUE (uid);

--
ALTER TABLE ONLY optionset
    ADD CONSTRAINT uk_p0rvldurcmk0x3mx39lt5uvsd UNIQUE (name);

--
ALTER TABLE ONLY programrule
    ADD CONSTRAINT uk_p7arcbl58mmcrj2didtr0ruqh UNIQUE (uid);

--
ALTER TABLE ONLY dataelementgroupset
    ADD CONSTRAINT uk_p7egnv3sj4ugyl23mk4vga40k UNIQUE (code);

--
ALTER TABLE ONLY dataentryform
    ADD CONSTRAINT uk_p8tvo9tqrdn5tb45d0g5cko5o UNIQUE (name);

--
ALTER TABLE ONLY categorycombousergroupaccesses
    ADD CONSTRAINT uk_p95o4dnytx8vxb7yugxlu2hhf UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY mapusergroupaccesses
    ADD CONSTRAINT uk_pag45qp5gr17svxsntj5tjw66 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY dataelementcategoryoption
    ADD CONSTRAINT uk_pbj3u1nk9vnuof8f47utvowmv UNIQUE (name);

--
ALTER TABLE ONLY dataelementcategory
    ADD CONSTRAINT uk_pw87bi64e3ev11k7dwrmljo78 UNIQUE (code);

--
ALTER TABLE ONLY eventreport
    ADD CONSTRAINT uk_q0oyainj1lis9c8kkh5sky2ri UNIQUE (relativeperiodsid);

--
ALTER TABLE ONLY usergroup
    ADD CONSTRAINT uk_q20sh82vk885ooi7fekwtboej UNIQUE (code);

--
ALTER TABLE ONLY userattributevalues
    ADD CONSTRAINT uk_q2mhld3431cikld8ocnognnl3 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY usergroupusergroupaccesses
    ADD CONSTRAINT uk_qa5c4eva4rxafw5b7eyddp64m UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY indicatorgroupattributevalues
    ADD CONSTRAINT uk_qaqvbi3rmqrmsesdwr2dkltwd UNIQUE (attributevalueid);

--
ALTER TABLE ONLY interpretationusergroupaccesses
    ADD CONSTRAINT uk_qba465kdmkyxal2f05g3f1f94 UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY i18nlocale
    ADD CONSTRAINT uk_qogg9a7yy4qconomxt4j4upql UNIQUE (name);

--
ALTER TABLE ONLY dataelementcategoryoption
    ADD CONSTRAINT uk_qp9201a4m6jl53sei0huh4l6s UNIQUE (shortname);

--
ALTER TABLE ONLY orgunitgroup
    ADD CONSTRAINT uk_qwk9qdapql867enp5r7fa0uic UNIQUE (name);

--
ALTER TABLE ONLY orgunitgroupusergroupaccesses
    ADD CONSTRAINT uk_r0njvkxgdxior87ay09qxvd4g UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY users
    ADD CONSTRAINT uk_r43af9ap4edm43mmtq01oddj6 UNIQUE (username);

--
ALTER TABLE ONLY trackedentity
    ADD CONSTRAINT uk_r7hbkahkkbgfg9xtxlp9mhq3q UNIQUE (code);

--
ALTER TABLE ONLY trackedentityinstance
    ADD CONSTRAINT uk_rbr4kyuk4s0kb4jo1r77cuaq9 UNIQUE (uid);

--
ALTER TABLE ONLY caseaggregationcondition
    ADD CONSTRAINT uk_reg868y2sf1u7nqeedx44sl9c UNIQUE (name);

--
ALTER TABLE ONLY datasetattributevalues
    ADD CONSTRAINT uk_rh1jwubao1t728iys0662k7go UNIQUE (attributevalueid);

--
ALTER TABLE ONLY documentusergroupaccesses
    ADD CONSTRAINT uk_rtty45gvm30id8sglrlmacatq UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY optionset
    ADD CONSTRAINT uk_rvfiukug5ui7qidoiln3el3aa UNIQUE (code);

--
ALTER TABLE ONLY datasetusergroupaccesses
    ADD CONSTRAINT uk_sc8477b26totcch3j096m2n2y UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY trackedentityinstancereminder
    ADD CONSTRAINT uk_scct22hvsdg7ulw7c1mlqivk4 UNIQUE (code);

--
ALTER TABLE ONLY validationcriteria
    ADD CONSTRAINT uk_skin40axv0jcme3bhsbb7156i UNIQUE (code);

--
ALTER TABLE ONLY trackedentityattributevalues
    ADD CONSTRAINT uk_smv9qylxikotjgjc26t86ps4w UNIQUE (attributevalueid);

--
ALTER TABLE ONLY caseaggregationcondition
    ADD CONSTRAINT uk_snvmtdujf8utme36jqx2g1dwe UNIQUE (code);

--
ALTER TABLE ONLY indicatorgroup
    ADD CONSTRAINT uk_sspviu4m0l0lf7ef3t3cagfxd UNIQUE (code);

--
ALTER TABLE ONLY validationrule
    ADD CONSTRAINT uk_t0dg39dopew9f6y64ucsx7194 UNIQUE (uid);

--
ALTER TABLE ONLY orgunitgroup
    ADD CONSTRAINT uk_t0srkng3akwg3pcp5qlwcx06n UNIQUE (shortname);

--
ALTER TABLE ONLY orgunitgroupset
    ADD CONSTRAINT uk_t5lxvc1km3ylon5st1fuabsgl UNIQUE (name);

--
ALTER TABLE ONLY smscommandcodes
    ADD CONSTRAINT uk_t9e1mnpydje0rsvinxq68q1i6 UNIQUE (codeid);

--
ALTER TABLE ONLY indicator
    ADD CONSTRAINT uk_ta80keoi67443tkvvmx8l872x UNIQUE (uid);

--
ALTER TABLE ONLY period
    ADD CONSTRAINT uk_tbkbjga8h4j5u33d7hbcuk66t UNIQUE (periodtypeid, startdate, enddate);

--
ALTER TABLE ONLY reporttableusergroupaccesses
    ADD CONSTRAINT uk_tbro727eo15qmn3ghlhoyifih UNIQUE (usergroupaccessid);

--
ALTER TABLE ONLY programstageattributevalues
    ADD CONSTRAINT uk_tcx1w0yoc6k0h8qnagg18eqs6 UNIQUE (attributevalueid);

--
ALTER TABLE ONLY caseaggregationcondition
    ADD CONSTRAINT uk_toc5okc2yqhceyw6jg3rk36lo UNIQUE (uid);

--
ALTER TABLE ONLY version
    ADD CONSTRAINT version_versionkey_key UNIQUE (versionkey);

--

CREATE UNIQUE INDEX dataapproval_unique ON dataapproval USING btree (datasetid, periodid, organisationunitid, attributeoptioncomboid, dataapprovallevelid);

