-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase_backup.sql
1713 lines (1253 loc) · 50.5 KB
/
database_backup.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--
-- PostgreSQL database dump
--
-- Dumped from database version 16.3 (Postgres.app)
-- Dumped by pg_dump version 16.3
-- Started on 2024-07-22 13:27:12 CEST
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 3835 (class 1262 OID 19530)
-- Name: warehouse_db; Type: DATABASE; Schema: -; Owner: -
--
CREATE DATABASE warehouse_db WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = icu LOCALE = 'en_US.UTF-8' ICU_LOCALE = 'en-US';
ALTER DATABASE warehouse_db OWNER TO postgres;
\connect warehouse_db
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 215 (class 1259 OID 19531)
-- Name: user_access_levels; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_access_levels (
access_level_id integer NOT NULL,
access_level_name character varying(50) NOT NULL
);
--
-- TOC entry 216 (class 1259 OID 19534)
-- Name: access_levels_access_level_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.access_levels_access_level_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3836 (class 0 OID 0)
-- Dependencies: 216
-- Name: access_levels_access_level_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.access_levels_access_level_id_seq OWNED BY public.user_access_levels.access_level_id;
--
-- TOC entry 217 (class 1259 OID 19535)
-- Name: attendance; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.attendance (
worker_id integer NOT NULL,
attendance_date date NOT NULL,
day_type character varying(10) NOT NULL,
scheduled_start_time time without time zone,
scheduled_end_time time without time zone,
scheduled_work_hours numeric(10,2),
actual_work_hours numeric(10,2),
absence_reason character varying(255),
break_time time without time zone
);
--
-- TOC entry 218 (class 1259 OID 19538)
-- Name: feedbacks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.feedbacks (
feedback_id integer NOT NULL,
feedback_date date NOT NULL,
worker_id character varying(255),
feedback_text text NOT NULL
);
--
-- TOC entry 219 (class 1259 OID 19543)
-- Name: feedbacks_feedback_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.feedbacks_feedback_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3837 (class 0 OID 0)
-- Dependencies: 219
-- Name: feedbacks_feedback_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.feedbacks_feedback_id_seq OWNED BY public.feedbacks.feedback_id;
--
-- TOC entry 220 (class 1259 OID 19544)
-- Name: worker_firms; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.worker_firms (
firm_id integer NOT NULL,
name character varying(255) NOT NULL
);
--
-- TOC entry 221 (class 1259 OID 19547)
-- Name: firms_firm_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.firms_firm_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3838 (class 0 OID 0)
-- Dependencies: 221
-- Name: firms_firm_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.firms_firm_id_seq OWNED BY public.worker_firms.firm_id;
--
-- TOC entry 222 (class 1259 OID 19548)
-- Name: message_group_list; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.message_group_list (
group_id integer NOT NULL,
group_name character varying(255) NOT NULL
);
--
-- TOC entry 223 (class 1259 OID 19551)
-- Name: groups_group_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.groups_group_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3839 (class 0 OID 0)
-- Dependencies: 223
-- Name: groups_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.groups_group_id_seq OWNED BY public.message_group_list.group_id;
--
-- TOC entry 224 (class 1259 OID 19552)
-- Name: user_languages; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_languages (
language_id integer NOT NULL,
code character varying(3) NOT NULL,
name character varying(50)
);
--
-- TOC entry 225 (class 1259 OID 19555)
-- Name: languages_language_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.languages_language_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3840 (class 0 OID 0)
-- Dependencies: 225
-- Name: languages_language_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.languages_language_id_seq OWNED BY public.user_languages.language_id;
--
-- TOC entry 226 (class 1259 OID 19556)
-- Name: message_absence_records; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.message_absence_records (
record_id integer NOT NULL,
worker_id integer NOT NULL,
start_date date NOT NULL,
end_date date NOT NULL,
message character varying(255) NOT NULL,
sent_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
file_url character varying(255)
);
--
-- TOC entry 227 (class 1259 OID 19562)
-- Name: message_absence_records_record_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.message_absence_records_record_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3841 (class 0 OID 0)
-- Dependencies: 227
-- Name: message_absence_records_record_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.message_absence_records_record_id_seq OWNED BY public.message_absence_records.record_id;
--
-- TOC entry 228 (class 1259 OID 19563)
-- Name: message_attachments; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.message_attachments (
attachment_id integer NOT NULL,
message_id integer,
file_path text,
file_type text
);
--
-- TOC entry 229 (class 1259 OID 19568)
-- Name: message_attachments_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.message_attachments_attachment_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3842 (class 0 OID 0)
-- Dependencies: 229
-- Name: message_attachments_attachment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.message_attachments_attachment_id_seq OWNED BY public.message_attachments.attachment_id;
--
-- TOC entry 230 (class 1259 OID 19569)
-- Name: message_recipients; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.message_recipients (
message_id integer NOT NULL,
recipient_group_id integer,
recipient_user_id integer
);
--
-- TOC entry 231 (class 1259 OID 19572)
-- Name: messages; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.messages (
message_id integer NOT NULL,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
sender_id integer NOT NULL,
has_attachments boolean DEFAULT false,
title character varying(255) NOT NULL,
message_content text
);
--
-- TOC entry 232 (class 1259 OID 19579)
-- Name: messages_message_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.messages_message_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3843 (class 0 OID 0)
-- Dependencies: 232
-- Name: messages_message_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.messages_message_id_seq OWNED BY public.messages.message_id;
--
-- TOC entry 233 (class 1259 OID 19580)
-- Name: process; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.process (
process_entry_id integer NOT NULL,
date date NOT NULL,
worker_id integer NOT NULL,
scanned_items integer NOT NULL,
time_spent numeric(10,2) NOT NULL,
process_id integer
);
--
-- TOC entry 234 (class 1259 OID 19583)
-- Name: process_process_entry_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.process_process_entry_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3844 (class 0 OID 0)
-- Dependencies: 234
-- Name: process_process_entry_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.process_process_entry_id_seq OWNED BY public.process.process_entry_id;
--
-- TOC entry 235 (class 1259 OID 19584)
-- Name: process_targets; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.process_targets (
target_id integer NOT NULL,
process_id integer NOT NULL,
target_date date NOT NULL,
target_items_per_hour integer NOT NULL
);
--
-- TOC entry 236 (class 1259 OID 19587)
-- Name: process_targets_target_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.process_targets_target_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3845 (class 0 OID 0)
-- Dependencies: 236
-- Name: process_targets_target_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.process_targets_target_id_seq OWNED BY public.process_targets.target_id;
--
-- TOC entry 237 (class 1259 OID 19588)
-- Name: process_types; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.process_types (
process_id integer NOT NULL,
process_name character varying(20) NOT NULL
);
--
-- TOC entry 238 (class 1259 OID 19591)
-- Name: process_types_process_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.process_types_process_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3846 (class 0 OID 0)
-- Dependencies: 238
-- Name: process_types_process_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.process_types_process_id_seq OWNED BY public.process_types.process_id;
--
-- TOC entry 239 (class 1259 OID 19592)
-- Name: user_message_groups; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.user_message_groups (
user_id integer NOT NULL,
group_id integer NOT NULL
);
--
-- TOC entry 240 (class 1259 OID 19595)
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.users (
worker_id integer NOT NULL,
worker_login character varying(255) NOT NULL,
password character varying(255) NOT NULL,
access_level_id integer DEFAULT 1 NOT NULL,
is_logged_in boolean DEFAULT false NOT NULL
);
--
-- TOC entry 241 (class 1259 OID 19602)
-- Name: users_worker_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.users_worker_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3847 (class 0 OID 0)
-- Dependencies: 241
-- Name: users_worker_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.users_worker_id_seq OWNED BY public.users.worker_id;
--
-- TOC entry 242 (class 1259 OID 19603)
-- Name: worker_group_names; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.worker_group_names (
group_name_id integer NOT NULL,
name character varying(50) NOT NULL
);
--
-- TOC entry 243 (class 1259 OID 19606)
-- Name: worker_group_names_group_name_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.worker_group_names_group_name_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3848 (class 0 OID 0)
-- Dependencies: 243
-- Name: worker_group_names_group_name_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.worker_group_names_group_name_id_seq OWNED BY public.worker_group_names.group_name_id;
--
-- TOC entry 244 (class 1259 OID 19607)
-- Name: worker_group_numbers; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.worker_group_numbers (
group_number_id integer NOT NULL,
number character varying(50) NOT NULL
);
--
-- TOC entry 245 (class 1259 OID 19610)
-- Name: worker_group_numbers_group_number_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.worker_group_numbers_group_number_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3849 (class 0 OID 0)
-- Dependencies: 245
-- Name: worker_group_numbers_group_number_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.worker_group_numbers_group_number_id_seq OWNED BY public.worker_group_numbers.group_number_id;
--
-- TOC entry 246 (class 1259 OID 19611)
-- Name: worker_info; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.worker_info (
worker_id integer NOT NULL,
fullname character varying(255) NOT NULL,
is_active boolean DEFAULT true NOT NULL,
last_messages_check timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
language_id integer DEFAULT 1 NOT NULL,
firm_id integer DEFAULT 1,
transport_id integer,
group_name_id integer,
group_number_id integer,
location_id integer
);
--
-- TOC entry 247 (class 1259 OID 19618)
-- Name: worker_location_list; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.worker_location_list (
location_id integer NOT NULL,
location_name character varying(255) NOT NULL
);
--
-- TOC entry 248 (class 1259 OID 19621)
-- Name: worker_location_list_location_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.worker_location_list_location_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3850 (class 0 OID 0)
-- Dependencies: 248
-- Name: worker_location_list_location_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.worker_location_list_location_id_seq OWNED BY public.worker_location_list.location_id;
--
-- TOC entry 249 (class 1259 OID 19622)
-- Name: worker_transport_types; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.worker_transport_types (
transport_id integer NOT NULL,
name character varying(50) NOT NULL
);
--
-- TOC entry 250 (class 1259 OID 19625)
-- Name: worker_transport_types_transport_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.worker_transport_types_transport_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 3851 (class 0 OID 0)
-- Dependencies: 250
-- Name: worker_transport_types_transport_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.worker_transport_types_transport_id_seq OWNED BY public.worker_transport_types.transport_id;
--
-- TOC entry 3557 (class 2604 OID 19626)
-- Name: feedbacks feedback_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.feedbacks ALTER COLUMN feedback_id SET DEFAULT nextval('public.feedbacks_feedback_id_seq'::regclass);
--
-- TOC entry 3561 (class 2604 OID 19627)
-- Name: message_absence_records record_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.message_absence_records ALTER COLUMN record_id SET DEFAULT nextval('public.message_absence_records_record_id_seq'::regclass);
--
-- TOC entry 3563 (class 2604 OID 19628)
-- Name: message_attachments attachment_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.message_attachments ALTER COLUMN attachment_id SET DEFAULT nextval('public.message_attachments_attachment_id_seq'::regclass);
--
-- TOC entry 3559 (class 2604 OID 19629)
-- Name: message_group_list group_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.message_group_list ALTER COLUMN group_id SET DEFAULT nextval('public.groups_group_id_seq'::regclass);
--
-- TOC entry 3564 (class 2604 OID 19630)
-- Name: messages message_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.messages ALTER COLUMN message_id SET DEFAULT nextval('public.messages_message_id_seq'::regclass);
--
-- TOC entry 3567 (class 2604 OID 19631)
-- Name: process process_entry_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.process ALTER COLUMN process_entry_id SET DEFAULT nextval('public.process_process_entry_id_seq'::regclass);
--
-- TOC entry 3568 (class 2604 OID 19632)
-- Name: process_targets target_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.process_targets ALTER COLUMN target_id SET DEFAULT nextval('public.process_targets_target_id_seq'::regclass);
--
-- TOC entry 3569 (class 2604 OID 19633)
-- Name: process_types process_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.process_types ALTER COLUMN process_id SET DEFAULT nextval('public.process_types_process_id_seq'::regclass);
--
-- TOC entry 3556 (class 2604 OID 19634)
-- Name: user_access_levels access_level_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_access_levels ALTER COLUMN access_level_id SET DEFAULT nextval('public.access_levels_access_level_id_seq'::regclass);
--
-- TOC entry 3560 (class 2604 OID 19635)
-- Name: user_languages language_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.user_languages ALTER COLUMN language_id SET DEFAULT nextval('public.languages_language_id_seq'::regclass);
--
-- TOC entry 3570 (class 2604 OID 19636)
-- Name: users worker_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.users ALTER COLUMN worker_id SET DEFAULT nextval('public.users_worker_id_seq'::regclass);
--
-- TOC entry 3558 (class 2604 OID 19637)
-- Name: worker_firms firm_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.worker_firms ALTER COLUMN firm_id SET DEFAULT nextval('public.firms_firm_id_seq'::regclass);
--
-- TOC entry 3573 (class 2604 OID 19638)
-- Name: worker_group_names group_name_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.worker_group_names ALTER COLUMN group_name_id SET DEFAULT nextval('public.worker_group_names_group_name_id_seq'::regclass);
--
-- TOC entry 3574 (class 2604 OID 19639)
-- Name: worker_group_numbers group_number_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.worker_group_numbers ALTER COLUMN group_number_id SET DEFAULT nextval('public.worker_group_numbers_group_number_id_seq'::regclass);
--
-- TOC entry 3579 (class 2604 OID 19640)
-- Name: worker_location_list location_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.worker_location_list ALTER COLUMN location_id SET DEFAULT nextval('public.worker_location_list_location_id_seq'::regclass);
--
-- TOC entry 3580 (class 2604 OID 19641)
-- Name: worker_transport_types transport_id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.worker_transport_types ALTER COLUMN transport_id SET DEFAULT nextval('public.worker_transport_types_transport_id_seq'::regclass);
--
-- TOC entry 3796 (class 0 OID 19535)
-- Dependencies: 217
-- Data for Name: attendance; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.attendance (worker_id, attendance_date, day_type, scheduled_start_time, scheduled_end_time, scheduled_work_hours, actual_work_hours, absence_reason, break_time) FROM stdin;
15 2024-06-28 P 06:00:00 14:00:00 8.00 8.00 \N 00:27:00
15 2024-06-29 P 06:00:00 14:00:00 8.00 8.00 \N 00:30:00
15 2024-06-30 P 06:00:00 14:00:00 8.00 8.00 \N 00:30:00
15 2024-07-01 P 06:00:00 14:00:00 8.00 8.00 \N 00:28:00
15 2024-07-02 P 06:00:00 14:00:00 8.00 8.00 \N 00:28:00
15 2024-07-03 W \N \N \N \N \N 00:00:00
15 2024-07-04 ŚW \N \N \N \N \N 00:00:00
16 2024-06-28 P 06:00:00 14:00:00 8.00 8.00 \N 00:28:00
16 2024-06-29 P 06:00:00 14:00:00 8.00 8.00 \N 00:25:00
16 2024-06-30 P 06:00:00 14:00:00 8.00 8.00 \N 00:28:00
16 2024-07-01 P 06:00:00 14:00:00 8.00 8.00 \N 00:31:00
16 2024-07-02 W \N \N \N \N \N 00:00:00
16 2024-07-03 W \N \N \N \N \N 00:00:00
16 2024-07-04 ŚW \N \N \N \N \N 00:00:00
17 2024-06-28 P 14:00:00 22:00:00 8.00 8.00 \N 00:29:00
17 2024-06-29 P 14:00:00 22:00:00 8.00 8.00 \N 00:29:00
17 2024-06-30 P 14:00:00 22:00:00 8.00 8.00 \N 00:29:00
17 2024-07-01 P 14:00:00 22:00:00 8.00 8.00 \N 00:31:00
17 2024-07-02 P 14:00:00 22:00:00 8.00 8.00 \N 00:29:00
17 2024-07-03 W \N \N \N \N \N 00:00:00
17 2024-07-04 ŚW \N \N \N \N \N 00:00:00
18 2024-06-28 P 14:00:00 22:00:00 8.00 8.00 \N 00:31:00
18 2024-06-29 P 14:00:00 22:00:00 8.00 8.00 \N 00:30:00
18 2024-06-30 P 14:00:00 22:00:00 8.00 8.00 \N 00:29:00
18 2024-07-01 P 14:00:00 22:00:00 8.00 8.00 \N 00:31:00
18 2024-07-02 P 14:00:00 22:00:00 8.00 8.00 \N 00:30:00
18 2024-07-03 W \N \N \N \N \N 00:00:00
18 2024-07-04 ŚW \N \N \N \N \N 00:00:00
\.
--
-- TOC entry 3797 (class 0 OID 19538)
-- Dependencies: 218
-- Data for Name: feedbacks; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.feedbacks (feedback_id, feedback_date, worker_id, feedback_text) FROM stdin;
26 2024-07-12 LOGIN1 Skarga text Lorem lorem lorem lorem lorem
27 2024-07-18 LOGIN1 Skarga text2 Lorem lorem lorem lorem lorem
28 2024-07-18 anonymous Skarga text3 Lorem lorem lorem lorem lorem
29 2024-07-18 LOGIN1 Skarga text4 Lorem lorem lorem lorem lorem
\.
--
-- TOC entry 3805 (class 0 OID 19556)
-- Dependencies: 226
-- Data for Name: message_absence_records; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.message_absence_records (record_id, worker_id, start_date, end_date, message, sent_at, file_url) FROM stdin;
\.
--
-- TOC entry 3807 (class 0 OID 19563)
-- Dependencies: 228
-- Data for Name: message_attachments; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.message_attachments (attachment_id, message_id, file_path, file_type) FROM stdin;
\.
--
-- TOC entry 3801 (class 0 OID 19548)
-- Dependencies: 222
-- Data for Name: message_group_list; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.message_group_list (group_id, group_name) FROM stdin;
7 all
8 managment
\.
--
-- TOC entry 3809 (class 0 OID 19569)
-- Dependencies: 230
-- Data for Name: message_recipients; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.message_recipients (message_id, recipient_group_id, recipient_user_id) FROM stdin;
108 7 \N
109 7 \N
110 \N 15
\.
--
-- TOC entry 3810 (class 0 OID 19572)
-- Dependencies: 231
-- Data for Name: messages; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.messages (message_id, created_at, sender_id, has_attachments, title, message_content) FROM stdin;
108 2024-07-22 13:19:59.754819 3 f Inventory Update <p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">We are pleased to inform you that our inventory management is improving, and we have successfully completed several key tasks. Your hard work and dedication are greatly appreciated. Please continue to report any issues or suggestions to help us maintain efficiency.</p><p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14); min-height: 17px;"><br></p><p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">Thank you for your excellent work!</p>
109 2024-07-22 13:20:28.548343 3 f Request for Feedback and Suggestions <p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">Hi, team!</p>\r\n<p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14); min-height: 17px;"><br></p>\r\n<p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">We are always striving to improve our warehouse operations and value your ideas and suggestions. Please take a moment to share your thoughts on how we can enhance our processes and work environment. Your feedback is crucial for our continuous improvement.</p>\r\n<p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14); min-height: 17px;"><br></p>\r\n<p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">Thank you for your participation and contribution!</p><div><br></div>
110 2024-07-22 13:21:32.774433 3 f Appreciation for Your Excellent Work <p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">Hi [Employee’s Name],</p>\r\n<p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14); min-height: 17px;"><br></p>\r\n<p style="margin-bottom: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 14px; line-height: normal; font-family: ".SF NS"; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(14, 14, 14);">I wanted to take a moment to personally thank you for the outstanding work you have been doing in the warehouse. Your attention to detail and dedication to maintaining our inventory have not gone unnoticed. You consistently go above and beyond, and your efforts are greatly appreciated.</p>
\.
--
-- TOC entry 3812 (class 0 OID 19580)
-- Dependencies: 233
-- Data for Name: process; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.process (process_entry_id, date, worker_id, scanned_items, time_spent, process_id) FROM stdin;
111 2024-06-28 15 201 7.56 3
112 2024-06-29 15 195 7.00 3
113 2024-06-30 15 303 10.84 3
114 2024-07-01 15 49 1.70 3
115 2024-07-02 15 314 10.62 3
116 2024-06-28 15 45 1.51 1
117 2024-06-29 15 35 1.08 1
118 2024-06-30 15 356 10.87 1
119 2024-07-01 15 168 4.99 1
120 2024-07-02 15 252 7.19 1
121 2024-06-28 15 54 1.49 2
122 2024-06-29 15 30 0.82 2
123 2024-06-30 15 390 10.54 2
124 2024-07-01 15 65 1.71 2
125 2024-07-02 15 107 2.80 2
126 2024-06-28 15 49 1.28 4
127 2024-06-29 15 238 6.14 4
128 2024-06-30 15 68 1.73 4
129 2024-07-01 15 420 10.57 4
130 2024-07-02 15 49 1.23 4
131 2024-06-28 15 147 3.15 3
132 2024-06-29 15 145 2.96 3
133 2024-06-30 15 143 2.78 3
134 2024-07-01 15 141 2.60 3
135 2024-07-02 15 139 2.41 3
136 2024-06-28 15 137 2.23 1
137 2024-06-29 15 135 2.04 1
138 2024-06-30 15 133 1.86 1
139 2024-07-01 15 131 1.67 1
140 2024-07-02 15 129 1.49 1
141 2024-06-28 15 127 1.31 2
142 2024-06-29 15 125 1.12 2
143 2024-06-30 15 123 0.94 2
144 2024-07-01 15 121 2.04 2
145 2024-07-02 15 119 1.86 2
146 2024-06-28 15 117 1.67 4
147 2024-06-29 15 115 1.49 4
148 2024-06-30 15 113 0.02 4
149 2024-07-01 15 111 -0.17 4
150 2024-07-02 15 109 2.04 4
151 2024-06-28 15 107 1.86 3
152 2024-06-29 15 104 2.04 3
153 2024-06-30 15 102 1.86 3
154 2024-07-01 15 100 1.67 3
155 2024-07-02 15 98 1.49 3
\.
--
-- TOC entry 3814 (class 0 OID 19584)
-- Dependencies: 235
-- Data for Name: process_targets; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.process_targets (target_id, process_id, target_date, target_items_per_hour) FROM stdin;
1 1 2024-03-01 110
2 2 2024-03-01 120
3 3 2024-03-01 75
4 4 2024-03-01 90
5 1 2024-02-01 100
6 2 2024-02-01 110
7 3 2024-02-01 80
8 4 2024-02-01 100
9 1 2024-04-01 150
10 2 2024-04-01 140
11 3 2024-04-01 85
12 4 2024-04-01 95
\.
--
-- TOC entry 3816 (class 0 OID 19588)
-- Dependencies: 237
-- Data for Name: process_types; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.process_types (process_id, process_name) FROM stdin;
1 PROCES1
2 PROCES2
3 PROCES3
4 PROCES4
\.