· 4 years ago · Aug 21, 2021, 07:32 PM
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 13.3
6-- Dumped by pg_dump version 13.3
7
8ALTER TABLE IF EXISTS ONLY public.problem DROP CONSTRAINT IF EXISTS fktr577ncqihhdqswh9vybiyu5p;
9ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS fktmhe8xs412gedmlq55viwxsj9;
10ALTER TABLE IF EXISTS ONLY public.measure DROP CONSTRAINT IF EXISTS fkteeww2f0o1d59chvgwun8if09;
11ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS fktdwu913dof8jdsjlpni0ka6rk;
12ALTER TABLE IF EXISTS ONLY public.message DROP CONSTRAINT IF EXISTS fkt4gjpvxlwdkb0tonr9pd5ftw1;
13ALTER TABLE IF EXISTS ONLY public.problem_strategy_goals DROP CONSTRAINT IF EXISTS fkstyu3sixwtehlj8k8fuj9mp3v;
14ALTER TABLE IF EXISTS ONLY public.institution_tags DROP CONSTRAINT IF EXISTS fkss7p56403bnvx1gd7mr1rx6a0;
15ALTER TABLE IF EXISTS ONLY public.public_year_report DROP CONSTRAINT IF EXISTS fkqwvv3aqjkwn8twe0lln9fg00e;
16ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fkqouep5jrfvaw2eq1xyo68gguh;
17ALTER TABLE IF EXISTS ONLY public.evaluation_indicator_reports DROP CONSTRAINT IF EXISTS fkqhagauv7sft500sdfb3v6d6qy;
18ALTER TABLE IF EXISTS ONLY public.request_for_evaluation DROP CONSTRAINT IF EXISTS fkqgd7d6529gye3ihjisoxk4eng;
19ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fkqf88nl5cfi98qk6uike3rhor2;
20ALTER TABLE IF EXISTS ONLY public.announcement DROP CONSTRAINT IF EXISTS fkq7dop4xcpmiu4o5r8vfpnnk7u;
21ALTER TABLE IF EXISTS ONLY public.announcement_comment DROP CONSTRAINT IF EXISTS fkq51tsi60v4ntn8819fh9jtxgy;
22ALTER TABLE IF EXISTS ONLY public.measure DROP CONSTRAINT IF EXISTS fkpvvfpfv0k5uw7ph1x3juwox2r;
23ALTER TABLE IF EXISTS ONLY public.naparea_type DROP CONSTRAINT IF EXISTS fkpu4bewii6l166vikvcg53r4po;
24ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS fkp81f9agxu6vxixeaw9aafgftp;
25ALTER TABLE IF EXISTS ONLY public.area_of_interest DROP CONSTRAINT IF EXISTS fkp3w9hyijuj7eoetbdaqqm0wa1;
26ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS fkp19uy9f2tra7jnbhsauwufyyg;
27ALTER TABLE IF EXISTS ONLY public.public_year_report DROP CONSTRAINT IF EXISTS fkouv9leuuiofaed3n5r4867jxw;
28ALTER TABLE IF EXISTS ONLY public.measure DROP CONSTRAINT IF EXISTS fkosfxokn23ox0wkragc22nc82t;
29ALTER TABLE IF EXISTS ONLY public.announcement DROP CONSTRAINT IF EXISTS fkor1vhhnjow35hp57g0p3g7qty;
30ALTER TABLE IF EXISTS ONLY public.evaluation DROP CONSTRAINT IF EXISTS fkoowx9kg9gdml2xtbd53hhon75;
31ALTER TABLE IF EXISTS ONLY public.bbbuser_meeting_institutions DROP CONSTRAINT IF EXISTS fkoo8ubl2rqron8amolk21v62kf;
32ALTER TABLE IF EXISTS ONLY public.users_areas_of_interest DROP CONSTRAINT IF EXISTS fkobvpf63mxvaj1otcd08ief4tt;
33ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS fko6vg78sx0sqe4f5jpd0qxiwvy;
34ALTER TABLE IF EXISTS ONLY public.institution_tags DROP CONSTRAINT IF EXISTS fko1b7826aj50mrvl670aa8lf9w;
35ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fknbxq0r103tga2c6jdm3s3k5nn;
36ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fkmi3ua7vj4avs78lpkw342ti3w;
37ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS fkmdjogeqrwn1llxm2l6edus2v2;
38ALTER TABLE IF EXISTS ONLY public.problem_strategy_goals DROP CONSTRAINT IF EXISTS fklweobyk5mh3u3a0ob5i5ef52b;
39ALTER TABLE IF EXISTS ONLY public.message DROP CONSTRAINT IF EXISTS fklqr4fixlintqc9di9s3u665r4;
40ALTER TABLE IF EXISTS ONLY public.strategy_goal DROP CONSTRAINT IF EXISTS fklgyexpijw5163r0b7cpn0si9p;
41ALTER TABLE IF EXISTS ONLY public.bbbuser_meeting_institutions DROP CONSTRAINT IF EXISTS fklgrilw16268uxgh10ghsx8is5;
42ALTER TABLE IF EXISTS ONLY public.feedback DROP CONSTRAINT IF EXISTS fklft5ts3o39ch35qtor7s00lh5;
43ALTER TABLE IF EXISTS ONLY public.request_for_evaluation DROP CONSTRAINT IF EXISTS fkl8gkgc4lbyy6jaf0hqtiu5p2k;
44ALTER TABLE IF EXISTS ONLY public.area_of_interest DROP CONSTRAINT IF EXISTS fkl0n7vf8xjgjo9eukoeckoleft;
45ALTER TABLE IF EXISTS ONLY public.question DROP CONSTRAINT IF EXISTS fkk72iaui78fsejpwr0is4x2t2w;
46ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS fkjw3nq57hpy21beqlg08n394o6;
47ALTER TABLE IF EXISTS ONLY public.public_year_report DROP CONSTRAINT IF EXISTS fkjckdc9shn9b5ak41eseb5k3rk;
48ALTER TABLE IF EXISTS ONLY public.announcement_comment DROP CONSTRAINT IF EXISTS fki72u02fqknowb9i0h8d13qcis;
49ALTER TABLE IF EXISTS ONLY public.question DROP CONSTRAINT IF EXISTS fkhv4rohk053q0rxbi62y33qcb4;
50ALTER TABLE IF EXISTS ONLY public.announcement_publication DROP CONSTRAINT IF EXISTS fkgx1jww9w2ckwyt9for7incxsb;
51ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS fkgw4ex5rm487xkyiyixpvy9s6n;
52ALTER TABLE IF EXISTS ONLY public.activity_activity_institutions DROP CONSTRAINT IF EXISTS fkgvb805yt8rgbj81i1k9wukqxf;
53ALTER TABLE IF EXISTS ONLY public.naparea DROP CONSTRAINT IF EXISTS fkgli7qbii3y1986h6v045ur1te;
54ALTER TABLE IF EXISTS ONLY public.naparea_type DROP CONSTRAINT IF EXISTS fkghwotco8l92r9le5h8y3c2psl;
55ALTER TABLE IF EXISTS ONLY public.strategy_goal DROP CONSTRAINT IF EXISTS fkg9drhicd70ffropcdcu5hh1rv;
56ALTER TABLE IF EXISTS ONLY public.announcement_publication DROP CONSTRAINT IF EXISTS fkg35gdmdoc6hsq7kdvv2a0kid0;
57ALTER TABLE IF EXISTS ONLY public.feedback_item_answer DROP CONSTRAINT IF EXISTS fkg0yiu35n27c9mm3j6ifiu1b2f;
58ALTER TABLE IF EXISTS ONLY public.problem DROP CONSTRAINT IF EXISTS fkftvp0qbqmvo1jk3mgppr5monf;
59ALTER TABLE IF EXISTS ONLY public.feedback_item DROP CONSTRAINT IF EXISTS fkfmvei5yqjfb3up1flsxwts8ob;
60ALTER TABLE IF EXISTS ONLY public.naparea DROP CONSTRAINT IF EXISTS fkfkrh40wyy9q65sm27kpqw3ilr;
61ALTER TABLE IF EXISTS ONLY public.users DROP CONSTRAINT IF EXISTS fkes3l5tviwmnu2d0gy350kdfht;
62ALTER TABLE IF EXISTS ONLY public.measure DROP CONSTRAINT IF EXISTS fkeroq4jxy4kllmyh6v77cr2n69;
63ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS fke36bp5sq2t14t09mvhli00w0s;
64ALTER TABLE IF EXISTS ONLY public.naparea DROP CONSTRAINT IF EXISTS fkdqx3nu31y5bkc71d4157xa8ew;
65ALTER TABLE IF EXISTS ONLY public.nap DROP CONSTRAINT IF EXISTS fkdemah6w784m9ny66158lotwnu;
66ALTER TABLE IF EXISTS ONLY public.measure DROP CONSTRAINT IF EXISTS fkd3cud8ayfih8e4h9ucsrlt5vo;
67ALTER TABLE IF EXISTS ONLY public.message DROP CONSTRAINT IF EXISTS fkd229bwcvcbs5qg91ifmydqwtd;
68ALTER TABLE IF EXISTS ONLY public.activity_institution DROP CONSTRAINT IF EXISTS fkd08n4xht4khg6lqritomqchw;
69ALTER TABLE IF EXISTS ONLY public.strategy_goal DROP CONSTRAINT IF EXISTS fkcxoxwfky5uxrboums2pk0ha4h;
70ALTER TABLE IF EXISTS ONLY public.evaluation_indicator_reports DROP CONSTRAINT IF EXISTS fkcei2838jvt7h0334j6oguyhiu;
71ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS fkcdcr7hr9v20iaavua25uw155w;
72ALTER TABLE IF EXISTS ONLY public.naparea_type DROP CONSTRAINT IF EXISTS fkbbppjbkrd7glj94rcw0vg1uro;
73ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fkaxlg298sixjn9bcx1bp829s85;
74ALTER TABLE IF EXISTS ONLY public.users_areas_of_interest DROP CONSTRAINT IF EXISTS fkatm86aulqnh724iara1wvjljw;
75ALTER TABLE IF EXISTS ONLY public.nap DROP CONSTRAINT IF EXISTS fkasfoieqnuh9fe7fbmyir1kdt9;
76ALTER TABLE IF EXISTS ONLY public.public_document_for_year DROP CONSTRAINT IF EXISTS fkaifcd3qcjc08xssov8dkx78yh;
77ALTER TABLE IF EXISTS ONLY public.feedback_item_answer DROP CONSTRAINT IF EXISTS fkaefjhq3cs2gspks2v54q49bv8;
78ALTER TABLE IF EXISTS ONLY public.institution DROP CONSTRAINT IF EXISTS fk9p0j7ie6oivggqnnvdua3f3r;
79ALTER TABLE IF EXISTS ONLY public.question DROP CONSTRAINT IF EXISTS fk9hbbb7nlsexvarrbh2l3frdj3;
80ALTER TABLE IF EXISTS ONLY public.institution DROP CONSTRAINT IF EXISTS fk9cm1a572gbj6e2rij1hy95nc2;
81ALTER TABLE IF EXISTS ONLY public.area_of_interest DROP CONSTRAINT IF EXISTS fk8x4np0efcusagtaonhbsk4nx8;
82ALTER TABLE IF EXISTS ONLY public.institution_category DROP CONSTRAINT IF EXISTS fk8opmlt5cn26bythehx0cpgb5c;
83ALTER TABLE IF EXISTS ONLY public.feedback_publication DROP CONSTRAINT IF EXISTS fk8k32s9lgyfvcreqjfoqrnljej;
84ALTER TABLE IF EXISTS ONLY public.feedback_item_answer DROP CONSTRAINT IF EXISTS fk8jctsfbx6c2fof4jaj2aktmbi;
85ALTER TABLE IF EXISTS ONLY public.problem DROP CONSTRAINT IF EXISTS fk84wvfikytlxfudqrfl4rf8poc;
86ALTER TABLE IF EXISTS ONLY public.message DROP CONSTRAINT IF EXISTS fk7ojhr1asspj4njoxi7gi4f5a6;
87ALTER TABLE IF EXISTS ONLY public.feedback DROP CONSTRAINT IF EXISTS fk7lkrsd5vvjie6595ttepdst1x;
88ALTER TABLE IF EXISTS ONLY public.problem DROP CONSTRAINT IF EXISTS fk7as84kw6af6buu4igjuh4n2x0;
89ALTER TABLE IF EXISTS ONLY public.institution DROP CONSTRAINT IF EXISTS fk7abf13doaqecnhis84dq7rkwi;
90ALTER TABLE IF EXISTS ONLY public.nap DROP CONSTRAINT IF EXISTS fk6vmd0r8ocyo23fhkfcw534p9h;
91ALTER TABLE IF EXISTS ONLY public.activity_activity_institutions DROP CONSTRAINT IF EXISTS fk6ivxjpxy4dgtg1sk2084c6tk0;
92ALTER TABLE IF EXISTS ONLY public.naparea DROP CONSTRAINT IF EXISTS fk69wnwh2fl73n027k7nenims3;
93ALTER TABLE IF EXISTS ONLY public.public_document_for_year DROP CONSTRAINT IF EXISTS fk5soeet9lpdxst77nm6vi3i4x7;
94ALTER TABLE IF EXISTS ONLY public.problem DROP CONSTRAINT IF EXISTS fk4yk9al3ko6fqmkcitnmbn55gm;
95ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS fk4xyqmixx11wrxm8ditkiuh9mn;
96ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS fk476jevwts4ectw4nl2avxec65;
97ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fk42ovuh962rnx5gvtuh0j3uecv;
98ALTER TABLE IF EXISTS ONLY public.public_year_report DROP CONSTRAINT IF EXISTS fk37j4lb1g789jka5um4862ot0o;
99ALTER TABLE IF EXISTS ONLY public.nap DROP CONSTRAINT IF EXISTS fk35wov5b68ug7va42fqu851j80;
100ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS fk32lnf2mjwmjgm2dh4ykva460i;
101ALTER TABLE IF EXISTS ONLY public.public_document_for_year DROP CONSTRAINT IF EXISTS fk1c5u0ahawyysal2usukaan7rj;
102ALTER TABLE IF EXISTS ONLY public.feedback_publication DROP CONSTRAINT IF EXISTS fk15ybrimwe7tmpo97m347go2o1;
103ALTER TABLE IF EXISTS ONLY public.users DROP CONSTRAINT IF EXISTS users_pkey;
104ALTER TABLE IF EXISTS ONLY public.tag DROP CONSTRAINT IF EXISTS uk_jnhhvyeilcs2hiv9ktcgg9tsi;
105ALTER TABLE IF EXISTS ONLY public.evaluation_indicator_reports DROP CONSTRAINT IF EXISTS uk_fvjbph66v21c4gdb9cg7qxrlx;
106ALTER TABLE IF EXISTS ONLY public.tag DROP CONSTRAINT IF EXISTS uk_d26iat8oxnw8g2yu2ws6ubil9;
107ALTER TABLE IF EXISTS ONLY public.tag DROP CONSTRAINT IF EXISTS tag_pkey;
108ALTER TABLE IF EXISTS ONLY public.strategy_goal DROP CONSTRAINT IF EXISTS strategy_goal_pkey;
109ALTER TABLE IF EXISTS ONLY public.status DROP CONSTRAINT IF EXISTS status_pkey;
110ALTER TABLE IF EXISTS ONLY public.request_for_evaluation DROP CONSTRAINT IF EXISTS request_for_evaluation_pkey;
111ALTER TABLE IF EXISTS ONLY public.report DROP CONSTRAINT IF EXISTS report_pkey;
112ALTER TABLE IF EXISTS ONLY public.question DROP CONSTRAINT IF EXISTS question_pkey;
113ALTER TABLE IF EXISTS ONLY public.public_year_report DROP CONSTRAINT IF EXISTS public_year_report_pkey;
114ALTER TABLE IF EXISTS ONLY public.public_document_type DROP CONSTRAINT IF EXISTS public_document_type_pkey;
115ALTER TABLE IF EXISTS ONLY public.public_document_for_year DROP CONSTRAINT IF EXISTS public_document_for_year_pkey;
116ALTER TABLE IF EXISTS ONLY public.problem DROP CONSTRAINT IF EXISTS problem_pkey;
117ALTER TABLE IF EXISTS ONLY public.naparea_type DROP CONSTRAINT IF EXISTS naparea_type_pkey;
118ALTER TABLE IF EXISTS ONLY public.naparea DROP CONSTRAINT IF EXISTS naparea_pkey;
119ALTER TABLE IF EXISTS ONLY public.nap DROP CONSTRAINT IF EXISTS nap_pkey;
120ALTER TABLE IF EXISTS ONLY public.message DROP CONSTRAINT IF EXISTS message_pkey;
121ALTER TABLE IF EXISTS ONLY public.measure DROP CONSTRAINT IF EXISTS measure_pkey;
122ALTER TABLE IF EXISTS ONLY public.measure_attachment DROP CONSTRAINT IF EXISTS measure_attachment_pkey;
123ALTER TABLE IF EXISTS ONLY public.institution DROP CONSTRAINT IF EXISTS institution_pkey;
124ALTER TABLE IF EXISTS ONLY public.institution_category DROP CONSTRAINT IF EXISTS institution_category_pkey;
125ALTER TABLE IF EXISTS ONLY public.indicator_report DROP CONSTRAINT IF EXISTS indicator_report_pkey;
126ALTER TABLE IF EXISTS ONLY public.indicator DROP CONSTRAINT IF EXISTS indicator_pkey;
127ALTER TABLE IF EXISTS ONLY public.feedback_publication DROP CONSTRAINT IF EXISTS feedback_publication_pkey;
128ALTER TABLE IF EXISTS ONLY public.feedback DROP CONSTRAINT IF EXISTS feedback_pkey;
129ALTER TABLE IF EXISTS ONLY public.feedback_item DROP CONSTRAINT IF EXISTS feedback_item_pkey;
130ALTER TABLE IF EXISTS ONLY public.feedback_item_answer DROP CONSTRAINT IF EXISTS feedback_item_answer_pkey;
131ALTER TABLE IF EXISTS ONLY public.faq DROP CONSTRAINT IF EXISTS faq_pkey;
132ALTER TABLE IF EXISTS ONLY public.evaluation DROP CONSTRAINT IF EXISTS evaluation_pkey;
133ALTER TABLE IF EXISTS ONLY public.bbbuser_meeting DROP CONSTRAINT IF EXISTS bbbuser_meeting_pkey;
134ALTER TABLE IF EXISTS ONLY public.attachment DROP CONSTRAINT IF EXISTS attachment_pkey;
135ALTER TABLE IF EXISTS ONLY public.area_of_interest DROP CONSTRAINT IF EXISTS area_of_interest_pkey;
136ALTER TABLE IF EXISTS ONLY public.announcement_publication_user DROP CONSTRAINT IF EXISTS announcement_publication_user_pkey;
137ALTER TABLE IF EXISTS ONLY public.announcement_publication DROP CONSTRAINT IF EXISTS announcement_publication_pkey;
138ALTER TABLE IF EXISTS ONLY public.announcement DROP CONSTRAINT IF EXISTS announcement_pkey;
139ALTER TABLE IF EXISTS ONLY public.announcement_comment DROP CONSTRAINT IF EXISTS announcement_comment_pkey;
140ALTER TABLE IF EXISTS ONLY public.announcement_attachment DROP CONSTRAINT IF EXISTS announcement_attachment_pkey;
141ALTER TABLE IF EXISTS ONLY public.activity DROP CONSTRAINT IF EXISTS activity_pkey;
142ALTER TABLE IF EXISTS ONLY public.activity_institution DROP CONSTRAINT IF EXISTS activity_institution_pkey;
143DROP TABLE IF EXISTS public.users_areas_of_interest;
144DROP TABLE IF EXISTS public.users;
145DROP TABLE IF EXISTS public.tag;
146DROP TABLE IF EXISTS public.strategy_goal;
147DROP TABLE IF EXISTS public.status;
148DROP TABLE IF EXISTS public.request_for_evaluation;
149DROP TABLE IF EXISTS public.report;
150DROP TABLE IF EXISTS public.question;
151DROP TABLE IF EXISTS public.public_year_report;
152DROP TABLE IF EXISTS public.public_document_type;
153DROP TABLE IF EXISTS public.public_document_for_year;
154DROP TABLE IF EXISTS public.problem_strategy_goals;
155DROP TABLE IF EXISTS public.problem;
156DROP TABLE IF EXISTS public.naparea_type;
157DROP TABLE IF EXISTS public.naparea;
158DROP TABLE IF EXISTS public.nap;
159DROP TABLE IF EXISTS public.message;
160DROP TABLE IF EXISTS public.measure_attachment;
161DROP TABLE IF EXISTS public.measure;
162DROP TABLE IF EXISTS public.institution_tags;
163DROP TABLE IF EXISTS public.institution_category;
164DROP TABLE IF EXISTS public.institution;
165DROP TABLE IF EXISTS public.indicator_report;
166DROP TABLE IF EXISTS public.indicator;
167DROP TABLE IF EXISTS public.feedback_publication;
168DROP TABLE IF EXISTS public.feedback_item_answer;
169DROP TABLE IF EXISTS public.feedback_item;
170DROP TABLE IF EXISTS public.feedback;
171DROP TABLE IF EXISTS public.faq;
172DROP TABLE IF EXISTS public.evaluation_indicator_reports;
173DROP TABLE IF EXISTS public.evaluation;
174DROP TABLE IF EXISTS public.bbbuser_meeting_institutions;
175DROP TABLE IF EXISTS public.bbbuser_meeting;
176DROP TABLE IF EXISTS public.attachment;
177DROP TABLE IF EXISTS public.area_of_interest;
178DROP TABLE IF EXISTS public.announcement_publication_user;
179DROP TABLE IF EXISTS public.announcement_publication;
180DROP TABLE IF EXISTS public.announcement_comment;
181DROP TABLE IF EXISTS public.announcement_attachment;
182DROP TABLE IF EXISTS public.announcement;
183DROP TABLE IF EXISTS public.activity_institution;
184DROP TABLE IF EXISTS public.activity_activity_institutions;
185DROP TABLE IF EXISTS public.activity;
186SET default_tablespace = '';
187
188SET default_table_access_method = heap;
189
190--
191-- Name: activity; Type: TABLE; Schema: public; Owner: postgres
192--
193
194CREATE TABLE public.activity (
195 id bigint NOT NULL,
196 date_created timestamp without time zone,
197 date_updated timestamp without time zone,
198 active boolean,
199 activity_date_type character varying(255),
200 continuously boolean,
201 end_date character varying(255),
202 financial_implications boolean,
203 name_al character varying(500),
204 name_en character varying(500),
205 name_mk character varying(500),
206 year_date date,
207 competent_institution_id bigint,
208 created_by_user_id bigint,
209 deleted_by_user_id bigint,
210 measure_id bigint,
211 status_id bigint,
212 updated_by_user_id bigint
213);
214
215
216ALTER TABLE public.activity OWNER TO postgres;
217
218--
219-- Name: activity_activity_institutions; Type: TABLE; Schema: public; Owner: postgres
220--
221
222CREATE TABLE public.activity_activity_institutions (
223 activity_list_id bigint NOT NULL,
224 activity_institutions_id bigint NOT NULL
225);
226
227
228ALTER TABLE public.activity_activity_institutions OWNER TO postgres;
229
230--
231-- Name: activity_institution; Type: TABLE; Schema: public; Owner: postgres
232--
233
234CREATE TABLE public.activity_institution (
235 id bigint NOT NULL,
236 date_created timestamp without time zone,
237 date_updated timestamp without time zone,
238 name_al character varying(255),
239 name_en character varying(255),
240 name_mk character varying(255),
241 institution_id bigint
242);
243
244
245ALTER TABLE public.activity_institution OWNER TO postgres;
246
247--
248-- Name: announcement; Type: TABLE; Schema: public; Owner: postgres
249--
250
251CREATE TABLE public.announcement (
252 id bigint NOT NULL,
253 date_created timestamp without time zone,
254 date_updated timestamp without time zone,
255 body character varying(20000),
256 title character varying(255),
257 area_of_interest_id bigint,
258 creator_id bigint
259);
260
261
262ALTER TABLE public.announcement OWNER TO postgres;
263
264--
265-- Name: announcement_attachment; Type: TABLE; Schema: public; Owner: postgres
266--
267
268CREATE TABLE public.announcement_attachment (
269 id bigint NOT NULL,
270 announcement_id bigint,
271 attachment_id bigint
272);
273
274
275ALTER TABLE public.announcement_attachment OWNER TO postgres;
276
277--
278-- Name: announcement_comment; Type: TABLE; Schema: public; Owner: postgres
279--
280
281CREATE TABLE public.announcement_comment (
282 id bigint NOT NULL,
283 comment character varying(255),
284 submitted_at timestamp without time zone,
285 announcement_id bigint,
286 submitted_by_user_id bigint
287);
288
289
290ALTER TABLE public.announcement_comment OWNER TO postgres;
291
292--
293-- Name: announcement_publication; Type: TABLE; Schema: public; Owner: postgres
294--
295
296CREATE TABLE public.announcement_publication (
297 id bigint NOT NULL,
298 read boolean NOT NULL,
299 read_at timestamp without time zone,
300 announcement_id bigint,
301 receiver_id bigint
302);
303
304
305ALTER TABLE public.announcement_publication OWNER TO postgres;
306
307--
308-- Name: announcement_publication_user; Type: TABLE; Schema: public; Owner: postgres
309--
310
311CREATE TABLE public.announcement_publication_user (
312 id bigint NOT NULL,
313 ann_pub_id bigint,
314 read_at timestamp without time zone,
315 user_id bigint
316);
317
318
319ALTER TABLE public.announcement_publication_user OWNER TO postgres;
320
321--
322-- Name: area_of_interest; Type: TABLE; Schema: public; Owner: postgres
323--
324
325CREATE TABLE public.area_of_interest (
326 id bigint NOT NULL,
327 date_created timestamp without time zone,
328 date_updated timestamp without time zone,
329 active boolean,
330 description_al character varying(255),
331 description_en character varying(255),
332 description_mk character varying(255),
333 name_al character varying(255),
334 name_en character varying(255),
335 name_mk character varying(255),
336 created_by_user_id bigint,
337 deleted_by_user_id bigint,
338 updated_by_user_id bigint
339);
340
341
342ALTER TABLE public.area_of_interest OWNER TO postgres;
343
344--
345-- Name: attachment; Type: TABLE; Schema: public; Owner: postgres
346--
347
348CREATE TABLE public.attachment (
349 id bigint NOT NULL,
350 content oid,
351 mime_type character varying(255),
352 name character varying(255),
353 size bigint
354);
355
356
357ALTER TABLE public.attachment OWNER TO postgres;
358
359--
360-- Name: bbbuser_meeting; Type: TABLE; Schema: public; Owner: postgres
361--
362
363CREATE TABLE public.bbbuser_meeting (
364 id bigint NOT NULL,
365 date_created timestamp without time zone,
366 date_updated timestamp without time zone,
367 attendee_pw character varying(255),
368 meeting_date date,
369 meeting_id character varying(255),
370 moderator_pw character varying(255),
371 name character varying(255),
372 open_session boolean
373);
374
375
376ALTER TABLE public.bbbuser_meeting OWNER TO postgres;
377
378--
379-- Name: bbbuser_meeting_institutions; Type: TABLE; Schema: public; Owner: postgres
380--
381
382CREATE TABLE public.bbbuser_meeting_institutions (
383 bbb_user_meetings_id bigint NOT NULL,
384 institutions_id bigint NOT NULL
385);
386
387
388ALTER TABLE public.bbbuser_meeting_institutions OWNER TO postgres;
389
390--
391-- Name: evaluation; Type: TABLE; Schema: public; Owner: postgres
392--
393
394CREATE TABLE public.evaluation (
395 id bigint NOT NULL,
396 date_created timestamp without time zone,
397 date_updated timestamp without time zone,
398 description_al character varying(255),
399 description_en character varying(255),
400 description_mk character varying(255),
401 open boolean,
402 nap_id bigint
403);
404
405
406ALTER TABLE public.evaluation OWNER TO postgres;
407
408--
409-- Name: evaluation_indicator_reports; Type: TABLE; Schema: public; Owner: postgres
410--
411
412CREATE TABLE public.evaluation_indicator_reports (
413 evaluation_id bigint NOT NULL,
414 indicator_reports_id bigint NOT NULL
415);
416
417
418ALTER TABLE public.evaluation_indicator_reports OWNER TO postgres;
419
420--
421-- Name: faq; Type: TABLE; Schema: public; Owner: postgres
422--
423
424CREATE TABLE public.faq (
425 id bigint NOT NULL,
426 answeral character varying(4000),
427 answermk character varying(4000),
428 content oid,
429 doc_name character varying(255),
430 mime_type character varying(255),
431 questional character varying(255),
432 questionmk character varying(255)
433);
434
435
436ALTER TABLE public.faq OWNER TO postgres;
437
438--
439-- Name: feedback; Type: TABLE; Schema: public; Owner: postgres
440--
441
442CREATE TABLE public.feedback (
443 id bigint NOT NULL,
444 date_created timestamp without time zone,
445 date_updated timestamp without time zone,
446 description character varying(255),
447 due_date date,
448 is_published boolean,
449 name character varying(255),
450 area_of_interest_id bigint,
451 creator_id bigint
452);
453
454
455ALTER TABLE public.feedback OWNER TO postgres;
456
457--
458-- Name: feedback_item; Type: TABLE; Schema: public; Owner: postgres
459--
460
461CREATE TABLE public.feedback_item (
462 id bigint NOT NULL,
463 date_created timestamp without time zone,
464 date_updated timestamp without time zone,
465 description character varying(255),
466 name character varying(255),
467 options character varying(5000),
468 is_required boolean,
469 type character varying(255),
470 feedback_id bigint
471);
472
473
474ALTER TABLE public.feedback_item OWNER TO postgres;
475
476--
477-- Name: feedback_item_answer; Type: TABLE; Schema: public; Owner: postgres
478--
479
480CREATE TABLE public.feedback_item_answer (
481 id bigint NOT NULL,
482 date_created timestamp without time zone,
483 date_updated timestamp without time zone,
484 value character varying(255),
485 attachment_id bigint,
486 item_id bigint,
487 publication_id bigint
488);
489
490
491ALTER TABLE public.feedback_item_answer OWNER TO postgres;
492
493--
494-- Name: feedback_publication; Type: TABLE; Schema: public; Owner: postgres
495--
496
497CREATE TABLE public.feedback_publication (
498 id bigint NOT NULL,
499 date_created timestamp without time zone,
500 date_updated timestamp without time zone,
501 finished boolean NOT NULL,
502 read boolean NOT NULL,
503 read_at timestamp without time zone,
504 feedback_id bigint,
505 institution_id bigint
506);
507
508
509ALTER TABLE public.feedback_publication OWNER TO postgres;
510
511--
512-- Name: indicator; Type: TABLE; Schema: public; Owner: postgres
513--
514
515CREATE TABLE public.indicator (
516 id bigint NOT NULL,
517 date_created timestamp without time zone,
518 date_updated timestamp without time zone,
519 active boolean,
520 counter integer,
521 end_date date,
522 finished boolean,
523 indicator_type character varying(255),
524 name_al character varying(255),
525 name_en character varying(255),
526 name_mk character varying(255),
527 start_date date,
528 activity_id bigint,
529 created_by_user_id bigint,
530 deleted_by_user_id bigint,
531 institution_id bigint,
532 status_id bigint,
533 updated_by_user_id bigint
534);
535
536
537ALTER TABLE public.indicator OWNER TO postgres;
538
539--
540-- Name: indicator_report; Type: TABLE; Schema: public; Owner: postgres
541--
542
543CREATE TABLE public.indicator_report (
544 id bigint NOT NULL,
545 date_created timestamp without time zone,
546 date_updated timestamp without time zone,
547 active boolean,
548 has_evaluation boolean,
549 report_al character varying(4000),
550 report_en character varying(4000),
551 report_mk character varying(4000),
552 activity_id bigint,
553 created_by_user_id bigint,
554 deleted_by_user_id bigint,
555 evaluation_id bigint,
556 status_id bigint,
557 updated_by_user_evaluator_id bigint,
558 updated_by_user_moderator_id bigint
559);
560
561
562ALTER TABLE public.indicator_report OWNER TO postgres;
563
564--
565-- Name: institution; Type: TABLE; Schema: public; Owner: postgres
566--
567
568CREATE TABLE public.institution (
569 id bigint NOT NULL,
570 date_created timestamp without time zone,
571 date_updated timestamp without time zone,
572 active boolean NOT NULL,
573 address_al character varying(255),
574 address_details_al character varying(255),
575 address_details_en character varying(255),
576 address_details_mk character varying(255),
577 address_en character varying(255),
578 address_mk character varying(255),
579 city_al character varying(255),
580 city_en character varying(255),
581 city_mk character varying(255),
582 director_locales character varying(255),
583 direktor_email character varying(255),
584 direktor_first_name character varying(255),
585 direktor_last_name character varying(255),
586 direktor_phone character varying(255),
587 edited boolean NOT NULL,
588 institution_alternative_locales character varying(255),
589 institution_alternative_phone character varying(255),
590 institution_alternative_second_locales character varying(255),
591 institution_alternative_second_phone character varying(255),
592 institution_locales character varying(255),
593 institution_phone character varying(255),
594 name_al character varying(255),
595 name_en character varying(255),
596 name_mk character varying(255),
597 notice_board boolean NOT NULL,
598 postal_code character varying(255),
599 street_al character varying(255),
600 street_en character varying(255),
601 street_mk character varying(255),
602 street_number_mk character varying(255),
603 type_of_street_al character varying(255),
604 type_of_street_en character varying(255),
605 type_of_street_mk character varying(255),
606 web_site character varying(255),
607 category_id bigint,
608 initial_institution_id bigint,
609 parent_institution_id bigint
610);
611
612
613ALTER TABLE public.institution OWNER TO postgres;
614
615--
616-- Name: institution_category; Type: TABLE; Schema: public; Owner: postgres
617--
618
619CREATE TABLE public.institution_category (
620 id bigint NOT NULL,
621 date_created timestamp without time zone,
622 date_updated timestamp without time zone,
623 name_al character varying(255),
624 name_en character varying(255),
625 name_mk character varying(255),
626 order_id bigint,
627 parent_category_id bigint
628);
629
630
631ALTER TABLE public.institution_category OWNER TO postgres;
632
633--
634-- Name: institution_tags; Type: TABLE; Schema: public; Owner: postgres
635--
636
637CREATE TABLE public.institution_tags (
638 institutions_id bigint NOT NULL,
639 tags_id bigint NOT NULL
640);
641
642
643ALTER TABLE public.institution_tags OWNER TO postgres;
644
645--
646-- Name: measure; Type: TABLE; Schema: public; Owner: postgres
647--
648
649CREATE TABLE public.measure (
650 id bigint NOT NULL,
651 date_created timestamp without time zone,
652 date_updated timestamp without time zone,
653 active boolean,
654 content oid,
655 description_al character varying(4000),
656 description_en character varying(4000),
657 description_mk character varying(4000),
658 end_date date,
659 file_name character varying(255),
660 mime_type character varying(255),
661 name_al character varying(255),
662 name_en character varying(255),
663 name_mk character varying(255),
664 start_date date,
665 title_al character varying(255),
666 title_en character varying(255),
667 title_mk character varying(255),
668 created_by_user_id bigint,
669 deleted_by_user_id bigint,
670 problem_id bigint,
671 status_id bigint,
672 updated_by_user_id bigint
673);
674
675
676ALTER TABLE public.measure OWNER TO postgres;
677
678--
679-- Name: measure_attachment; Type: TABLE; Schema: public; Owner: postgres
680--
681
682CREATE TABLE public.measure_attachment (
683 id bigint NOT NULL,
684 attachment_id bigint,
685 measure_id bigint
686);
687
688
689ALTER TABLE public.measure_attachment OWNER TO postgres;
690
691--
692-- Name: message; Type: TABLE; Schema: public; Owner: postgres
693--
694
695CREATE TABLE public.message (
696 id bigint NOT NULL,
697 date_created timestamp without time zone,
698 date_updated timestamp without time zone,
699 active boolean,
700 body character varying(20000),
701 deleted_by_user_email character varying(255),
702 author_id bigint,
703 deleted_by_user_id bigint,
704 parent_message_id bigint,
705 question_id bigint
706);
707
708
709ALTER TABLE public.message OWNER TO postgres;
710
711--
712-- Name: nap; Type: TABLE; Schema: public; Owner: postgres
713--
714
715CREATE TABLE public.nap (
716 id bigint NOT NULL,
717 date_created timestamp without time zone,
718 date_updated timestamp without time zone,
719 active boolean,
720 description_al character varying(4000),
721 description_en character varying(4000),
722 description_mk character varying(4000),
723 end_date date,
724 name_al character varying(255),
725 name_en character varying(255),
726 name_mk character varying(255),
727 open_for_evaluation boolean,
728 start_date date,
729 title_al character varying(255),
730 title_en character varying(255),
731 title_mk character varying(255),
732 created_by_user_id bigint,
733 deleted_by_user_id bigint,
734 status_id bigint,
735 updated_by_user_id bigint
736);
737
738
739ALTER TABLE public.nap OWNER TO postgres;
740
741--
742-- Name: naparea; Type: TABLE; Schema: public; Owner: postgres
743--
744
745CREATE TABLE public.naparea (
746 id bigint NOT NULL,
747 date_created timestamp without time zone,
748 date_updated timestamp without time zone,
749 active boolean,
750 code character varying(255),
751 description_al character varying(4000),
752 description_en character varying(4000),
753 description_mk character varying(4000),
754 name_al character varying(255),
755 name_en character varying(255),
756 name_mk character varying(255),
757 created_by_user_id bigint,
758 deleted_by_user_id bigint,
759 nap_area_type_id bigint,
760 updated_by_user_id bigint
761);
762
763
764ALTER TABLE public.naparea OWNER TO postgres;
765
766--
767-- Name: naparea_type; Type: TABLE; Schema: public; Owner: postgres
768--
769
770CREATE TABLE public.naparea_type (
771 id bigint NOT NULL,
772 date_created timestamp without time zone,
773 date_updated timestamp without time zone,
774 active boolean,
775 description_al character varying(4000),
776 description_en character varying(4000),
777 description_mk character varying(4000),
778 name_al character varying(255),
779 name_en character varying(255),
780 name_mk character varying(255),
781 created_by_user_id bigint,
782 deleted_by_user_id bigint,
783 updated_by_user_id bigint
784);
785
786
787ALTER TABLE public.naparea_type OWNER TO postgres;
788
789--
790-- Name: problem; Type: TABLE; Schema: public; Owner: postgres
791--
792
793CREATE TABLE public.problem (
794 id bigint NOT NULL,
795 date_created timestamp without time zone,
796 date_updated timestamp without time zone,
797 active boolean,
798 description_al character varying(4000),
799 description_en character varying(4000),
800 description_mk character varying(4000),
801 name_al character varying(255),
802 name_en character varying(255),
803 name_mk character varying(255),
804 created_by_user_id bigint,
805 deleted_by_user_id bigint,
806 nap_id bigint,
807 nap_area_id bigint,
808 updated_by_user_id bigint
809);
810
811
812ALTER TABLE public.problem OWNER TO postgres;
813
814--
815-- Name: problem_strategy_goals; Type: TABLE; Schema: public; Owner: postgres
816--
817
818CREATE TABLE public.problem_strategy_goals (
819 problems_id bigint NOT NULL,
820 strategy_goals_id bigint NOT NULL
821);
822
823
824ALTER TABLE public.problem_strategy_goals OWNER TO postgres;
825
826--
827-- Name: public_document_for_year; Type: TABLE; Schema: public; Owner: postgres
828--
829
830CREATE TABLE public.public_document_for_year (
831 id bigint NOT NULL,
832 url character varying(255),
833 year integer,
834 attachment_id bigint,
835 institution_id bigint,
836 type_id bigint
837);
838
839
840ALTER TABLE public.public_document_for_year OWNER TO postgres;
841
842--
843-- Name: public_document_type; Type: TABLE; Schema: public; Owner: postgres
844--
845
846CREATE TABLE public.public_document_type (
847 id bigint NOT NULL,
848 name character varying(255)
849);
850
851
852ALTER TABLE public.public_document_type OWNER TO postgres;
853
854--
855-- Name: public_year_report; Type: TABLE; Schema: public; Owner: postgres
856--
857
858CREATE TABLE public.public_year_report (
859 id bigint NOT NULL,
860 status character varying(255),
861 year integer,
862 doc_id bigint,
863 institution_id bigint,
864 report_id bigint,
865 signed_doc_id bigint
866);
867
868
869ALTER TABLE public.public_year_report OWNER TO postgres;
870
871--
872-- Name: question; Type: TABLE; Schema: public; Owner: postgres
873--
874
875CREATE TABLE public.question (
876 id bigint NOT NULL,
877 date_created timestamp without time zone,
878 date_updated timestamp without time zone,
879 active boolean,
880 title character varying(255),
881 area_of_interest_id bigint,
882 author_id bigint,
883 deleted_by_user_id bigint
884);
885
886
887ALTER TABLE public.question OWNER TO postgres;
888
889--
890-- Name: report; Type: TABLE; Schema: public; Owner: postgres
891--
892
893CREATE TABLE public.report (
894 id bigint NOT NULL,
895 br_neodogovoreni_baranja integer,
896 br_pozitivno_odg_baranja integer,
897 br_preinaceni_odluki integer,
898 br_primeni_baranja integer,
899 br_usvoeni_zalbi integer,
900 odbieniiotfrleni_zalbi character varying(1000),
901 odbieni_zalbi character varying(1000),
902 otfrelni_zalbi character varying(1000),
903 podatoci_sluzb_lice character varying(1000),
904 vlozeni_zalbi character varying(1000)
905);
906
907
908ALTER TABLE public.report OWNER TO postgres;
909
910--
911-- Name: request_for_evaluation; Type: TABLE; Schema: public; Owner: postgres
912--
913
914CREATE TABLE public.request_for_evaluation (
915 id bigint NOT NULL,
916 date_created timestamp without time zone,
917 date_updated timestamp without time zone,
918 body character varying(255),
919 title character varying(255),
920 receiver_id bigint,
921 sender_id bigint
922);
923
924
925ALTER TABLE public.request_for_evaluation OWNER TO postgres;
926
927--
928-- Name: status; Type: TABLE; Schema: public; Owner: postgres
929--
930
931CREATE TABLE public.status (
932 id bigint NOT NULL,
933 is_evaluable boolean,
934 status_al character varying(255),
935 status_en character varying(255),
936 status_mk character varying(255),
937 status_type character varying(255)
938);
939
940
941ALTER TABLE public.status OWNER TO postgres;
942
943--
944-- Name: strategy_goal; Type: TABLE; Schema: public; Owner: postgres
945--
946
947CREATE TABLE public.strategy_goal (
948 id bigint NOT NULL,
949 date_created timestamp without time zone,
950 date_updated timestamp without time zone,
951 active boolean,
952 description_al character varying(4000),
953 description_en character varying(4000),
954 description_mk character varying(4000),
955 name_al character varying(255),
956 name_en character varying(255),
957 name_mk character varying(255),
958 created_by_user_id bigint,
959 deleted_by_user_id bigint,
960 updated_by_user_id bigint
961);
962
963
964ALTER TABLE public.strategy_goal OWNER TO postgres;
965
966--
967-- Name: tag; Type: TABLE; Schema: public; Owner: postgres
968--
969
970CREATE TABLE public.tag (
971 id bigint NOT NULL,
972 tag_name_al character varying(255),
973 tag_name_mk character varying(255)
974);
975
976
977ALTER TABLE public.tag OWNER TO postgres;
978
979--
980-- Name: users; Type: TABLE; Schema: public; Owner: postgres
981--
982
983CREATE TABLE public.users (
984 id bigint NOT NULL,
985 date_created timestamp without time zone,
986 date_updated timestamp without time zone,
987 active boolean,
988 alternative_email character varying(255),
989 alternative_locales character varying(255),
990 alternative_phone character varying(255),
991 alternative_second_email character varying(255),
992 alternative_second_locales character varying(255),
993 alternative_second_phone character varying(255),
994 date_registration_completed timestamp without time zone,
995 email character varying(255),
996 first_name character varying(255),
997 last_name character varying(255),
998 locales character varying(255),
999 password character varying(255),
1000 password_reset_active_until timestamp without time zone,
1001 password_reset_string character varying(255),
1002 phone character varying(255),
1003 role character varying(255),
1004 user_role character varying(255),
1005 username character varying(255),
1006 institution_id bigint
1007);
1008
1009
1010ALTER TABLE public.users OWNER TO postgres;
1011
1012--
1013-- Name: users_areas_of_interest; Type: TABLE; Schema: public; Owner: postgres
1014--
1015
1016CREATE TABLE public.users_areas_of_interest (
1017 users_id bigint NOT NULL,
1018 areas_of_interest_id bigint NOT NULL
1019);
1020
1021
1022ALTER TABLE public.users_areas_of_interest OWNER TO postgres;
1023
1024--
1025-- Data for Name: activity; Type: TABLE DATA; Schema: public; Owner: postgres
1026--
1027
1028INSERT INTO public.activity VALUES (49, '2021-08-21 18:18:36.652', '2021-08-21 18:18:36.652', true, 'FIRSTHALF', true, NULL, true, NULL, NULL, 'Активност', '2022-01-01', 46, 2, NULL, 44, 48, 2);
1029
1030
1031--
1032-- Data for Name: activity_activity_institutions; Type: TABLE DATA; Schema: public; Owner: postgres
1033--
1034
1035INSERT INTO public.activity_activity_institutions VALUES (49, 47);
1036
1037
1038--
1039-- Data for Name: activity_institution; Type: TABLE DATA; Schema: public; Owner: postgres
1040--
1041
1042INSERT INTO public.activity_institution VALUES (47, '2021-08-21 18:17:28.393', NULL, NULL, NULL, 'Вклучена институција', NULL);
1043INSERT INTO public.activity_institution VALUES (46, '2021-08-21 18:16:53.557', NULL, NULL, NULL, 'Надлежна институција', 7);
1044
1045
1046--
1047-- Data for Name: announcement; Type: TABLE DATA; Schema: public; Owner: postgres
1048--
1049
1050INSERT INTO public.announcement VALUES (12, '2021-08-19 21:01:31.939', NULL, 'Би сакале да Ве известиме дека од утре 10.10.2021 ќе важат нови правила.', 'Соопштение ', 4, 2);
1051
1052
1053--
1054-- Data for Name: announcement_attachment; Type: TABLE DATA; Schema: public; Owner: postgres
1055--
1056
1057INSERT INTO public.announcement_attachment VALUES (14, 12, 13);
1058
1059
1060--
1061-- Data for Name: announcement_comment; Type: TABLE DATA; Schema: public; Owner: postgres
1062--
1063
1064
1065
1066--
1067-- Data for Name: announcement_publication; Type: TABLE DATA; Schema: public; Owner: postgres
1068--
1069
1070INSERT INTO public.announcement_publication VALUES (15, true, '2021-08-19 21:12:19.296', 12, 7);
1071
1072
1073--
1074-- Data for Name: announcement_publication_user; Type: TABLE DATA; Schema: public; Owner: postgres
1075--
1076
1077INSERT INTO public.announcement_publication_user VALUES (16, 15, '2021-08-19 21:07:56.377', 8);
1078INSERT INTO public.announcement_publication_user VALUES (17, 15, '2021-08-19 21:12:19.296', 8);
1079INSERT INTO public.announcement_publication_user VALUES (31, 15, '2021-08-21 17:57:25.297', 8);
1080INSERT INTO public.announcement_publication_user VALUES (32, 15, '2021-08-21 17:57:34.852', 8);
1081
1082
1083--
1084-- Data for Name: area_of_interest; Type: TABLE DATA; Schema: public; Owner: postgres
1085--
1086
1087INSERT INTO public.area_of_interest VALUES (1, NULL, NULL, false, NULL, NULL, NULL, NULL, NULL, 'Администратор', NULL, NULL, NULL);
1088INSERT INTO public.area_of_interest VALUES (3, '2021-08-18 10:57:28.757', NULL, true, NULL, NULL, NULL, NULL, NULL, 'Директор', 2, NULL, NULL);
1089INSERT INTO public.area_of_interest VALUES (4, '2021-08-18 10:57:38.037', NULL, true, NULL, NULL, NULL, NULL, NULL, 'Интегритет', 2, NULL, NULL);
1090
1091
1092--
1093-- Data for Name: attachment; Type: TABLE DATA; Schema: public; Owner: postgres
1094--
1095
1096INSERT INTO public.attachment VALUES (13, 21117, 'application/pdf', 'Nacionalna-strategija-DKSK-KONECNA.pdf', 1177395);
1097INSERT INTO public.attachment VALUES (29, 21120, 'application/pdf', 'Nacionalna-strategija-DKSK-KONECNA.pdf', 1177395);
1098
1099
1100--
1101-- Data for Name: bbbuser_meeting; Type: TABLE DATA; Schema: public; Owner: postgres
1102--
1103
1104INSERT INTO public.bbbuser_meeting VALUES (33, '2021-08-21 18:02:25.941', NULL, 'EGR6RsXl', '2021-08-21', '29ed4113-f0b6-47d5-877f-f9e6937e5dc2', 'H7zaPiwL', 'Состанок', true);
1105
1106
1107--
1108-- Data for Name: bbbuser_meeting_institutions; Type: TABLE DATA; Schema: public; Owner: postgres
1109--
1110
1111INSERT INTO public.bbbuser_meeting_institutions VALUES (33, 7);
1112
1113
1114--
1115-- Data for Name: evaluation; Type: TABLE DATA; Schema: public; Owner: postgres
1116--
1117
1118INSERT INTO public.evaluation VALUES (58, '2021-08-21 18:24:03.767', NULL, NULL, NULL, 'Евалуација август 2021', false, 35);
1119
1120
1121--
1122-- Data for Name: evaluation_indicator_reports; Type: TABLE DATA; Schema: public; Owner: postgres
1123--
1124
1125
1126
1127--
1128-- Data for Name: faq; Type: TABLE DATA; Schema: public; Owner: postgres
1129--
1130
1131
1132
1133--
1134-- Data for Name: feedback; Type: TABLE DATA; Schema: public; Owner: postgres
1135--
1136
1137INSERT INTO public.feedback VALUES (18, '2021-08-20 13:33:05.387', '2021-08-20 13:33:05.387', 'Опис на анкетата', '2021-08-21', true, 'Анкета', 4, 2);
1138
1139
1140--
1141-- Data for Name: feedback_item; Type: TABLE DATA; Schema: public; Owner: postgres
1142--
1143
1144INSERT INTO public.feedback_item VALUES (19, '2021-08-20 13:34:06.763', '2021-08-20 13:34:06.763', NULL, 'Прашање со една опција', 'Одговор 1;;Одговор 2;;Одговор 3', false, 'SINGLE_CHOICE', 18);
1145INSERT INTO public.feedback_item VALUES (21, '2021-08-20 13:37:02.799', '2021-08-20 13:37:02.799', NULL, 'Внесување на број', '', false, 'NUMERIC_FIELD', 18);
1146INSERT INTO public.feedback_item VALUES (22, '2021-08-20 13:37:17.397', '2021-08-20 13:37:17.397', NULL, 'Внес на текст', '', false, 'TEXT_FIELD', 18);
1147INSERT INTO public.feedback_item VALUES (23, '2021-08-20 13:38:16.362', '2021-08-20 13:38:16.362', NULL, 'Прикачување на фајл', '', true, 'ATTACHMENT', 18);
1148INSERT INTO public.feedback_item VALUES (20, '2021-08-20 13:34:46.782', '2021-08-20 13:38:29.482', NULL, 'Прашање со повеќе опции', 'Одговор 1;;Одговор 2;;Одговор 3', true, 'MULTIPLE_CHOICE', 18);
1149
1150
1151--
1152-- Data for Name: feedback_item_answer; Type: TABLE DATA; Schema: public; Owner: postgres
1153--
1154
1155INSERT INTO public.feedback_item_answer VALUES (25, NULL, NULL, 'Одговор 2', NULL, 19, 24);
1156INSERT INTO public.feedback_item_answer VALUES (26, NULL, NULL, 'Одговор 1;Одговор 3', NULL, 20, 24);
1157INSERT INTO public.feedback_item_answer VALUES (27, NULL, NULL, '12345', NULL, 21, 24);
1158INSERT INTO public.feedback_item_answer VALUES (28, NULL, NULL, 'Одговор на прашањето.', NULL, 22, 24);
1159INSERT INTO public.feedback_item_answer VALUES (30, NULL, NULL, 'Nacionalna-strategija-DKSK-KONECNA.pdf', 29, 23, 24);
1160
1161
1162--
1163-- Data for Name: feedback_publication; Type: TABLE DATA; Schema: public; Owner: postgres
1164--
1165
1166INSERT INTO public.feedback_publication VALUES (24, '2021-08-20 13:38:59.513', '2021-08-20 13:38:59.513', true, true, '2021-08-20 13:39:21.545', 18, 7);
1167
1168
1169--
1170-- Data for Name: indicator; Type: TABLE DATA; Schema: public; Owner: postgres
1171--
1172
1173INSERT INTO public.indicator VALUES (56, '2021-08-21 18:23:08.772', '2021-08-21 18:23:08.773', true, NULL, NULL, false, 'BOOLEAN', NULL, NULL, 'Индикатор', '2021-08-21', 49, 2, NULL, 46, 50, 2);
1174INSERT INTO public.indicator VALUES (57, '2021-08-21 18:23:19.786', '2021-08-21 18:23:19.786', true, 3, NULL, NULL, 'NUMBER', NULL, NULL, 'Индикатор 2', '2021-08-28', 49, 2, NULL, 47, 50, 2);
1175
1176
1177--
1178-- Data for Name: indicator_report; Type: TABLE DATA; Schema: public; Owner: postgres
1179--
1180
1181INSERT INTO public.indicator_report VALUES (59, '2021-08-21 18:27:32.185', '2021-08-21 18:27:32.185', true, NULL, NULL, NULL, 'Извештај', 49, 2, NULL, 58, 53, 2, NULL);
1182
1183
1184--
1185-- Data for Name: institution; Type: TABLE DATA; Schema: public; Owner: postgres
1186--
1187
1188INSERT INTO public.institution VALUES (7, '2021-08-18 10:59:17.47', '2021-08-18 10:59:17.47', true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Институција', false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL);
1189INSERT INTO public.institution VALUES (11, '2021-08-19 16:20:29.866', '2021-08-19 16:20:29.866', true, NULL, NULL, NULL, NULL, NULL, 'Бул.булевар бр.100 , , ', NULL, NULL, NULL, NULL, NULL, 'Директор', 'Директор', NULL, true, NULL, NULL, NULL, NULL, '9', '072 999 555', NULL, NULL, 'Институција ново име', false, NULL, NULL, NULL, 'булевар', '100', NULL, NULL, 'Бул', NULL, 5, 7, NULL);
1190INSERT INTO public.institution VALUES (45, '2021-08-21 18:16:30.373', '2021-08-21 18:16:30.373', true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Институција 2', false, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL);
1191
1192
1193--
1194-- Data for Name: institution_category; Type: TABLE DATA; Schema: public; Owner: postgres
1195--
1196
1197INSERT INTO public.institution_category VALUES (5, '2021-08-18 10:58:37.303', '2021-08-18 10:58:37.303', NULL, NULL, 'Категорија', NULL, NULL);
1198
1199
1200--
1201-- Data for Name: institution_tags; Type: TABLE DATA; Schema: public; Owner: postgres
1202--
1203
1204INSERT INTO public.institution_tags VALUES (7, 6);
1205INSERT INTO public.institution_tags VALUES (11, 6);
1206INSERT INTO public.institution_tags VALUES (45, 6);
1207
1208
1209--
1210-- Data for Name: measure; Type: TABLE DATA; Schema: public; Owner: postgres
1211--
1212
1213INSERT INTO public.measure VALUES (44, '2021-08-21 18:15:15.388', '2021-08-21 18:15:15.388', true, NULL, NULL, NULL, 'Опис на мерката', '2021-09-22', NULL, NULL, NULL, NULL, 'Мерка', '2021-08-21', NULL, NULL, NULL, 2, NULL, 41, 43, NULL);
1214
1215
1216--
1217-- Data for Name: measure_attachment; Type: TABLE DATA; Schema: public; Owner: postgres
1218--
1219
1220
1221
1222--
1223-- Data for Name: message; Type: TABLE DATA; Schema: public; Owner: postgres
1224--
1225
1226
1227
1228--
1229-- Data for Name: nap; Type: TABLE DATA; Schema: public; Owner: postgres
1230--
1231
1232INSERT INTO public.nap VALUES (35, '2021-08-21 18:08:12.391', '2021-08-21 18:08:12.391', true, NULL, NULL, 'Опис на националниот акциски план', '2023-08-23', NULL, NULL, 'Национален акциски план', false, '2021-08-22', NULL, NULL, NULL, 2, NULL, 34, NULL);
1233
1234
1235--
1236-- Data for Name: naparea; Type: TABLE DATA; Schema: public; Owner: postgres
1237--
1238
1239INSERT INTO public.naparea VALUES (39, '2021-08-21 18:12:13.12', NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, 'Правосудство', 2, NULL, 38, NULL);
1240INSERT INTO public.naparea VALUES (40, '2021-08-21 18:12:42.555', NULL, true, NULL, NULL, NULL, NULL, NULL, NULL, 'Јавни набавки', 2, NULL, 37, NULL);
1241
1242
1243--
1244-- Data for Name: naparea_type; Type: TABLE DATA; Schema: public; Owner: postgres
1245--
1246
1247INSERT INTO public.naparea_type VALUES (37, '2021-08-21 18:11:12.442', NULL, true, NULL, NULL, NULL, NULL, NULL, 'Хоризонтални области', 2, NULL, NULL);
1248INSERT INTO public.naparea_type VALUES (38, '2021-08-21 18:11:19.963', NULL, true, NULL, NULL, NULL, NULL, NULL, 'Сектори', 2, NULL, NULL);
1249
1250
1251--
1252-- Data for Name: problem; Type: TABLE DATA; Schema: public; Owner: postgres
1253--
1254
1255INSERT INTO public.problem VALUES (41, '2021-08-21 18:13:21.277', NULL, true, NULL, NULL, 'Опис на проблемот', NULL, NULL, 'Проблем', 2, NULL, 35, 39, NULL);
1256INSERT INTO public.problem VALUES (42, '2021-08-21 18:14:08.727', NULL, true, NULL, NULL, 'Опис на проблем 2', NULL, NULL, 'Проблем 2', 2, NULL, 35, 40, NULL);
1257
1258
1259--
1260-- Data for Name: problem_strategy_goals; Type: TABLE DATA; Schema: public; Owner: postgres
1261--
1262
1263INSERT INTO public.problem_strategy_goals VALUES (41, 36);
1264INSERT INTO public.problem_strategy_goals VALUES (42, 36);
1265
1266
1267--
1268-- Data for Name: public_document_for_year; Type: TABLE DATA; Schema: public; Owner: postgres
1269--
1270
1271
1272
1273--
1274-- Data for Name: public_document_type; Type: TABLE DATA; Schema: public; Owner: postgres
1275--
1276
1277
1278
1279--
1280-- Data for Name: public_year_report; Type: TABLE DATA; Schema: public; Owner: postgres
1281--
1282
1283
1284
1285--
1286-- Data for Name: question; Type: TABLE DATA; Schema: public; Owner: postgres
1287--
1288
1289
1290
1291--
1292-- Data for Name: report; Type: TABLE DATA; Schema: public; Owner: postgres
1293--
1294
1295
1296
1297--
1298-- Data for Name: request_for_evaluation; Type: TABLE DATA; Schema: public; Owner: postgres
1299--
1300
1301
1302
1303--
1304-- Data for Name: status; Type: TABLE DATA; Schema: public; Owner: postgres
1305--
1306
1307INSERT INTO public.status VALUES (34, true, NULL, NULL, 'Во тек', 'НАП');
1308INSERT INTO public.status VALUES (43, true, NULL, NULL, 'Во тек', 'МЕРКА');
1309INSERT INTO public.status VALUES (48, true, NULL, NULL, 'Во тек', 'АКТИВНОСТ');
1310INSERT INTO public.status VALUES (50, true, NULL, NULL, 'Во подготовка', 'ИНДИКАТОР');
1311INSERT INTO public.status VALUES (51, true, NULL, NULL, 'Поднесен', 'ИЗВЕШТАЈ');
1312INSERT INTO public.status VALUES (52, true, NULL, NULL, 'Вратен на доработка', 'ИЗВЕШТАЈ');
1313INSERT INTO public.status VALUES (53, true, NULL, NULL, 'Заклучен', 'ИЗВЕШТАЈ');
1314INSERT INTO public.status VALUES (55, true, NULL, NULL, 'Прифатен', 'ИЗВЕШТАЈ');
1315
1316
1317--
1318-- Data for Name: strategy_goal; Type: TABLE DATA; Schema: public; Owner: postgres
1319--
1320
1321INSERT INTO public.strategy_goal VALUES (36, '2021-08-21 18:09:41.777', NULL, true, NULL, NULL, 'Стратешка цел', NULL, NULL, 'Стратешка цел', 2, NULL, NULL);
1322
1323
1324--
1325-- Data for Name: tag; Type: TABLE DATA; Schema: public; Owner: postgres
1326--
1327
1328INSERT INTO public.tag VALUES (6, 'Ознака', 'Ознака');
1329
1330
1331--
1332-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
1333--
1334
1335INSERT INTO public.users VALUES (2, '2021-08-18 10:48:10.841', '2021-08-18 10:48:10.841', true, NULL, NULL, NULL, NULL, NULL, NULL, '2021-08-18 10:48:10.84', 'admin@inteligenta.io', 'Admin', 'Admin', NULL, '$2a$10$zztedAZScedWin/cCIkkceGZp.T7c.OB4CGzRVTgm5mIoCeg0W9oK', NULL, NULL, '033 444 555', 'ROLE_ADMIN', 'ROLE_ADMIN', 'admin', NULL);
1336INSERT INTO public.users VALUES (8, '2021-08-18 11:00:33.425', '2021-08-18 11:00:33.425', true, NULL, NULL, NULL, '', NULL, NULL, '2021-08-18 11:00:33.425', 'username@gmail.com', 'Корисник', 'Корисник', '1234', '$2a$10$xxO0ZCgGw4e7dZ.JhuVEzeb4mrNE0iGRd3D7Fn5d0n2dGijqgX77a', NULL, NULL, '070 888 999', 'ROLE_EVALUATOR', 'ROLE_EVALUATOR', 'username@gmail.com', 7);
1337INSERT INTO public.users VALUES (9, '2021-08-18 12:35:19.219', '2021-08-18 12:35:19.219', false, NULL, NULL, NULL, NULL, NULL, NULL, '2021-08-18 12:35:19.219', 'user@gmail.com', 'bb', 'bb', '231123', '$2a$10$/J.N2tqVEUQ//OUxvoNBuuuh2Kl8009rdVfh6MTQcprKPvRGKSmI.', NULL, NULL, '123 123', 'ROLE_INSTITUTIONAL_MODERATOR', 'ROLE_INSTITUTIONAL_MODERATOR', 'user@gmail.com', 7);
1338INSERT INTO public.users VALUES (10, '2021-08-18 12:38:04.42', '2021-08-18 12:38:04.42', false, NULL, NULL, NULL, NULL, NULL, NULL, '2021-08-18 12:38:04.42', 'novkorisnik@gmail.com', 'Нов корисник', 'Нов корисник', '45', '$2a$10$0DBkhTKifHQ7uLr72SgXv.q1/hCM73/G956EXIK4AfABU02kPG4/O', NULL, NULL, '070 222 333', 'ROLE_INSTITUTIONAL_MODERATOR', 'ROLE_INSTITUTIONAL_MODERATOR', 'novkorisnik@gmail.com', 7);
1339
1340
1341--
1342-- Data for Name: users_areas_of_interest; Type: TABLE DATA; Schema: public; Owner: postgres
1343--
1344
1345INSERT INTO public.users_areas_of_interest VALUES (2, 1);
1346INSERT INTO public.users_areas_of_interest VALUES (8, 4);
1347INSERT INTO public.users_areas_of_interest VALUES (9, 4);
1348INSERT INTO public.users_areas_of_interest VALUES (10, 4);
1349
1350
1351--
1352-- Name: activity_institution activity_institution_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1353--
1354
1355ALTER TABLE ONLY public.activity_institution
1356 ADD CONSTRAINT activity_institution_pkey PRIMARY KEY (id);
1357
1358
1359--
1360-- Name: activity activity_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1361--
1362
1363ALTER TABLE ONLY public.activity
1364 ADD CONSTRAINT activity_pkey PRIMARY KEY (id);
1365
1366
1367--
1368-- Name: announcement_attachment announcement_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1369--
1370
1371ALTER TABLE ONLY public.announcement_attachment
1372 ADD CONSTRAINT announcement_attachment_pkey PRIMARY KEY (id);
1373
1374
1375--
1376-- Name: announcement_comment announcement_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1377--
1378
1379ALTER TABLE ONLY public.announcement_comment
1380 ADD CONSTRAINT announcement_comment_pkey PRIMARY KEY (id);
1381
1382
1383--
1384-- Name: announcement announcement_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1385--
1386
1387ALTER TABLE ONLY public.announcement
1388 ADD CONSTRAINT announcement_pkey PRIMARY KEY (id);
1389
1390
1391--
1392-- Name: announcement_publication announcement_publication_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1393--
1394
1395ALTER TABLE ONLY public.announcement_publication
1396 ADD CONSTRAINT announcement_publication_pkey PRIMARY KEY (id);
1397
1398
1399--
1400-- Name: announcement_publication_user announcement_publication_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1401--
1402
1403ALTER TABLE ONLY public.announcement_publication_user
1404 ADD CONSTRAINT announcement_publication_user_pkey PRIMARY KEY (id);
1405
1406
1407--
1408-- Name: area_of_interest area_of_interest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1409--
1410
1411ALTER TABLE ONLY public.area_of_interest
1412 ADD CONSTRAINT area_of_interest_pkey PRIMARY KEY (id);
1413
1414
1415--
1416-- Name: attachment attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1417--
1418
1419ALTER TABLE ONLY public.attachment
1420 ADD CONSTRAINT attachment_pkey PRIMARY KEY (id);
1421
1422
1423--
1424-- Name: bbbuser_meeting bbbuser_meeting_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1425--
1426
1427ALTER TABLE ONLY public.bbbuser_meeting
1428 ADD CONSTRAINT bbbuser_meeting_pkey PRIMARY KEY (id);
1429
1430
1431--
1432-- Name: evaluation evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1433--
1434
1435ALTER TABLE ONLY public.evaluation
1436 ADD CONSTRAINT evaluation_pkey PRIMARY KEY (id);
1437
1438
1439--
1440-- Name: faq faq_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1441--
1442
1443ALTER TABLE ONLY public.faq
1444 ADD CONSTRAINT faq_pkey PRIMARY KEY (id);
1445
1446
1447--
1448-- Name: feedback_item_answer feedback_item_answer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1449--
1450
1451ALTER TABLE ONLY public.feedback_item_answer
1452 ADD CONSTRAINT feedback_item_answer_pkey PRIMARY KEY (id);
1453
1454
1455--
1456-- Name: feedback_item feedback_item_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1457--
1458
1459ALTER TABLE ONLY public.feedback_item
1460 ADD CONSTRAINT feedback_item_pkey PRIMARY KEY (id);
1461
1462
1463--
1464-- Name: feedback feedback_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1465--
1466
1467ALTER TABLE ONLY public.feedback
1468 ADD CONSTRAINT feedback_pkey PRIMARY KEY (id);
1469
1470
1471--
1472-- Name: feedback_publication feedback_publication_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1473--
1474
1475ALTER TABLE ONLY public.feedback_publication
1476 ADD CONSTRAINT feedback_publication_pkey PRIMARY KEY (id);
1477
1478
1479--
1480-- Name: indicator indicator_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1481--
1482
1483ALTER TABLE ONLY public.indicator
1484 ADD CONSTRAINT indicator_pkey PRIMARY KEY (id);
1485
1486
1487--
1488-- Name: indicator_report indicator_report_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1489--
1490
1491ALTER TABLE ONLY public.indicator_report
1492 ADD CONSTRAINT indicator_report_pkey PRIMARY KEY (id);
1493
1494
1495--
1496-- Name: institution_category institution_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1497--
1498
1499ALTER TABLE ONLY public.institution_category
1500 ADD CONSTRAINT institution_category_pkey PRIMARY KEY (id);
1501
1502
1503--
1504-- Name: institution institution_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1505--
1506
1507ALTER TABLE ONLY public.institution
1508 ADD CONSTRAINT institution_pkey PRIMARY KEY (id);
1509
1510
1511--
1512-- Name: measure_attachment measure_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1513--
1514
1515ALTER TABLE ONLY public.measure_attachment
1516 ADD CONSTRAINT measure_attachment_pkey PRIMARY KEY (id);
1517
1518
1519--
1520-- Name: measure measure_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1521--
1522
1523ALTER TABLE ONLY public.measure
1524 ADD CONSTRAINT measure_pkey PRIMARY KEY (id);
1525
1526
1527--
1528-- Name: message message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1529--
1530
1531ALTER TABLE ONLY public.message
1532 ADD CONSTRAINT message_pkey PRIMARY KEY (id);
1533
1534
1535--
1536-- Name: nap nap_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1537--
1538
1539ALTER TABLE ONLY public.nap
1540 ADD CONSTRAINT nap_pkey PRIMARY KEY (id);
1541
1542
1543--
1544-- Name: naparea naparea_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1545--
1546
1547ALTER TABLE ONLY public.naparea
1548 ADD CONSTRAINT naparea_pkey PRIMARY KEY (id);
1549
1550
1551--
1552-- Name: naparea_type naparea_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1553--
1554
1555ALTER TABLE ONLY public.naparea_type
1556 ADD CONSTRAINT naparea_type_pkey PRIMARY KEY (id);
1557
1558
1559--
1560-- Name: problem problem_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1561--
1562
1563ALTER TABLE ONLY public.problem
1564 ADD CONSTRAINT problem_pkey PRIMARY KEY (id);
1565
1566
1567--
1568-- Name: public_document_for_year public_document_for_year_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1569--
1570
1571ALTER TABLE ONLY public.public_document_for_year
1572 ADD CONSTRAINT public_document_for_year_pkey PRIMARY KEY (id);
1573
1574
1575--
1576-- Name: public_document_type public_document_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1577--
1578
1579ALTER TABLE ONLY public.public_document_type
1580 ADD CONSTRAINT public_document_type_pkey PRIMARY KEY (id);
1581
1582
1583--
1584-- Name: public_year_report public_year_report_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1585--
1586
1587ALTER TABLE ONLY public.public_year_report
1588 ADD CONSTRAINT public_year_report_pkey PRIMARY KEY (id);
1589
1590
1591--
1592-- Name: question question_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1593--
1594
1595ALTER TABLE ONLY public.question
1596 ADD CONSTRAINT question_pkey PRIMARY KEY (id);
1597
1598
1599--
1600-- Name: report report_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1601--
1602
1603ALTER TABLE ONLY public.report
1604 ADD CONSTRAINT report_pkey PRIMARY KEY (id);
1605
1606
1607--
1608-- Name: request_for_evaluation request_for_evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1609--
1610
1611ALTER TABLE ONLY public.request_for_evaluation
1612 ADD CONSTRAINT request_for_evaluation_pkey PRIMARY KEY (id);
1613
1614
1615--
1616-- Name: status status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1617--
1618
1619ALTER TABLE ONLY public.status
1620 ADD CONSTRAINT status_pkey PRIMARY KEY (id);
1621
1622
1623--
1624-- Name: strategy_goal strategy_goal_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1625--
1626
1627ALTER TABLE ONLY public.strategy_goal
1628 ADD CONSTRAINT strategy_goal_pkey PRIMARY KEY (id);
1629
1630
1631--
1632-- Name: tag tag_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1633--
1634
1635ALTER TABLE ONLY public.tag
1636 ADD CONSTRAINT tag_pkey PRIMARY KEY (id);
1637
1638
1639--
1640-- Name: tag uk_d26iat8oxnw8g2yu2ws6ubil9; Type: CONSTRAINT; Schema: public; Owner: postgres
1641--
1642
1643ALTER TABLE ONLY public.tag
1644 ADD CONSTRAINT uk_d26iat8oxnw8g2yu2ws6ubil9 UNIQUE (tag_name_mk);
1645
1646
1647--
1648-- Name: evaluation_indicator_reports uk_fvjbph66v21c4gdb9cg7qxrlx; Type: CONSTRAINT; Schema: public; Owner: postgres
1649--
1650
1651ALTER TABLE ONLY public.evaluation_indicator_reports
1652 ADD CONSTRAINT uk_fvjbph66v21c4gdb9cg7qxrlx UNIQUE (indicator_reports_id);
1653
1654
1655--
1656-- Name: tag uk_jnhhvyeilcs2hiv9ktcgg9tsi; Type: CONSTRAINT; Schema: public; Owner: postgres
1657--
1658
1659ALTER TABLE ONLY public.tag
1660 ADD CONSTRAINT uk_jnhhvyeilcs2hiv9ktcgg9tsi UNIQUE (tag_name_al);
1661
1662
1663--
1664-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
1665--
1666
1667ALTER TABLE ONLY public.users
1668 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1669
1670
1671--
1672-- Name: feedback_publication fk15ybrimwe7tmpo97m347go2o1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1673--
1674
1675ALTER TABLE ONLY public.feedback_publication
1676 ADD CONSTRAINT fk15ybrimwe7tmpo97m347go2o1 FOREIGN KEY (feedback_id) REFERENCES public.feedback(id);
1677
1678
1679--
1680-- Name: public_document_for_year fk1c5u0ahawyysal2usukaan7rj; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1681--
1682
1683ALTER TABLE ONLY public.public_document_for_year
1684 ADD CONSTRAINT fk1c5u0ahawyysal2usukaan7rj FOREIGN KEY (attachment_id) REFERENCES public.attachment(id);
1685
1686
1687--
1688-- Name: indicator_report fk32lnf2mjwmjgm2dh4ykva460i; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1689--
1690
1691ALTER TABLE ONLY public.indicator_report
1692 ADD CONSTRAINT fk32lnf2mjwmjgm2dh4ykva460i FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
1693
1694
1695--
1696-- Name: nap fk35wov5b68ug7va42fqu851j80; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1697--
1698
1699ALTER TABLE ONLY public.nap
1700 ADD CONSTRAINT fk35wov5b68ug7va42fqu851j80 FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
1701
1702
1703--
1704-- Name: public_year_report fk37j4lb1g789jka5um4862ot0o; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1705--
1706
1707ALTER TABLE ONLY public.public_year_report
1708 ADD CONSTRAINT fk37j4lb1g789jka5um4862ot0o FOREIGN KEY (signed_doc_id) REFERENCES public.attachment(id);
1709
1710
1711--
1712-- Name: indicator_report fk42ovuh962rnx5gvtuh0j3uecv; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1713--
1714
1715ALTER TABLE ONLY public.indicator_report
1716 ADD CONSTRAINT fk42ovuh962rnx5gvtuh0j3uecv FOREIGN KEY (status_id) REFERENCES public.status(id);
1717
1718
1719--
1720-- Name: indicator fk476jevwts4ectw4nl2avxec65; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1721--
1722
1723ALTER TABLE ONLY public.indicator
1724 ADD CONSTRAINT fk476jevwts4ectw4nl2avxec65 FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
1725
1726
1727--
1728-- Name: activity fk4xyqmixx11wrxm8ditkiuh9mn; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1729--
1730
1731ALTER TABLE ONLY public.activity
1732 ADD CONSTRAINT fk4xyqmixx11wrxm8ditkiuh9mn FOREIGN KEY (measure_id) REFERENCES public.measure(id);
1733
1734
1735--
1736-- Name: problem fk4yk9al3ko6fqmkcitnmbn55gm; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1737--
1738
1739ALTER TABLE ONLY public.problem
1740 ADD CONSTRAINT fk4yk9al3ko6fqmkcitnmbn55gm FOREIGN KEY (nap_area_id) REFERENCES public.naparea(id);
1741
1742
1743--
1744-- Name: public_document_for_year fk5soeet9lpdxst77nm6vi3i4x7; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1745--
1746
1747ALTER TABLE ONLY public.public_document_for_year
1748 ADD CONSTRAINT fk5soeet9lpdxst77nm6vi3i4x7 FOREIGN KEY (institution_id) REFERENCES public.institution(id);
1749
1750
1751--
1752-- Name: naparea fk69wnwh2fl73n027k7nenims3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1753--
1754
1755ALTER TABLE ONLY public.naparea
1756 ADD CONSTRAINT fk69wnwh2fl73n027k7nenims3 FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
1757
1758
1759--
1760-- Name: activity_activity_institutions fk6ivxjpxy4dgtg1sk2084c6tk0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1761--
1762
1763ALTER TABLE ONLY public.activity_activity_institutions
1764 ADD CONSTRAINT fk6ivxjpxy4dgtg1sk2084c6tk0 FOREIGN KEY (activity_institutions_id) REFERENCES public.activity_institution(id);
1765
1766
1767--
1768-- Name: nap fk6vmd0r8ocyo23fhkfcw534p9h; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1769--
1770
1771ALTER TABLE ONLY public.nap
1772 ADD CONSTRAINT fk6vmd0r8ocyo23fhkfcw534p9h FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
1773
1774
1775--
1776-- Name: institution fk7abf13doaqecnhis84dq7rkwi; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1777--
1778
1779ALTER TABLE ONLY public.institution
1780 ADD CONSTRAINT fk7abf13doaqecnhis84dq7rkwi FOREIGN KEY (parent_institution_id) REFERENCES public.institution(id);
1781
1782
1783--
1784-- Name: problem fk7as84kw6af6buu4igjuh4n2x0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1785--
1786
1787ALTER TABLE ONLY public.problem
1788 ADD CONSTRAINT fk7as84kw6af6buu4igjuh4n2x0 FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
1789
1790
1791--
1792-- Name: feedback fk7lkrsd5vvjie6595ttepdst1x; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1793--
1794
1795ALTER TABLE ONLY public.feedback
1796 ADD CONSTRAINT fk7lkrsd5vvjie6595ttepdst1x FOREIGN KEY (creator_id) REFERENCES public.users(id);
1797
1798
1799--
1800-- Name: message fk7ojhr1asspj4njoxi7gi4f5a6; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1801--
1802
1803ALTER TABLE ONLY public.message
1804 ADD CONSTRAINT fk7ojhr1asspj4njoxi7gi4f5a6 FOREIGN KEY (question_id) REFERENCES public.question(id);
1805
1806
1807--
1808-- Name: problem fk84wvfikytlxfudqrfl4rf8poc; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1809--
1810
1811ALTER TABLE ONLY public.problem
1812 ADD CONSTRAINT fk84wvfikytlxfudqrfl4rf8poc FOREIGN KEY (nap_id) REFERENCES public.nap(id);
1813
1814
1815--
1816-- Name: feedback_item_answer fk8jctsfbx6c2fof4jaj2aktmbi; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1817--
1818
1819ALTER TABLE ONLY public.feedback_item_answer
1820 ADD CONSTRAINT fk8jctsfbx6c2fof4jaj2aktmbi FOREIGN KEY (attachment_id) REFERENCES public.attachment(id);
1821
1822
1823--
1824-- Name: feedback_publication fk8k32s9lgyfvcreqjfoqrnljej; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1825--
1826
1827ALTER TABLE ONLY public.feedback_publication
1828 ADD CONSTRAINT fk8k32s9lgyfvcreqjfoqrnljej FOREIGN KEY (institution_id) REFERENCES public.institution(id);
1829
1830
1831--
1832-- Name: institution_category fk8opmlt5cn26bythehx0cpgb5c; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1833--
1834
1835ALTER TABLE ONLY public.institution_category
1836 ADD CONSTRAINT fk8opmlt5cn26bythehx0cpgb5c FOREIGN KEY (parent_category_id) REFERENCES public.institution_category(id);
1837
1838
1839--
1840-- Name: area_of_interest fk8x4np0efcusagtaonhbsk4nx8; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1841--
1842
1843ALTER TABLE ONLY public.area_of_interest
1844 ADD CONSTRAINT fk8x4np0efcusagtaonhbsk4nx8 FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
1845
1846
1847--
1848-- Name: institution fk9cm1a572gbj6e2rij1hy95nc2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1849--
1850
1851ALTER TABLE ONLY public.institution
1852 ADD CONSTRAINT fk9cm1a572gbj6e2rij1hy95nc2 FOREIGN KEY (category_id) REFERENCES public.institution_category(id);
1853
1854
1855--
1856-- Name: question fk9hbbb7nlsexvarrbh2l3frdj3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1857--
1858
1859ALTER TABLE ONLY public.question
1860 ADD CONSTRAINT fk9hbbb7nlsexvarrbh2l3frdj3 FOREIGN KEY (author_id) REFERENCES public.users(id);
1861
1862
1863--
1864-- Name: institution fk9p0j7ie6oivggqnnvdua3f3r; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1865--
1866
1867ALTER TABLE ONLY public.institution
1868 ADD CONSTRAINT fk9p0j7ie6oivggqnnvdua3f3r FOREIGN KEY (initial_institution_id) REFERENCES public.institution(id);
1869
1870
1871--
1872-- Name: feedback_item_answer fkaefjhq3cs2gspks2v54q49bv8; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1873--
1874
1875ALTER TABLE ONLY public.feedback_item_answer
1876 ADD CONSTRAINT fkaefjhq3cs2gspks2v54q49bv8 FOREIGN KEY (item_id) REFERENCES public.feedback_item(id);
1877
1878
1879--
1880-- Name: public_document_for_year fkaifcd3qcjc08xssov8dkx78yh; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1881--
1882
1883ALTER TABLE ONLY public.public_document_for_year
1884 ADD CONSTRAINT fkaifcd3qcjc08xssov8dkx78yh FOREIGN KEY (type_id) REFERENCES public.public_document_type(id);
1885
1886
1887--
1888-- Name: nap fkasfoieqnuh9fe7fbmyir1kdt9; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1889--
1890
1891ALTER TABLE ONLY public.nap
1892 ADD CONSTRAINT fkasfoieqnuh9fe7fbmyir1kdt9 FOREIGN KEY (status_id) REFERENCES public.status(id);
1893
1894
1895--
1896-- Name: users_areas_of_interest fkatm86aulqnh724iara1wvjljw; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1897--
1898
1899ALTER TABLE ONLY public.users_areas_of_interest
1900 ADD CONSTRAINT fkatm86aulqnh724iara1wvjljw FOREIGN KEY (users_id) REFERENCES public.users(id);
1901
1902
1903--
1904-- Name: indicator_report fkaxlg298sixjn9bcx1bp829s85; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1905--
1906
1907ALTER TABLE ONLY public.indicator_report
1908 ADD CONSTRAINT fkaxlg298sixjn9bcx1bp829s85 FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
1909
1910
1911--
1912-- Name: naparea_type fkbbppjbkrd7glj94rcw0vg1uro; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1913--
1914
1915ALTER TABLE ONLY public.naparea_type
1916 ADD CONSTRAINT fkbbppjbkrd7glj94rcw0vg1uro FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
1917
1918
1919--
1920-- Name: activity fkcdcr7hr9v20iaavua25uw155w; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1921--
1922
1923ALTER TABLE ONLY public.activity
1924 ADD CONSTRAINT fkcdcr7hr9v20iaavua25uw155w FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
1925
1926
1927--
1928-- Name: evaluation_indicator_reports fkcei2838jvt7h0334j6oguyhiu; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1929--
1930
1931ALTER TABLE ONLY public.evaluation_indicator_reports
1932 ADD CONSTRAINT fkcei2838jvt7h0334j6oguyhiu FOREIGN KEY (evaluation_id) REFERENCES public.evaluation(id);
1933
1934
1935--
1936-- Name: strategy_goal fkcxoxwfky5uxrboums2pk0ha4h; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1937--
1938
1939ALTER TABLE ONLY public.strategy_goal
1940 ADD CONSTRAINT fkcxoxwfky5uxrboums2pk0ha4h FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
1941
1942
1943--
1944-- Name: activity_institution fkd08n4xht4khg6lqritomqchw; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1945--
1946
1947ALTER TABLE ONLY public.activity_institution
1948 ADD CONSTRAINT fkd08n4xht4khg6lqritomqchw FOREIGN KEY (institution_id) REFERENCES public.institution(id);
1949
1950
1951--
1952-- Name: message fkd229bwcvcbs5qg91ifmydqwtd; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1953--
1954
1955ALTER TABLE ONLY public.message
1956 ADD CONSTRAINT fkd229bwcvcbs5qg91ifmydqwtd FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
1957
1958
1959--
1960-- Name: measure fkd3cud8ayfih8e4h9ucsrlt5vo; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1961--
1962
1963ALTER TABLE ONLY public.measure
1964 ADD CONSTRAINT fkd3cud8ayfih8e4h9ucsrlt5vo FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
1965
1966
1967--
1968-- Name: nap fkdemah6w784m9ny66158lotwnu; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1969--
1970
1971ALTER TABLE ONLY public.nap
1972 ADD CONSTRAINT fkdemah6w784m9ny66158lotwnu FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
1973
1974
1975--
1976-- Name: naparea fkdqx3nu31y5bkc71d4157xa8ew; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1977--
1978
1979ALTER TABLE ONLY public.naparea
1980 ADD CONSTRAINT fkdqx3nu31y5bkc71d4157xa8ew FOREIGN KEY (nap_area_type_id) REFERENCES public.naparea_type(id);
1981
1982
1983--
1984-- Name: activity fke36bp5sq2t14t09mvhli00w0s; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1985--
1986
1987ALTER TABLE ONLY public.activity
1988 ADD CONSTRAINT fke36bp5sq2t14t09mvhli00w0s FOREIGN KEY (status_id) REFERENCES public.status(id);
1989
1990
1991--
1992-- Name: measure fkeroq4jxy4kllmyh6v77cr2n69; Type: FK CONSTRAINT; Schema: public; Owner: postgres
1993--
1994
1995ALTER TABLE ONLY public.measure
1996 ADD CONSTRAINT fkeroq4jxy4kllmyh6v77cr2n69 FOREIGN KEY (problem_id) REFERENCES public.problem(id);
1997
1998
1999--
2000-- Name: users fkes3l5tviwmnu2d0gy350kdfht; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2001--
2002
2003ALTER TABLE ONLY public.users
2004 ADD CONSTRAINT fkes3l5tviwmnu2d0gy350kdfht FOREIGN KEY (institution_id) REFERENCES public.institution(id);
2005
2006
2007--
2008-- Name: naparea fkfkrh40wyy9q65sm27kpqw3ilr; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2009--
2010
2011ALTER TABLE ONLY public.naparea
2012 ADD CONSTRAINT fkfkrh40wyy9q65sm27kpqw3ilr FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
2013
2014
2015--
2016-- Name: feedback_item fkfmvei5yqjfb3up1flsxwts8ob; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2017--
2018
2019ALTER TABLE ONLY public.feedback_item
2020 ADD CONSTRAINT fkfmvei5yqjfb3up1flsxwts8ob FOREIGN KEY (feedback_id) REFERENCES public.feedback(id);
2021
2022
2023--
2024-- Name: problem fkftvp0qbqmvo1jk3mgppr5monf; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2025--
2026
2027ALTER TABLE ONLY public.problem
2028 ADD CONSTRAINT fkftvp0qbqmvo1jk3mgppr5monf FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
2029
2030
2031--
2032-- Name: feedback_item_answer fkg0yiu35n27c9mm3j6ifiu1b2f; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2033--
2034
2035ALTER TABLE ONLY public.feedback_item_answer
2036 ADD CONSTRAINT fkg0yiu35n27c9mm3j6ifiu1b2f FOREIGN KEY (publication_id) REFERENCES public.feedback_publication(id);
2037
2038
2039--
2040-- Name: announcement_publication fkg35gdmdoc6hsq7kdvv2a0kid0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2041--
2042
2043ALTER TABLE ONLY public.announcement_publication
2044 ADD CONSTRAINT fkg35gdmdoc6hsq7kdvv2a0kid0 FOREIGN KEY (announcement_id) REFERENCES public.announcement(id);
2045
2046
2047--
2048-- Name: strategy_goal fkg9drhicd70ffropcdcu5hh1rv; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2049--
2050
2051ALTER TABLE ONLY public.strategy_goal
2052 ADD CONSTRAINT fkg9drhicd70ffropcdcu5hh1rv FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
2053
2054
2055--
2056-- Name: naparea_type fkghwotco8l92r9le5h8y3c2psl; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2057--
2058
2059ALTER TABLE ONLY public.naparea_type
2060 ADD CONSTRAINT fkghwotco8l92r9le5h8y3c2psl FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
2061
2062
2063--
2064-- Name: naparea fkgli7qbii3y1986h6v045ur1te; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2065--
2066
2067ALTER TABLE ONLY public.naparea
2068 ADD CONSTRAINT fkgli7qbii3y1986h6v045ur1te FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
2069
2070
2071--
2072-- Name: activity_activity_institutions fkgvb805yt8rgbj81i1k9wukqxf; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2073--
2074
2075ALTER TABLE ONLY public.activity_activity_institutions
2076 ADD CONSTRAINT fkgvb805yt8rgbj81i1k9wukqxf FOREIGN KEY (activity_list_id) REFERENCES public.activity(id);
2077
2078
2079--
2080-- Name: activity fkgw4ex5rm487xkyiyixpvy9s6n; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2081--
2082
2083ALTER TABLE ONLY public.activity
2084 ADD CONSTRAINT fkgw4ex5rm487xkyiyixpvy9s6n FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
2085
2086
2087--
2088-- Name: announcement_publication fkgx1jww9w2ckwyt9for7incxsb; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2089--
2090
2091ALTER TABLE ONLY public.announcement_publication
2092 ADD CONSTRAINT fkgx1jww9w2ckwyt9for7incxsb FOREIGN KEY (receiver_id) REFERENCES public.institution(id);
2093
2094
2095--
2096-- Name: question fkhv4rohk053q0rxbi62y33qcb4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2097--
2098
2099ALTER TABLE ONLY public.question
2100 ADD CONSTRAINT fkhv4rohk053q0rxbi62y33qcb4 FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
2101
2102
2103--
2104-- Name: announcement_comment fki72u02fqknowb9i0h8d13qcis; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2105--
2106
2107ALTER TABLE ONLY public.announcement_comment
2108 ADD CONSTRAINT fki72u02fqknowb9i0h8d13qcis FOREIGN KEY (announcement_id) REFERENCES public.announcement(id);
2109
2110
2111--
2112-- Name: public_year_report fkjckdc9shn9b5ak41eseb5k3rk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2113--
2114
2115ALTER TABLE ONLY public.public_year_report
2116 ADD CONSTRAINT fkjckdc9shn9b5ak41eseb5k3rk FOREIGN KEY (doc_id) REFERENCES public.attachment(id);
2117
2118
2119--
2120-- Name: indicator fkjw3nq57hpy21beqlg08n394o6; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2121--
2122
2123ALTER TABLE ONLY public.indicator
2124 ADD CONSTRAINT fkjw3nq57hpy21beqlg08n394o6 FOREIGN KEY (institution_id) REFERENCES public.activity_institution(id);
2125
2126
2127--
2128-- Name: question fkk72iaui78fsejpwr0is4x2t2w; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2129--
2130
2131ALTER TABLE ONLY public.question
2132 ADD CONSTRAINT fkk72iaui78fsejpwr0is4x2t2w FOREIGN KEY (area_of_interest_id) REFERENCES public.area_of_interest(id);
2133
2134
2135--
2136-- Name: area_of_interest fkl0n7vf8xjgjo9eukoeckoleft; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2137--
2138
2139ALTER TABLE ONLY public.area_of_interest
2140 ADD CONSTRAINT fkl0n7vf8xjgjo9eukoeckoleft FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
2141
2142
2143--
2144-- Name: request_for_evaluation fkl8gkgc4lbyy6jaf0hqtiu5p2k; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2145--
2146
2147ALTER TABLE ONLY public.request_for_evaluation
2148 ADD CONSTRAINT fkl8gkgc4lbyy6jaf0hqtiu5p2k FOREIGN KEY (sender_id) REFERENCES public.users(id);
2149
2150
2151--
2152-- Name: feedback fklft5ts3o39ch35qtor7s00lh5; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2153--
2154
2155ALTER TABLE ONLY public.feedback
2156 ADD CONSTRAINT fklft5ts3o39ch35qtor7s00lh5 FOREIGN KEY (area_of_interest_id) REFERENCES public.area_of_interest(id);
2157
2158
2159--
2160-- Name: bbbuser_meeting_institutions fklgrilw16268uxgh10ghsx8is5; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2161--
2162
2163ALTER TABLE ONLY public.bbbuser_meeting_institutions
2164 ADD CONSTRAINT fklgrilw16268uxgh10ghsx8is5 FOREIGN KEY (institutions_id) REFERENCES public.institution(id);
2165
2166
2167--
2168-- Name: strategy_goal fklgyexpijw5163r0b7cpn0si9p; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2169--
2170
2171ALTER TABLE ONLY public.strategy_goal
2172 ADD CONSTRAINT fklgyexpijw5163r0b7cpn0si9p FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
2173
2174
2175--
2176-- Name: message fklqr4fixlintqc9di9s3u665r4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2177--
2178
2179ALTER TABLE ONLY public.message
2180 ADD CONSTRAINT fklqr4fixlintqc9di9s3u665r4 FOREIGN KEY (author_id) REFERENCES public.users(id);
2181
2182
2183--
2184-- Name: problem_strategy_goals fklweobyk5mh3u3a0ob5i5ef52b; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2185--
2186
2187ALTER TABLE ONLY public.problem_strategy_goals
2188 ADD CONSTRAINT fklweobyk5mh3u3a0ob5i5ef52b FOREIGN KEY (strategy_goals_id) REFERENCES public.strategy_goal(id);
2189
2190
2191--
2192-- Name: activity fkmdjogeqrwn1llxm2l6edus2v2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2193--
2194
2195ALTER TABLE ONLY public.activity
2196 ADD CONSTRAINT fkmdjogeqrwn1llxm2l6edus2v2 FOREIGN KEY (competent_institution_id) REFERENCES public.activity_institution(id);
2197
2198
2199--
2200-- Name: indicator_report fkmi3ua7vj4avs78lpkw342ti3w; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2201--
2202
2203ALTER TABLE ONLY public.indicator_report
2204 ADD CONSTRAINT fkmi3ua7vj4avs78lpkw342ti3w FOREIGN KEY (updated_by_user_moderator_id) REFERENCES public.users(id);
2205
2206
2207--
2208-- Name: indicator_report fknbxq0r103tga2c6jdm3s3k5nn; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2209--
2210
2211ALTER TABLE ONLY public.indicator_report
2212 ADD CONSTRAINT fknbxq0r103tga2c6jdm3s3k5nn FOREIGN KEY (activity_id) REFERENCES public.activity(id);
2213
2214
2215--
2216-- Name: institution_tags fko1b7826aj50mrvl670aa8lf9w; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2217--
2218
2219ALTER TABLE ONLY public.institution_tags
2220 ADD CONSTRAINT fko1b7826aj50mrvl670aa8lf9w FOREIGN KEY (institutions_id) REFERENCES public.institution(id);
2221
2222
2223--
2224-- Name: indicator fko6vg78sx0sqe4f5jpd0qxiwvy; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2225--
2226
2227ALTER TABLE ONLY public.indicator
2228 ADD CONSTRAINT fko6vg78sx0sqe4f5jpd0qxiwvy FOREIGN KEY (status_id) REFERENCES public.status(id);
2229
2230
2231--
2232-- Name: users_areas_of_interest fkobvpf63mxvaj1otcd08ief4tt; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2233--
2234
2235ALTER TABLE ONLY public.users_areas_of_interest
2236 ADD CONSTRAINT fkobvpf63mxvaj1otcd08ief4tt FOREIGN KEY (areas_of_interest_id) REFERENCES public.area_of_interest(id);
2237
2238
2239--
2240-- Name: bbbuser_meeting_institutions fkoo8ubl2rqron8amolk21v62kf; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2241--
2242
2243ALTER TABLE ONLY public.bbbuser_meeting_institutions
2244 ADD CONSTRAINT fkoo8ubl2rqron8amolk21v62kf FOREIGN KEY (bbb_user_meetings_id) REFERENCES public.bbbuser_meeting(id);
2245
2246
2247--
2248-- Name: evaluation fkoowx9kg9gdml2xtbd53hhon75; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2249--
2250
2251ALTER TABLE ONLY public.evaluation
2252 ADD CONSTRAINT fkoowx9kg9gdml2xtbd53hhon75 FOREIGN KEY (nap_id) REFERENCES public.nap(id);
2253
2254
2255--
2256-- Name: announcement fkor1vhhnjow35hp57g0p3g7qty; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2257--
2258
2259ALTER TABLE ONLY public.announcement
2260 ADD CONSTRAINT fkor1vhhnjow35hp57g0p3g7qty FOREIGN KEY (area_of_interest_id) REFERENCES public.area_of_interest(id);
2261
2262
2263--
2264-- Name: measure fkosfxokn23ox0wkragc22nc82t; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2265--
2266
2267ALTER TABLE ONLY public.measure
2268 ADD CONSTRAINT fkosfxokn23ox0wkragc22nc82t FOREIGN KEY (status_id) REFERENCES public.status(id);
2269
2270
2271--
2272-- Name: public_year_report fkouv9leuuiofaed3n5r4867jxw; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2273--
2274
2275ALTER TABLE ONLY public.public_year_report
2276 ADD CONSTRAINT fkouv9leuuiofaed3n5r4867jxw FOREIGN KEY (report_id) REFERENCES public.report(id);
2277
2278
2279--
2280-- Name: activity fkp19uy9f2tra7jnbhsauwufyyg; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2281--
2282
2283ALTER TABLE ONLY public.activity
2284 ADD CONSTRAINT fkp19uy9f2tra7jnbhsauwufyyg FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
2285
2286
2287--
2288-- Name: area_of_interest fkp3w9hyijuj7eoetbdaqqm0wa1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2289--
2290
2291ALTER TABLE ONLY public.area_of_interest
2292 ADD CONSTRAINT fkp3w9hyijuj7eoetbdaqqm0wa1 FOREIGN KEY (created_by_user_id) REFERENCES public.users(id);
2293
2294
2295--
2296-- Name: indicator fkp81f9agxu6vxixeaw9aafgftp; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2297--
2298
2299ALTER TABLE ONLY public.indicator
2300 ADD CONSTRAINT fkp81f9agxu6vxixeaw9aafgftp FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
2301
2302
2303--
2304-- Name: naparea_type fkpu4bewii6l166vikvcg53r4po; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2305--
2306
2307ALTER TABLE ONLY public.naparea_type
2308 ADD CONSTRAINT fkpu4bewii6l166vikvcg53r4po FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
2309
2310
2311--
2312-- Name: measure fkpvvfpfv0k5uw7ph1x3juwox2r; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2313--
2314
2315ALTER TABLE ONLY public.measure
2316 ADD CONSTRAINT fkpvvfpfv0k5uw7ph1x3juwox2r FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
2317
2318
2319--
2320-- Name: announcement_comment fkq51tsi60v4ntn8819fh9jtxgy; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2321--
2322
2323ALTER TABLE ONLY public.announcement_comment
2324 ADD CONSTRAINT fkq51tsi60v4ntn8819fh9jtxgy FOREIGN KEY (submitted_by_user_id) REFERENCES public.users(id);
2325
2326
2327--
2328-- Name: announcement fkq7dop4xcpmiu4o5r8vfpnnk7u; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2329--
2330
2331ALTER TABLE ONLY public.announcement
2332 ADD CONSTRAINT fkq7dop4xcpmiu4o5r8vfpnnk7u FOREIGN KEY (creator_id) REFERENCES public.users(id);
2333
2334
2335--
2336-- Name: indicator_report fkqf88nl5cfi98qk6uike3rhor2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2337--
2338
2339ALTER TABLE ONLY public.indicator_report
2340 ADD CONSTRAINT fkqf88nl5cfi98qk6uike3rhor2 FOREIGN KEY (evaluation_id) REFERENCES public.evaluation(id);
2341
2342
2343--
2344-- Name: request_for_evaluation fkqgd7d6529gye3ihjisoxk4eng; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2345--
2346
2347ALTER TABLE ONLY public.request_for_evaluation
2348 ADD CONSTRAINT fkqgd7d6529gye3ihjisoxk4eng FOREIGN KEY (receiver_id) REFERENCES public.institution(id);
2349
2350
2351--
2352-- Name: evaluation_indicator_reports fkqhagauv7sft500sdfb3v6d6qy; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2353--
2354
2355ALTER TABLE ONLY public.evaluation_indicator_reports
2356 ADD CONSTRAINT fkqhagauv7sft500sdfb3v6d6qy FOREIGN KEY (indicator_reports_id) REFERENCES public.indicator_report(id);
2357
2358
2359--
2360-- Name: indicator_report fkqouep5jrfvaw2eq1xyo68gguh; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2361--
2362
2363ALTER TABLE ONLY public.indicator_report
2364 ADD CONSTRAINT fkqouep5jrfvaw2eq1xyo68gguh FOREIGN KEY (updated_by_user_evaluator_id) REFERENCES public.users(id);
2365
2366
2367--
2368-- Name: public_year_report fkqwvv3aqjkwn8twe0lln9fg00e; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2369--
2370
2371ALTER TABLE ONLY public.public_year_report
2372 ADD CONSTRAINT fkqwvv3aqjkwn8twe0lln9fg00e FOREIGN KEY (institution_id) REFERENCES public.institution(id);
2373
2374
2375--
2376-- Name: institution_tags fkss7p56403bnvx1gd7mr1rx6a0; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2377--
2378
2379ALTER TABLE ONLY public.institution_tags
2380 ADD CONSTRAINT fkss7p56403bnvx1gd7mr1rx6a0 FOREIGN KEY (tags_id) REFERENCES public.tag(id);
2381
2382
2383--
2384-- Name: problem_strategy_goals fkstyu3sixwtehlj8k8fuj9mp3v; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2385--
2386
2387ALTER TABLE ONLY public.problem_strategy_goals
2388 ADD CONSTRAINT fkstyu3sixwtehlj8k8fuj9mp3v FOREIGN KEY (problems_id) REFERENCES public.problem(id);
2389
2390
2391--
2392-- Name: message fkt4gjpvxlwdkb0tonr9pd5ftw1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2393--
2394
2395ALTER TABLE ONLY public.message
2396 ADD CONSTRAINT fkt4gjpvxlwdkb0tonr9pd5ftw1 FOREIGN KEY (parent_message_id) REFERENCES public.message(id);
2397
2398
2399--
2400-- Name: indicator fktdwu913dof8jdsjlpni0ka6rk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2401--
2402
2403ALTER TABLE ONLY public.indicator
2404 ADD CONSTRAINT fktdwu913dof8jdsjlpni0ka6rk FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
2405
2406
2407--
2408-- Name: measure fkteeww2f0o1d59chvgwun8if09; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2409--
2410
2411ALTER TABLE ONLY public.measure
2412 ADD CONSTRAINT fkteeww2f0o1d59chvgwun8if09 FOREIGN KEY (updated_by_user_id) REFERENCES public.users(id);
2413
2414
2415--
2416-- Name: indicator fktmhe8xs412gedmlq55viwxsj9; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2417--
2418
2419ALTER TABLE ONLY public.indicator
2420 ADD CONSTRAINT fktmhe8xs412gedmlq55viwxsj9 FOREIGN KEY (activity_id) REFERENCES public.activity(id);
2421
2422
2423--
2424-- Name: problem fktr577ncqihhdqswh9vybiyu5p; Type: FK CONSTRAINT; Schema: public; Owner: postgres
2425--
2426
2427ALTER TABLE ONLY public.problem
2428 ADD CONSTRAINT fktr577ncqihhdqswh9vybiyu5p FOREIGN KEY (deleted_by_user_id) REFERENCES public.users(id);
2429
2430
2431
2432create or replace function categories_recursive_function(bigint)
2433 returns TABLE(id bigint)
2434 language sql
2435as
2436$$
2437with recursive ancestry as (
2438 select ic.id
2439 from institution_category ic
2440 where ic.id = $1
2441
2442 union all
2443
2444 select icr.id
2445 from institution_category icr
2446 inner join ancestry a on a.id = icr.parent_category_id
2447)
2448select *
2449from ancestry
2450$$;
2451
2452create or replace function institutions_recursive_function(bigint)
2453 returns TABLE(id bigint)
2454 language sql
2455as
2456$$
2457with recursive ancestry as (
2458 select i.id
2459 from institution i
2460 where i.id = $1
2461
2462 union all
2463
2464 select ins.id
2465 from institution ins
2466 inner join ancestry a on a.id = ins.parent_institution_id
2467)
2468select *
2469from ancestry
2470$$;
2471--
2472-- PostgreSQL database dump complete
2473--
2474
2475