ffad8010acdf29a2730266ba2c0c898b290fccd3
[kivitendo-erp.git] / Test / etc / auth.dump
1 --
2 -- PostgreSQL database dump
3 --
4
5 -- Dumped from database version 9.5.24
6 -- Dumped by pg_dump version 9.5.24
7
8 SET statement_timeout = 0;
9 SET lock_timeout = 0;
10 SET client_encoding = 'UTF8';
11 SET standard_conforming_strings = on;
12 SELECT pg_catalog.set_config('search_path', '', false);
13 SET check_function_bodies = false;
14 SET xmloption = content;
15 SET client_min_messages = warning;
16 SET row_security = off;
17
18 --
19 -- Name: auth; Type: SCHEMA; Schema: -; Owner: kivitendo
20 --
21
22 CREATE SCHEMA auth;
23
24
25 ALTER SCHEMA auth OWNER TO kivitendo;
26
27 --
28 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
29 --
30
31 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
32
33
34 --
35 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
36 --
37
38 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
39
40
41 SET default_tablespace = '';
42
43 SET default_with_oids = false;
44
45 --
46 -- Name: clients; Type: TABLE; Schema: auth; Owner: kivitendo
47 --
48
49 CREATE TABLE auth.clients (
50     id integer NOT NULL,
51     name text NOT NULL,
52     dbhost text NOT NULL,
53     dbport integer DEFAULT 5432 NOT NULL,
54     dbname text NOT NULL,
55     dbuser text NOT NULL,
56     dbpasswd text NOT NULL,
57     is_default boolean DEFAULT false NOT NULL,
58     task_server_user_id integer
59 );
60
61
62 ALTER TABLE auth.clients OWNER TO kivitendo;
63
64 --
65 -- Name: clients_groups; Type: TABLE; Schema: auth; Owner: kivitendo
66 --
67
68 CREATE TABLE auth.clients_groups (
69     client_id integer NOT NULL,
70     group_id integer NOT NULL
71 );
72
73
74 ALTER TABLE auth.clients_groups OWNER TO kivitendo;
75
76 --
77 -- Name: clients_id_seq; Type: SEQUENCE; Schema: auth; Owner: kivitendo
78 --
79
80 CREATE SEQUENCE auth.clients_id_seq
81     START WITH 1
82     INCREMENT BY 1
83     NO MINVALUE
84     NO MAXVALUE
85     CACHE 1;
86
87
88 ALTER TABLE auth.clients_id_seq OWNER TO kivitendo;
89
90 --
91 -- Name: clients_id_seq; Type: SEQUENCE OWNED BY; Schema: auth; Owner: kivitendo
92 --
93
94 ALTER SEQUENCE auth.clients_id_seq OWNED BY auth.clients.id;
95
96
97 --
98 -- Name: clients_users; Type: TABLE; Schema: auth; Owner: kivitendo
99 --
100
101 CREATE TABLE auth.clients_users (
102     client_id integer NOT NULL,
103     user_id integer NOT NULL
104 );
105
106
107 ALTER TABLE auth.clients_users OWNER TO kivitendo;
108
109 --
110 -- Name: group_id_seq; Type: SEQUENCE; Schema: auth; Owner: kivitendo
111 --
112
113 CREATE SEQUENCE auth.group_id_seq
114     START WITH 1
115     INCREMENT BY 1
116     NO MINVALUE
117     NO MAXVALUE
118     CACHE 1;
119
120
121 ALTER TABLE auth.group_id_seq OWNER TO kivitendo;
122
123 --
124 -- Name: group; Type: TABLE; Schema: auth; Owner: kivitendo
125 --
126
127 CREATE TABLE auth."group" (
128     id integer DEFAULT nextval('auth.group_id_seq'::regclass) NOT NULL,
129     name text NOT NULL,
130     description text
131 );
132
133
134 ALTER TABLE auth."group" OWNER TO kivitendo;
135
136 --
137 -- Name: group_rights; Type: TABLE; Schema: auth; Owner: kivitendo
138 --
139
140 CREATE TABLE auth.group_rights (
141     group_id integer NOT NULL,
142     "right" text NOT NULL,
143     granted boolean NOT NULL
144 );
145
146
147 ALTER TABLE auth.group_rights OWNER TO kivitendo;
148
149 --
150 -- Name: master_rights; Type: TABLE; Schema: auth; Owner: kivitendo
151 --
152
153 CREATE TABLE auth.master_rights (
154     id integer NOT NULL,
155     "position" integer NOT NULL,
156     name text NOT NULL,
157     description text NOT NULL,
158     category boolean DEFAULT false NOT NULL
159 );
160
161
162 ALTER TABLE auth.master_rights OWNER TO kivitendo;
163
164 --
165 -- Name: master_rights_id_seq; Type: SEQUENCE; Schema: auth; Owner: kivitendo
166 --
167
168 CREATE SEQUENCE auth.master_rights_id_seq
169     START WITH 1
170     INCREMENT BY 1
171     NO MINVALUE
172     NO MAXVALUE
173     CACHE 1;
174
175
176 ALTER TABLE auth.master_rights_id_seq OWNER TO kivitendo;
177
178 --
179 -- Name: master_rights_id_seq; Type: SEQUENCE OWNED BY; Schema: auth; Owner: kivitendo
180 --
181
182 ALTER SEQUENCE auth.master_rights_id_seq OWNED BY auth.master_rights.id;
183
184
185 --
186 -- Name: schema_info; Type: TABLE; Schema: auth; Owner: kivitendo
187 --
188
189 CREATE TABLE auth.schema_info (
190     tag text NOT NULL,
191     login text,
192     itime timestamp without time zone DEFAULT now()
193 );
194
195
196 ALTER TABLE auth.schema_info OWNER TO kivitendo;
197
198 --
199 -- Name: session; Type: TABLE; Schema: auth; Owner: kivitendo
200 --
201
202 CREATE TABLE auth.session (
203     id text NOT NULL,
204     ip_address inet,
205     mtime timestamp without time zone,
206     api_token text
207 );
208
209
210 ALTER TABLE auth.session OWNER TO kivitendo;
211
212 --
213 -- Name: session_content; Type: TABLE; Schema: auth; Owner: kivitendo
214 --
215
216 CREATE TABLE auth.session_content (
217     session_id text NOT NULL,
218     sess_key text NOT NULL,
219     sess_value text,
220     auto_restore boolean
221 );
222
223
224 ALTER TABLE auth.session_content OWNER TO kivitendo;
225
226 --
227 -- Name: user_id_seq; Type: SEQUENCE; Schema: auth; Owner: kivitendo
228 --
229
230 CREATE SEQUENCE auth.user_id_seq
231     START WITH 1
232     INCREMENT BY 1
233     NO MINVALUE
234     NO MAXVALUE
235     CACHE 1;
236
237
238 ALTER TABLE auth.user_id_seq OWNER TO kivitendo;
239
240 --
241 -- Name: user; Type: TABLE; Schema: auth; Owner: kivitendo
242 --
243
244 CREATE TABLE auth."user" (
245     id integer DEFAULT nextval('auth.user_id_seq'::regclass) NOT NULL,
246     login text NOT NULL,
247     password text
248 );
249
250
251 ALTER TABLE auth."user" OWNER TO kivitendo;
252
253 --
254 -- Name: user_config; Type: TABLE; Schema: auth; Owner: kivitendo
255 --
256
257 CREATE TABLE auth.user_config (
258     user_id integer NOT NULL,
259     cfg_key text NOT NULL,
260     cfg_value text
261 );
262
263
264 ALTER TABLE auth.user_config OWNER TO kivitendo;
265
266 --
267 -- Name: user_group; Type: TABLE; Schema: auth; Owner: kivitendo
268 --
269
270 CREATE TABLE auth.user_group (
271     user_id integer NOT NULL,
272     group_id integer NOT NULL
273 );
274
275
276 ALTER TABLE auth.user_group OWNER TO kivitendo;
277
278 --
279 -- Name: id; Type: DEFAULT; Schema: auth; Owner: kivitendo
280 --
281
282 ALTER TABLE ONLY auth.clients ALTER COLUMN id SET DEFAULT nextval('auth.clients_id_seq'::regclass);
283
284
285 --
286 -- Name: id; Type: DEFAULT; Schema: auth; Owner: kivitendo
287 --
288
289 ALTER TABLE ONLY auth.master_rights ALTER COLUMN id SET DEFAULT nextval('auth.master_rights_id_seq'::regclass);
290
291
292 --
293 -- Data for Name: clients; Type: TABLE DATA; Schema: auth; Owner: kivitendo
294 --
295
296 COPY auth.clients (id, name, dbhost, dbport, dbname, dbuser, dbpasswd, is_default, task_server_user_id) FROM stdin;
297 1       firma   localhost       5432    firma   kivitendo       kivitendo       t       \N
298 \.
299
300
301 --
302 -- Data for Name: clients_groups; Type: TABLE DATA; Schema: auth; Owner: kivitendo
303 --
304
305 COPY auth.clients_groups (client_id, group_id) FROM stdin;
306 1       1
307 \.
308
309
310 --
311 -- Name: clients_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: kivitendo
312 --
313
314 SELECT pg_catalog.setval('auth.clients_id_seq', 1, true);
315
316
317 --
318 -- Data for Name: clients_users; Type: TABLE DATA; Schema: auth; Owner: kivitendo
319 --
320
321 COPY auth.clients_users (client_id, user_id) FROM stdin;
322 1       1
323 \.
324
325
326 --
327 -- Data for Name: group; Type: TABLE DATA; Schema: auth; Owner: kivitendo
328 --
329
330 COPY auth."group" (id, name, description) FROM stdin;
331 1       Vollzugriff     Vollzugriff
332 \.
333
334
335 --
336 -- Name: group_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: kivitendo
337 --
338
339 SELECT pg_catalog.setval('auth.group_id_seq', 1, true);
340
341
342 --
343 -- Data for Name: group_rights; Type: TABLE DATA; Schema: auth; Owner: kivitendo
344 --
345
346 COPY auth.group_rights (group_id, "right", granted) FROM stdin;
347 1       customer_vendor_edit    t
348 1       customer_vendor_all_edit        t
349 1       part_service_assembly_edit      t
350 1       part_service_assembly_details   t
351 1       shop_part_edit  t
352 1       assembly_edit   t
353 1       project_edit    t
354 1       project_edit_view_invoices_permission   t
355 1       show_extra_record_tab_customer  t
356 1       show_extra_record_tab_vendor    t
357 1       requirement_spec_edit   t
358 1       sales_quotation_edit    t
359 1       shop_order      t
360 1       sales_order_edit        t
361 1       sales_delivery_order_edit       t
362 1       invoice_edit    t
363 1       dunning_edit    t
364 1       sales_letter_edit       t
365 1       sales_all_edit  t
366 1       sales_edit_prices       t
367 1       show_ar_transactions    t
368 1       delivery_plan   t
369 1       delivery_value_report   t
370 1       sales_letter_report     t
371 1       import_ar       t
372 1       request_quotation_edit  t
373 1       purchase_order_edit     t
374 1       purchase_delivery_order_edit    t
375 1       vendor_invoice_edit     t
376 1       purchase_letter_edit    t
377 1       purchase_all_edit       t
378 1       purchase_edit_prices    t
379 1       show_ap_transactions    t
380 1       purchase_letter_report  t
381 1       import_ap       t
382 1       warehouse_contents      t
383 1       warehouse_management    t
384 1       general_ledger  t
385 1       gl_transactions t
386 1       ar_transactions t
387 1       ap_transactions t
388 1       datev_export    t
389 1       cash    t
390 1       bank_transaction        t
391 1       report  t
392 1       advance_turnover_tax_return     t
393 1       batch_printing  f
394 1       config  t
395 1       admin   t
396 1       edit_shop_config        t
397 1       custom_data_export_designer     t
398 1       email_bcc       f
399 1       email_journal   f
400 1       email_employee_readall  f
401 1       productivity    f
402 1       display_admin_link      f
403 1       record_links    f
404 1       all_drafts_edit f
405 \.
406
407
408 --
409 -- Data for Name: master_rights; Type: TABLE DATA; Schema: auth; Owner: kivitendo
410 --
411
412 COPY auth.master_rights (id, "position", name, description, category) FROM stdin;
413 1       100     master_data     Master Data     t
414 2       200     customer_vendor_edit    Create customers and vendors. Edit all vendors. Edit only customers where salesman equals employee (login)      f
415 3       300     customer_vendor_all_edit        Create customers and vendors. Edit all vendors. Edit all customers      f
416 4       400     part_service_assembly_edit      Create and edit parts, services, assemblies     f
417 5       500     part_service_assembly_details   Show details and reports of parts, services, assemblies f
418 6       600     project_edit    Create and edit projects        f
419 7       700     ar      AR      t
420 8       800     requirement_spec_edit   Create and edit requirement specs       f
421 9       900     sales_quotation_edit    Create and edit sales quotations        f
422 10      1000    sales_order_edit        Create and edit sales orders    f
423 11      1100    sales_delivery_order_edit       Create and edit sales delivery orders   f
424 12      1200    invoice_edit    Create and edit invoices and credit notes       f
425 13      1300    dunning_edit    Create and edit dunnings        f
426 14      1400    sales_letter_edit       Edit sales letters      f
427 15      1500    sales_all_edit  View/edit all employees sales documents f
428 17      1700    show_ar_transactions    Show AR transactions as part of AR invoice report       f
429 18      1800    delivery_plan   Show delivery plan      f
430 19      1900    delivery_value_report   Show delivery value report      f
431 20      2000    sales_letter_report     Show sales letters report       f
432 21      2100    ap      AP      t
433 22      2200    request_quotation_edit  Create and edit RFQs    f
434 23      2300    purchase_order_edit     Create and edit purchase orders f
435 24      2400    purchase_delivery_order_edit    Create and edit purchase delivery orders        f
436 25      2500    vendor_invoice_edit     Create and edit vendor invoices f
437 26      2600    show_ap_transactions    Show AP transactions as part of AP invoice report       f
438 27      2700    warehouse       Warehouse management    t
439 28      2800    warehouse_contents      View warehouse content  f
440 29      2900    warehouse_management    Warehouse management    f
441 30      3000    general_ledger_cash     General ledger and cash t
442 32      3200    datev_export    DATEV Export    f
443 33      3300    cash    Receipt, payment, reconciliation        f
444 34      3400    bank_transaction        Bank transactions       f
445 35      3500    reports Reports t
446 36      3600    report  All reports     f
447 37      3700    advance_turnover_tax_return     Advance turnover tax return     f
448 38      3800    batch_printing_category Batch Printing  t
449 39      3900    batch_printing  Batch Printing  f
450 40      4000    configuration   Configuration   t
451 41      4100    config  Change kivitendo installation settings (most entries in the 'System' menu)      f
452 42      4200    admin   Client administration: configuration, editing templates, task server control, background jobs (remaining entries in the 'System' menu)  f
453 43      4300    others  Others  t
454 44      4400    email_bcc       May set the BCC field when sending emails       f
455 45      4500    productivity    Productivity    f
456 46      4600    display_admin_link      Show administration link        f
457 31      3100    general_ledger  AP/AR Aging & Journal   f
458 16      1600    sales_edit_prices       Edit prices and discount (if not used, textfield is ONLY set readonly)  f
459 47      5000    all_drafts_edit Edit all drafts f
460 48      4450    email_journal   E-Mail-Journal  f
461 49      4480    email_employee_readall  Read all employee e-mails       f
462 50      2050    import_ar       Import AR from Scanner or Email f
463 52      2550    purchase_letter_edit    Edit purchase letters   f
464 53      2650    purchase_letter_report  Show purchase letters report    f
465 54      4750    record_links    Linked Records  f
466 55      3130    gl_transactions General Ledger Transaction      f
467 56      3150    ar_transactions AR Transactions f
468 57      3170    ap_transactions AP Transactions f
469 51      2680    import_ap       Import AP from Scanner or Email f
470 58      550     assembly_edit   Always edit assembly items (user can change/delete items even if assemblies are already produced)       f
471 59      4275    custom_data_export_designer     Custom data export      f
472 60      550     shop_part_edit  Create and edit shopparts       f
473 61      950     shop_order      Get shoporders  f
474 62      4250    edit_shop_config        Create and edit webshops        f
475 63      610     show_extra_record_tab_customer  Show record tab in customer     f
476 64      611     show_extra_record_tab_vendor    Show record tab in vendor       f
477 65      602     project_edit_view_invoices_permission   Projects: edit the list of employees allowed to view invoices   f
478 66      2560    purchase_all_edit       View/edit all employees purchase documents      f
479 67      2570    purchase_edit_prices    Edit prices and discount (if not used, textfield is ONLY set readonly)  f
480 \.
481
482
483 --
484 -- Name: master_rights_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: kivitendo
485 --
486
487 SELECT pg_catalog.setval('auth.master_rights_id_seq', 67, true);
488
489
490 --
491 -- Data for Name: schema_info; Type: TABLE DATA; Schema: auth; Owner: kivitendo
492 --
493
494 COPY auth.schema_info (tag, login, itime) FROM stdin;
495 add_api_token   admin   2018-11-30 19:52:50.606337
496 add_batch_printing_to_full_access       admin   2018-11-30 19:52:50.612204
497 auth_schema_normalization_1     admin   2018-11-30 19:52:50.679835
498 password_hashing        admin   2018-11-30 19:52:50.757564
499 remove_menustyle_v4     admin   2018-11-30 19:52:50.787919
500 remove_menustyle_xml    admin   2018-11-30 19:52:50.79445
501 session_content_auto_restore    admin   2018-11-30 19:52:50.799888
502 release_3_0_0   admin   2018-11-30 19:52:50.831311
503 clients admin   2018-11-30 19:52:50.877394
504 clients_webdav  admin   2018-11-30 19:52:50.98643
505 foreign_key_constraints_on_delete       admin   2018-11-30 19:52:50.993769
506 release_3_2_0   admin   2018-11-30 19:52:51.066536
507 add_master_rights       admin   2018-11-30 19:52:51.076355
508 bank_transaction_rights admin   2018-11-30 19:52:51.158372
509 delivery_plan_rights    admin   2018-11-30 19:52:51.184635
510 delivery_process_value  admin   2018-11-30 19:52:51.192706
511 details_and_report_of_parts     admin   2018-11-30 19:52:51.221993
512 productivity_rights     admin   2018-11-30 19:52:51.232101
513 requirement_spec_rights admin   2018-11-30 19:52:51.255307
514 rights_for_showing_ar_and_ap_transactions       admin   2018-11-30 19:52:51.262267
515 sales_letter_rights     admin   2018-11-30 19:52:51.2917
516 release_3_3_0   admin   2018-11-30 19:52:51.296489
517 client_task_server      admin   2018-11-30 19:52:51.304536
518 remove_insecurely_hashed_passwords      admin   2018-11-30 19:52:51.33197
519 session_content_primary_key     admin   2018-11-30 19:52:51.339007
520 release_3_4_0   admin   2018-11-30 19:52:51.368148
521 master_rights_position_gaps     admin   2021-01-16 23:27:44.749094
522 all_drafts_edit admin   2021-01-16 23:27:44.847437
523 mail_journal_rights     admin   2021-01-16 23:27:44.899515
524 other_file_sources      admin   2021-01-16 23:27:44.931875
525 purchase_letter_rights  admin   2021-01-16 23:27:44.946762
526 record_links_rights     admin   2021-01-16 23:27:44.964905
527 split_transaction_rights        admin   2021-01-16 23:27:44.984987
528 other_file_sources2     admin   2021-01-16 23:27:45.030195
529 rename_general_ledger_rights    admin   2021-01-16 23:27:45.043693
530 release_3_5_0   admin   2021-01-16 23:27:45.066912
531 assembly_edit_right     admin   2021-01-16 23:27:45.095898
532 custom_data_export_rights       admin   2021-01-16 23:27:45.120899
533 webshop_api_rights      admin   2021-01-16 23:27:45.140731
534 webshop_api_rights_2    admin   2021-01-16 23:27:45.167397
535 release_3_5_1   admin   2021-01-16 23:27:45.175067
536 release_3_5_2   admin   2021-01-16 23:27:45.183556
537 customer_vendor_record_extra_tab_rights admin   2021-01-16 23:27:45.189809
538 release_3_5_3   admin   2021-01-16 23:27:45.19872
539 rights_for_viewing_project_specific_invoices    admin   2021-01-16 23:27:45.210894
540 release_3_5_4   admin   2021-01-16 23:27:45.21948
541 right_purchase_all_edit admin   2021-01-16 23:27:45.227773
542 rights_sales_purchase_edit_prices       admin   2021-01-16 23:27:45.256678
543 master_rights_positions_fix     admin   2021-01-16 23:27:45.267954
544 release_3_5_5   admin   2021-01-16 23:27:45.285413
545 release_3_5_6   admin   2021-01-16 23:27:45.313788
546 release_3_5_6_1 admin   2021-01-16 23:27:45.326867
547 \.
548
549
550 --
551 -- Data for Name: session; Type: TABLE DATA; Schema: auth; Owner: kivitendo
552 --
553
554 COPY auth.session (id, ip_address, mtime, api_token) FROM stdin;
555 83d0f1038e65220b0c18c4a63a465649        127.0.0.1       2021-01-18 17:31:47.701129      73636e3d5f9ad1db2546b6dc3027b6ea
556 f3f4f06687f44fadd001940ee2c76122        127.0.0.1       2021-01-18 19:39:08.564014      3f1fef3555e6eebe6c9248558e7b791f
557 \.
558
559
560 --
561 -- Data for Name: session_content; Type: TABLE DATA; Schema: auth; Owner: kivitendo
562 --
563
564 COPY auth.session_content (session_id, sess_key, sess_value, auto_restore) FROM stdin;
565 f3f4f06687f44fadd001940ee2c76122        session_auth_status_root        --- 0\n \N
566 \.
567
568
569 --
570 -- Data for Name: user; Type: TABLE DATA; Schema: auth; Owner: kivitendo
571 --
572
573 COPY auth."user" (id, login, password) FROM stdin;
574 1       michael {PBKDF2}eb582ba54e6c4aefdf12345026c9e4eb8e:42f75af3ca486e0de3e9d6e655d1db0f0e8122b0040f3f64ac92ff683e89a1ed
575 \.
576
577
578 --
579 -- Data for Name: user_config; Type: TABLE DATA; Schema: auth; Owner: kivitendo
580 --
581
582 COPY auth.user_config (user_id, cfg_key, cfg_value) FROM stdin;
583 1       mandatory_departments   0
584 1       signature       
585 1       numberformat    1.000,00
586 1       countrycode     de
587 1       tel     
588 1       menustyle       neu
589 1       vclimit 200
590 1       phone_extension 
591 1       dateformat      dd.mm.yy
592 1       stylesheet      kivitendo.css
593 1       name    michael
594 1       email   
595 1       phone_password  
596 1       fax     
597 \.
598
599
600 --
601 -- Data for Name: user_group; Type: TABLE DATA; Schema: auth; Owner: kivitendo
602 --
603
604 COPY auth.user_group (user_id, group_id) FROM stdin;
605 1       1
606 \.
607
608
609 --
610 -- Name: user_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: kivitendo
611 --
612
613 SELECT pg_catalog.setval('auth.user_id_seq', 1, true);
614
615
616 --
617 -- Name: clients_dbhost_dbport_dbname_key; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
618 --
619
620 ALTER TABLE ONLY auth.clients
621     ADD CONSTRAINT clients_dbhost_dbport_dbname_key UNIQUE (dbhost, dbport, dbname);
622
623
624 --
625 -- Name: clients_groups_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
626 --
627
628 ALTER TABLE ONLY auth.clients_groups
629     ADD CONSTRAINT clients_groups_pkey PRIMARY KEY (client_id, group_id);
630
631
632 --
633 -- Name: clients_name_key; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
634 --
635
636 ALTER TABLE ONLY auth.clients
637     ADD CONSTRAINT clients_name_key UNIQUE (name);
638
639
640 --
641 -- Name: clients_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
642 --
643
644 ALTER TABLE ONLY auth.clients
645     ADD CONSTRAINT clients_pkey PRIMARY KEY (id);
646
647
648 --
649 -- Name: clients_users_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
650 --
651
652 ALTER TABLE ONLY auth.clients_users
653     ADD CONSTRAINT clients_users_pkey PRIMARY KEY (client_id, user_id);
654
655
656 --
657 -- Name: group_name_key; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
658 --
659
660 ALTER TABLE ONLY auth."group"
661     ADD CONSTRAINT group_name_key UNIQUE (name);
662
663
664 --
665 -- Name: group_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
666 --
667
668 ALTER TABLE ONLY auth."group"
669     ADD CONSTRAINT group_pkey PRIMARY KEY (id);
670
671
672 --
673 -- Name: group_rights_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
674 --
675
676 ALTER TABLE ONLY auth.group_rights
677     ADD CONSTRAINT group_rights_pkey PRIMARY KEY (group_id, "right");
678
679
680 --
681 -- Name: master_rights_name_key; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
682 --
683
684 ALTER TABLE ONLY auth.master_rights
685     ADD CONSTRAINT master_rights_name_key UNIQUE (name);
686
687
688 --
689 -- Name: master_rights_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
690 --
691
692 ALTER TABLE ONLY auth.master_rights
693     ADD CONSTRAINT master_rights_pkey PRIMARY KEY (id);
694
695
696 --
697 -- Name: schema_info_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
698 --
699
700 ALTER TABLE ONLY auth.schema_info
701     ADD CONSTRAINT schema_info_pkey PRIMARY KEY (tag);
702
703
704 --
705 -- Name: session_content_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
706 --
707
708 ALTER TABLE ONLY auth.session_content
709     ADD CONSTRAINT session_content_pkey PRIMARY KEY (session_id, sess_key);
710
711
712 --
713 -- Name: session_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
714 --
715
716 ALTER TABLE ONLY auth.session
717     ADD CONSTRAINT session_pkey PRIMARY KEY (id);
718
719
720 --
721 -- Name: user_config_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
722 --
723
724 ALTER TABLE ONLY auth.user_config
725     ADD CONSTRAINT user_config_pkey PRIMARY KEY (user_id, cfg_key);
726
727
728 --
729 -- Name: user_group_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
730 --
731
732 ALTER TABLE ONLY auth.user_group
733     ADD CONSTRAINT user_group_pkey PRIMARY KEY (user_id, group_id);
734
735
736 --
737 -- Name: user_login_key; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
738 --
739
740 ALTER TABLE ONLY auth."user"
741     ADD CONSTRAINT user_login_key UNIQUE (login);
742
743
744 --
745 -- Name: user_pkey; Type: CONSTRAINT; Schema: auth; Owner: kivitendo
746 --
747
748 ALTER TABLE ONLY auth."user"
749     ADD CONSTRAINT user_pkey PRIMARY KEY (id);
750
751
752 --
753 -- Name: clients_groups_client_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
754 --
755
756 ALTER TABLE ONLY auth.clients_groups
757     ADD CONSTRAINT clients_groups_client_id_fkey FOREIGN KEY (client_id) REFERENCES auth.clients(id) ON DELETE CASCADE;
758
759
760 --
761 -- Name: clients_groups_group_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
762 --
763
764 ALTER TABLE ONLY auth.clients_groups
765     ADD CONSTRAINT clients_groups_group_id_fkey FOREIGN KEY (group_id) REFERENCES auth."group"(id) ON DELETE CASCADE;
766
767
768 --
769 -- Name: clients_task_server_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
770 --
771
772 ALTER TABLE ONLY auth.clients
773     ADD CONSTRAINT clients_task_server_user_id_fkey FOREIGN KEY (task_server_user_id) REFERENCES auth."user"(id);
774
775
776 --
777 -- Name: clients_users_client_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
778 --
779
780 ALTER TABLE ONLY auth.clients_users
781     ADD CONSTRAINT clients_users_client_id_fkey FOREIGN KEY (client_id) REFERENCES auth.clients(id) ON DELETE CASCADE;
782
783
784 --
785 -- Name: clients_users_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
786 --
787
788 ALTER TABLE ONLY auth.clients_users
789     ADD CONSTRAINT clients_users_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth."user"(id) ON DELETE CASCADE;
790
791
792 --
793 -- Name: group_rights_group_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
794 --
795
796 ALTER TABLE ONLY auth.group_rights
797     ADD CONSTRAINT group_rights_group_id_fkey FOREIGN KEY (group_id) REFERENCES auth."group"(id) ON DELETE CASCADE;
798
799
800 --
801 -- Name: session_content_session_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
802 --
803
804 ALTER TABLE ONLY auth.session_content
805     ADD CONSTRAINT session_content_session_id_fkey FOREIGN KEY (session_id) REFERENCES auth.session(id) ON DELETE CASCADE;
806
807
808 --
809 -- Name: user_config_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
810 --
811
812 ALTER TABLE ONLY auth.user_config
813     ADD CONSTRAINT user_config_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth."user"(id) ON DELETE CASCADE;
814
815
816 --
817 -- Name: user_group_group_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
818 --
819
820 ALTER TABLE ONLY auth.user_group
821     ADD CONSTRAINT user_group_group_id_fkey FOREIGN KEY (group_id) REFERENCES auth."group"(id) ON DELETE CASCADE;
822
823
824 --
825 -- Name: user_group_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: kivitendo
826 --
827
828 ALTER TABLE ONLY auth.user_group
829     ADD CONSTRAINT user_group_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth."user"(id) ON DELETE CASCADE;
830
831
832 --
833 -- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
834 --
835
836 REVOKE ALL ON SCHEMA public FROM PUBLIC;
837 REVOKE ALL ON SCHEMA public FROM postgres;
838 GRANT ALL ON SCHEMA public TO postgres;
839 GRANT ALL ON SCHEMA public TO PUBLIC;
840
841
842 --
843 -- PostgreSQL database dump complete
844 --
845