-
Notifications
You must be signed in to change notification settings - Fork 0
/
1114_3032_dump_navalplandemo_1.1.3_20110824.sql
9406 lines (7758 loc) · 319 KB
/
1114_3032_dump_navalplandemo_1.1.3_20110824.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
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: advance_assignment; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE advance_assignment (
id bigint NOT NULL,
version bigint NOT NULL,
report_global_advance boolean,
advance_type_id bigint
);
ALTER TABLE public.advance_assignment OWNER TO naval;
--
-- Name: advance_assignment_template; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE advance_assignment_template (
id bigint NOT NULL,
version bigint NOT NULL,
advance_type_id bigint,
order_element_template_id bigint,
report_global_advance boolean,
max_value numeric(19,2)
);
ALTER TABLE public.advance_assignment_template OWNER TO naval;
--
-- Name: advance_measurement; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE advance_measurement (
id bigint NOT NULL,
version bigint NOT NULL,
date date,
value numeric(19,2),
advance_assignment_id bigint,
communication_date timestamp with time zone
);
ALTER TABLE public.advance_measurement OWNER TO naval;
--
-- Name: advance_type; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE advance_type (
id bigint NOT NULL,
version bigint NOT NULL,
unit_name character varying(255),
default_max_value numeric(19,4),
updatable boolean,
unit_precision numeric(19,4),
active boolean,
percentage boolean,
quality_form boolean
);
ALTER TABLE public.advance_type OWNER TO naval;
--
-- Name: all_criterions; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE all_criterions (
generic_resource_allocation_id bigint NOT NULL,
criterion_id bigint NOT NULL
);
ALTER TABLE public.all_criterions OWNER TO naval;
--
-- Name: assignment_function; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE assignment_function (
id bigint NOT NULL,
version bigint NOT NULL
);
ALTER TABLE public.assignment_function OWNER TO naval;
--
-- Name: base_calendar; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE base_calendar (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
code_autogenerated boolean,
last_sequence_code integer
);
ALTER TABLE public.base_calendar OWNER TO naval;
--
-- Name: calendar_availability; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE calendar_availability (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
start_date date,
end_date date,
base_calendar_id bigint,
position_in_calendar integer
);
ALTER TABLE public.calendar_availability OWNER TO naval;
--
-- Name: calendar_data; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE calendar_data (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
parent bigint,
expiring_date date,
base_calendar_id bigint,
position_in_calendar integer
);
ALTER TABLE public.calendar_data OWNER TO naval;
--
-- Name: calendar_exception; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE calendar_exception (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
date date,
standard_effort integer,
calendar_exception_id bigint,
base_calendar_id bigint,
allowed_extra_effort integer
);
ALTER TABLE public.calendar_exception OWNER TO naval;
--
-- Name: calendar_exception_type; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE calendar_exception_type (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
code_autogenerated boolean NOT NULL,
name character varying(255),
color character varying(255),
standard_effort integer,
allowed_extra_effort integer
);
ALTER TABLE public.calendar_exception_type OWNER TO naval;
--
-- Name: capacity_per_day; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE capacity_per_day (
base_calendar_id bigint NOT NULL,
standard_effort integer,
day_id integer NOT NULL,
allowed_extra_effort integer
);
ALTER TABLE public.capacity_per_day OWNER TO naval;
--
-- Name: configuration; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE configuration (
id bigint NOT NULL,
version bigint NOT NULL,
configuration_id bigint,
company_code character varying(255),
generate_code_for_cost_category boolean NOT NULL,
generate_code_for_calendar_exception_type boolean NOT NULL,
generate_code_for_work_report_type boolean NOT NULL,
generate_code_for_criterion boolean NOT NULL,
generate_code_for_label boolean NOT NULL,
generate_code_for_work_report boolean NOT NULL,
generate_code_for_resources boolean NOT NULL,
generate_code_for_types_of_work_hours boolean NOT NULL,
generate_code_for_material_categories boolean NOT NULL,
generate_code_for_unit_types boolean NOT NULL,
generate_code_for_base_calendars boolean NOT NULL,
expand_company_planning_view_charts boolean NOT NULL,
expand_order_planning_view_charts boolean NOT NULL,
expand_resource_load_view_charts boolean NOT NULL,
monte_carlo_method_tab_visible boolean NOT NULL,
progress_type integer,
company_logo_url character varying(255),
scenarios_visible boolean,
changed_default_admin_password boolean DEFAULT false NOT NULL,
changed_default_user_password boolean DEFAULT false NOT NULL,
changed_default_wsreader_password boolean DEFAULT false NOT NULL,
changed_default_wswriter_password boolean DEFAULT false NOT NULL
);
ALTER TABLE public.configuration OWNER TO naval;
--
-- Name: consolidated_value; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE consolidated_value (
id bigint NOT NULL,
consolidated_value_type character varying(255) NOT NULL,
version bigint NOT NULL,
date date,
value numeric(19,2),
task_end_date date,
consolidation_id bigint,
advance_measurement_id bigint
);
ALTER TABLE public.consolidated_value OWNER TO naval;
--
-- Name: consolidation; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE consolidation (
id bigint NOT NULL,
consolidation_type character varying(255) NOT NULL,
version bigint NOT NULL,
dir_advance_assignment_id bigint,
ind_advance_assignment_id bigint
);
ALTER TABLE public.consolidation OWNER TO naval;
--
-- Name: cost_category; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE cost_category (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
code_autogenerated boolean NOT NULL,
last_hour_cost_sequence_code integer NOT NULL,
enabled boolean
);
ALTER TABLE public.cost_category OWNER TO naval;
--
-- Name: criterion; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE criterion (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
predefined_criterion_internal_name character varying(255),
active boolean,
id_criterion_type bigint NOT NULL,
parent bigint
);
ALTER TABLE public.criterion OWNER TO naval;
--
-- Name: criterion_requirement; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE criterion_requirement (
id bigint NOT NULL,
criterion_requirement_type character varying(255) NOT NULL,
version bigint NOT NULL,
hours_group_id bigint,
order_element_id bigint,
order_element_template_id bigint,
criterion_id bigint,
parent bigint,
valid boolean
);
ALTER TABLE public.criterion_requirement OWNER TO naval;
--
-- Name: criterion_satisfaction; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE criterion_satisfaction (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
start_date date NOT NULL,
finish_date date,
is_deleted boolean,
criterion bigint NOT NULL,
resource bigint NOT NULL
);
ALTER TABLE public.criterion_satisfaction OWNER TO naval;
--
-- Name: criterion_type; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE criterion_type (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
predefined_type_internal_name character varying(255),
description character varying(255),
allow_simultaneous_criterions_per_resource boolean,
allow_hierarchy boolean,
last_criterion_sequence_code integer,
enabled boolean,
code_autogenerated boolean NOT NULL,
resource integer
);
ALTER TABLE public.criterion_type OWNER TO naval;
--
-- Name: databasechangelog; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE databasechangelog (
id character varying(63) NOT NULL,
author character varying(63) NOT NULL,
filename character varying(200) NOT NULL,
dateexecuted timestamp with time zone NOT NULL,
orderexecuted integer NOT NULL,
exectype character varying(10) NOT NULL,
md5sum character varying(35),
description character varying(255),
comments character varying(255),
tag character varying(255),
liquibase character varying(20)
);
ALTER TABLE public.databasechangelog OWNER TO naval;
--
-- Name: databasechangeloglock; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE databasechangeloglock (
id integer NOT NULL,
locked boolean NOT NULL,
lockgranted timestamp with time zone,
lockedby character varying(255)
);
ALTER TABLE public.databasechangeloglock OWNER TO naval;
--
-- Name: day_assignment; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE day_assignment (
id bigint NOT NULL,
day_assignment_type character varying(255) NOT NULL,
version bigint NOT NULL,
duration integer NOT NULL,
consolidated boolean,
day date NOT NULL,
resource_id bigint NOT NULL,
specific_container_id bigint,
generic_container_id bigint,
derived_container_id bigint
);
ALTER TABLE public.day_assignment OWNER TO naval;
--
-- Name: dependency; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE dependency (
id bigint NOT NULL,
version bigint NOT NULL,
origin bigint,
destination bigint,
queue_dependency bigint,
type integer
);
ALTER TABLE public.dependency OWNER TO naval;
--
-- Name: derived_allocation; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE derived_allocation (
id bigint NOT NULL,
version bigint NOT NULL,
resource_allocation_id bigint,
configurationunit bigint NOT NULL
);
ALTER TABLE public.derived_allocation OWNER TO naval;
--
-- Name: derived_day_assignments_container; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE derived_day_assignments_container (
id bigint NOT NULL,
version bigint NOT NULL,
derived_allocation_id bigint,
scenario bigint
);
ALTER TABLE public.derived_day_assignments_container OWNER TO naval;
--
-- Name: description_values; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE description_values (
description_value_id bigint NOT NULL,
fieldname character varying(255),
value character varying(255)
);
ALTER TABLE public.description_values OWNER TO naval;
--
-- Name: description_values_in_line; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE description_values_in_line (
description_value_id bigint NOT NULL,
field_name character varying(255),
value character varying(255)
);
ALTER TABLE public.description_values_in_line OWNER TO naval;
--
-- Name: direct_advance_assignment; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE direct_advance_assignment (
advance_assignment_id bigint NOT NULL,
direct_order_element_id bigint,
max_value numeric(19,2)
);
ALTER TABLE public.direct_advance_assignment OWNER TO naval;
--
-- Name: entity_sequence; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE entity_sequence (
id bigint NOT NULL,
version bigint NOT NULL,
entity_name integer,
prefix character varying(255),
last_value integer,
number_of_digits integer,
active boolean
);
ALTER TABLE public.entity_sequence OWNER TO naval;
--
-- Name: external_company; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE external_company (
id bigint NOT NULL,
version bigint NOT NULL,
name character varying(255),
nif character varying(255),
client boolean,
subcontractor boolean,
interacts_with_applications boolean,
app_uri character varying(255),
our_company_login character varying(255),
our_company_password character varying(255),
company_user bigint
);
ALTER TABLE public.external_company OWNER TO naval;
--
-- Name: generic_day_assignments_container; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE generic_day_assignments_container (
id bigint NOT NULL,
version bigint NOT NULL,
resource_allocation_id bigint,
scenario bigint,
start_date date,
duration_start_in_first_day integer,
end_date date,
duration_in_last_day integer
);
ALTER TABLE public.generic_day_assignments_container OWNER TO naval;
--
-- Name: generic_resource_allocation; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE generic_resource_allocation (
resource_allocation_id bigint NOT NULL,
resource_type integer
);
ALTER TABLE public.generic_resource_allocation OWNER TO naval;
--
-- Name: heading_field; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE heading_field (
heading_id bigint NOT NULL,
fieldname character varying(255),
length integer,
positionnumber integer
);
ALTER TABLE public.heading_field OWNER TO naval;
--
-- Name: hibernate_unique_key; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE hibernate_unique_key (
next_hi integer
);
ALTER TABLE public.hibernate_unique_key OWNER TO naval;
--
-- Name: hour_cost; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE hour_cost (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
price_cost numeric(19,2),
init_date date,
end_date date,
type_of_work_hours_id bigint,
cost_category_id bigint
);
ALTER TABLE public.hour_cost OWNER TO naval;
--
-- Name: hours_group; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE hours_group (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
resource_type character varying(255),
working_hours integer NOT NULL,
percentage numeric(19,2),
fixed_percentage boolean,
parent_order_line bigint,
order_line_template bigint
);
ALTER TABLE public.hours_group OWNER TO naval;
--
-- Name: indirect_advance_assignment; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE indirect_advance_assignment (
advance_assignment_id bigint NOT NULL,
indirect_order_element_id bigint
);
ALTER TABLE public.indirect_advance_assignment OWNER TO naval;
--
-- Name: label; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE label (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
label_type_id bigint
);
ALTER TABLE public.label OWNER TO naval;
--
-- Name: label_type; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE label_type (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
code_autogenerated boolean NOT NULL,
last_label_sequence_code integer
);
ALTER TABLE public.label_type OWNER TO naval;
--
-- Name: limiting_resource_queue; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE limiting_resource_queue (
id bigint NOT NULL,
version bigint NOT NULL,
resource_id bigint
);
ALTER TABLE public.limiting_resource_queue OWNER TO naval;
--
-- Name: limiting_resource_queue_dependency; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE limiting_resource_queue_dependency (
id bigint NOT NULL,
type integer,
origin_queue_element_id bigint,
destiny_queue_element_id bigint
);
ALTER TABLE public.limiting_resource_queue_dependency OWNER TO naval;
--
-- Name: limiting_resource_queue_element; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE limiting_resource_queue_element (
id bigint NOT NULL,
version bigint NOT NULL,
resource_allocation_id bigint,
limiting_resource_queue_id bigint,
earlier_start_date_because_of_gantt timestamp with time zone,
earliest_end_date_because_of_gantt timestamp with time zone,
creation_timestamp bigint,
start_date date,
start_hour integer,
end_date date,
end_hour integer
);
ALTER TABLE public.limiting_resource_queue_element OWNER TO naval;
--
-- Name: line_field; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE line_field (
heading_id bigint NOT NULL,
fieldname character varying(255),
length integer,
positionnumber integer
);
ALTER TABLE public.line_field OWNER TO naval;
--
-- Name: machine; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE machine (
machine_id bigint NOT NULL,
name character varying(255),
description character varying(255)
);
ALTER TABLE public.machine OWNER TO naval;
--
-- Name: machine_configuration_unit_required_criterions; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE machine_configuration_unit_required_criterions (
id bigint NOT NULL,
criterion_id bigint NOT NULL
);
ALTER TABLE public.machine_configuration_unit_required_criterions OWNER TO naval;
--
-- Name: machine_worker_assignment; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE machine_worker_assignment (
id bigint NOT NULL,
version bigint NOT NULL,
start_date timestamp with time zone,
finish_date timestamp with time zone,
configuration_id bigint NOT NULL,
worker_id bigint
);
ALTER TABLE public.machine_worker_assignment OWNER TO naval;
--
-- Name: machine_workers_configuration_unit; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE machine_workers_configuration_unit (
id bigint NOT NULL,
version bigint NOT NULL,
name character varying(255) NOT NULL,
alpha numeric(19,2) NOT NULL,
machine bigint NOT NULL
);
ALTER TABLE public.machine_workers_configuration_unit OWNER TO naval;
--
-- Name: material; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE material (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
description character varying(255),
default_unit_price numeric(19,2),
unit_type bigint,
disabled boolean,
category_id bigint
);
ALTER TABLE public.material OWNER TO naval;
--
-- Name: material_assigment; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE material_assigment (
id bigint NOT NULL,
version bigint NOT NULL,
units numeric(19,2),
unit_price numeric(19,2),
material_id bigint,
estimated_availability timestamp with time zone,
status integer,
order_element_id bigint
);
ALTER TABLE public.material_assigment OWNER TO naval;
--
-- Name: material_assigment_template; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE material_assigment_template (
id bigint NOT NULL,
version bigint NOT NULL,
units numeric(19,2),
unit_price numeric(19,2),
material_id bigint,
order_element_template_id bigint
);
ALTER TABLE public.material_assigment_template OWNER TO naval;
--
-- Name: material_category; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE material_category (
id bigint NOT NULL,
version bigint NOT NULL,
code character varying(255) NOT NULL,
name character varying(255),
code_autogenerated boolean NOT NULL,
last_material_sequence_code integer NOT NULL,
parent_id bigint
);
ALTER TABLE public.material_category OWNER TO naval;
--
-- Name: order_authorization; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_authorization (
id bigint NOT NULL,
order_authorization_subclass character varying(255) NOT NULL,
version bigint NOT NULL,
authorization_type character varying(255) NOT NULL,
order_id bigint,
user_id bigint,
profile_id bigint
);
ALTER TABLE public.order_authorization OWNER TO naval;
--
-- Name: order_element; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_element (
id bigint NOT NULL,
version bigint NOT NULL,
name character varying(255),
description character varying(255),
code character varying(255),
init_date timestamp with time zone,
deadline timestamp with time zone,
last_advance_meausurement_for_spreading numeric(19,2),
dirty_last_advance_measurement_for_spreading boolean,
parent bigint,
template bigint,
external_code character varying(255),
sum_charged_hours_id bigint,
position_in_container integer
);
ALTER TABLE public.order_element OWNER TO naval;
--
-- Name: order_element_label; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_element_label (
order_element_id bigint NOT NULL,
label_id bigint NOT NULL
);
ALTER TABLE public.order_element_label OWNER TO naval;
--
-- Name: order_element_template; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_element_template (
id bigint NOT NULL,
version bigint NOT NULL,
name character varying(255),
description character varying(255),
code character varying(255),
start_as_days_from_beginning integer,
deadline_as_days_from_beginning integer,
scheduling_state_type integer,
parent bigint,
position_in_container integer
);
ALTER TABLE public.order_element_template OWNER TO naval;
--
-- Name: order_element_template_label; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_element_template_label (
order_element_template_id bigint NOT NULL,
label_id bigint NOT NULL
);
ALTER TABLE public.order_element_template_label OWNER TO naval;
--
-- Name: order_element_template_quality_form; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_element_template_quality_form (
order_element_template_id bigint NOT NULL,
quality_form_id bigint NOT NULL
);
ALTER TABLE public.order_element_template_quality_form OWNER TO naval;
--
-- Name: order_line; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_line (
order_element_id bigint NOT NULL,
last_hours_group_sequence_code integer
);
ALTER TABLE public.order_line OWNER TO naval;
--
-- Name: order_line_group; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_line_group (
order_element_id bigint NOT NULL
);
ALTER TABLE public.order_line_group OWNER TO naval;
--
-- Name: order_line_group_template; Type: TABLE; Schema: public; Owner: naval; Tablespace:
--
CREATE TABLE order_line_group_template (
group_template_id bigint NOT NULL
);
ALTER TABLE public.order_line_group_template OWNER TO naval;
--
-- Name: order_line_template; Type: TABLE; Schema: public; Owner: naval; Tablespace: