-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
3451 lines (2398 loc) · 94.1 KB
/
schema.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 9.2.4
-- Dumped by pg_dump version 9.2.4
-- Started on 2013-08-12 18:08:16
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- TOC entry 253 (class 3079 OID 11727)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 2461 (class 0 OID 0)
-- Dependencies: 253
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = true;
--
-- TOC entry 169 (class 1259 OID 66969)
-- Name: anniscolastici; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE anniscolastici (
annoscolastico integer NOT NULL,
istituto integer NOT NULL,
descrizione character varying(160) NOT NULL,
inizioannoscolastico date NOT NULL,
finelezioni date NOT NULL
);
ALTER TABLE public.anniscolastici OWNER TO postgres;
--
-- TOC entry 168 (class 1259 OID 66967)
-- Name: anniscolastici_annoscolastico_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE anniscolastici_annoscolastico_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.anniscolastici_annoscolastico_seq OWNER TO postgres;
--
-- TOC entry 2462 (class 0 OID 0)
-- Dependencies: 168
-- Name: anniscolastici_annoscolastico_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE anniscolastici_annoscolastico_seq OWNED BY anniscolastici.annoscolastico;
--
-- TOC entry 171 (class 1259 OID 66982)
-- Name: annotazioni; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE annotazioni (
annotazione integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
alunno integer NOT NULL,
tipoannotazione character(1) NOT NULL,
descrizione character varying(2048) NOT NULL,
docente integer NOT NULL
);
ALTER TABLE public.annotazioni OWNER TO postgres;
--
-- TOC entry 170 (class 1259 OID 66980)
-- Name: annotazioni_annotazione_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE annotazioni_annotazione_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.annotazioni_annotazione_seq OWNER TO postgres;
--
-- TOC entry 2463 (class 0 OID 0)
-- Dependencies: 170
-- Name: annotazioni_annotazione_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE annotazioni_annotazione_seq OWNED BY annotazioni.annotazione;
--
-- TOC entry 173 (class 1259 OID 66993)
-- Name: annotazionidocente; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE annotazionidocente (
annotazionedocente integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
alunno integer NOT NULL,
descrizione character varying(2048) NOT NULL,
docente integer NOT NULL
);
ALTER TABLE public.annotazionidocente OWNER TO postgres;
--
-- TOC entry 172 (class 1259 OID 66991)
-- Name: annotazionidocente_annotazionedocente_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE annotazionidocente_annotazionedocente_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.annotazionidocente_annotazionedocente_seq OWNER TO postgres;
--
-- TOC entry 2464 (class 0 OID 0)
-- Dependencies: 172
-- Name: annotazionidocente_annotazionedocente_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE annotazionidocente_annotazionedocente_seq OWNED BY annotazionidocente.annotazionedocente;
--
-- TOC entry 175 (class 1259 OID 67004)
-- Name: argomenti; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE argomenti (
argomento integer NOT NULL,
classe integer NOT NULL,
materia integer NOT NULL,
descrizione character varying(60) NOT NULL
);
ALTER TABLE public.argomenti OWNER TO postgres;
--
-- TOC entry 174 (class 1259 OID 67002)
-- Name: argomenti_argomento_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE argomenti_argomento_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.argomenti_argomento_seq OWNER TO postgres;
--
-- TOC entry 2465 (class 0 OID 0)
-- Dependencies: 174
-- Name: argomenti_argomento_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE argomenti_argomento_seq OWNED BY argomenti.argomento;
--
-- TOC entry 177 (class 1259 OID 67015)
-- Name: assenze; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE assenze (
assenza integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
alunno integer NOT NULL,
rilevazione character(1) NOT NULL,
docente integer NOT NULL,
giustificazione integer
);
ALTER TABLE public.assenze OWNER TO postgres;
--
-- TOC entry 176 (class 1259 OID 67013)
-- Name: assenze_assenza_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE assenze_assenza_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.assenze_assenza_seq OWNER TO postgres;
--
-- TOC entry 2466 (class 0 OID 0)
-- Dependencies: 176
-- Name: assenze_assenza_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE assenze_assenza_seq OWNED BY assenze.assenza;
--
-- TOC entry 179 (class 1259 OID 67026)
-- Name: classi; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE classi (
classe integer NOT NULL,
annoscolastico integer NOT NULL,
indirizzoscolastico integer NOT NULL,
sezione character varying(5),
annodicorso integer NOT NULL,
descrizione character varying(160) NOT NULL
);
ALTER TABLE public.classi OWNER TO postgres;
--
-- TOC entry 178 (class 1259 OID 67024)
-- Name: classi_classe_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE classi_classe_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.classi_classe_seq OWNER TO postgres;
--
-- TOC entry 2467 (class 0 OID 0)
-- Dependencies: 178
-- Name: classi_classe_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE classi_classe_seq OWNED BY classi.classe;
--
-- TOC entry 181 (class 1259 OID 67040)
-- Name: classialunni; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE classialunni (
classealunno integer NOT NULL,
classe integer NOT NULL,
alunno integer NOT NULL
);
ALTER TABLE public.classialunni OWNER TO postgres;
--
-- TOC entry 180 (class 1259 OID 67038)
-- Name: classialunni_classealunno_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE classialunni_classealunno_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.classialunni_classealunno_seq OWNER TO postgres;
--
-- TOC entry 2468 (class 0 OID 0)
-- Dependencies: 180
-- Name: classialunni_classealunno_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE classialunni_classealunno_seq OWNED BY classialunni.classealunno;
--
-- TOC entry 183 (class 1259 OID 67053)
-- Name: festivi; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE festivi (
festivo integer NOT NULL,
istituto integer NOT NULL,
giorno date NOT NULL,
descrizione character varying(160)
);
ALTER TABLE public.festivi OWNER TO postgres;
--
-- TOC entry 182 (class 1259 OID 67051)
-- Name: festivi_festivo_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE festivi_festivo_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.festivi_festivo_seq OWNER TO postgres;
--
-- TOC entry 2469 (class 0 OID 0)
-- Dependencies: 182
-- Name: festivi_festivo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE festivi_festivo_seq OWNED BY festivi.festivo;
--
-- TOC entry 185 (class 1259 OID 67066)
-- Name: figureprofessionali; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE figureprofessionali (
figuraprofessionale integer NOT NULL,
descrizione character varying(160) NOT NULL
);
ALTER TABLE public.figureprofessionali OWNER TO postgres;
--
-- TOC entry 184 (class 1259 OID 67064)
-- Name: figureprofessionali_figuraprofessionale_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE figureprofessionali_figuraprofessionale_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.figureprofessionali_figuraprofessionale_seq OWNER TO postgres;
--
-- TOC entry 2470 (class 0 OID 0)
-- Dependencies: 184
-- Name: figureprofessionali_figuraprofessionale_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE figureprofessionali_figuraprofessionale_seq OWNED BY figureprofessionali.figuraprofessionale;
--
-- TOC entry 187 (class 1259 OID 67077)
-- Name: figureprofessionalidettagli; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE figureprofessionalidettagli (
figuraprofessionaledettaglio integer NOT NULL,
soggetto integer NOT NULL,
figuraprofessionale integer NOT NULL,
personafisica integer NOT NULL
);
ALTER TABLE public.figureprofessionalidettagli OWNER TO postgres;
--
-- TOC entry 186 (class 1259 OID 67075)
-- Name: figureprofessionalidettagli_figuraprofessionaledettaglio_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE figureprofessionalidettagli_figuraprofessionaledettaglio_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.figureprofessionalidettagli_figuraprofessionaledettaglio_seq OWNER TO postgres;
--
-- TOC entry 2471 (class 0 OID 0)
-- Dependencies: 186
-- Name: figureprofessionalidettagli_figuraprofessionaledettaglio_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE figureprofessionalidettagli_figuraprofessionaledettaglio_seq OWNED BY figureprofessionalidettagli.figuraprofessionaledettaglio;
--
-- TOC entry 189 (class 1259 OID 67090)
-- Name: firme; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE firme (
firma integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
docente integer NOT NULL
);
ALTER TABLE public.firme OWNER TO postgres;
--
-- TOC entry 188 (class 1259 OID 67088)
-- Name: firme_firma_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE firme_firma_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.firme_firma_seq OWNER TO postgres;
--
-- TOC entry 2472 (class 0 OID 0)
-- Dependencies: 188
-- Name: firme_firma_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE firme_firma_seq OWNED BY firme.firma;
--
-- TOC entry 191 (class 1259 OID 67101)
-- Name: giustificazioni; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE giustificazioni (
giustificazione integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
alunno integer NOT NULL,
descrizione character varying(2048) NOT NULL,
docente integer NOT NULL,
librettopersonaleconversazione integer
);
ALTER TABLE public.giustificazioni OWNER TO postgres;
--
-- TOC entry 190 (class 1259 OID 67099)
-- Name: giustificazioni_giustificazione_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE giustificazioni_giustificazione_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.giustificazioni_giustificazione_seq OWNER TO postgres;
--
-- TOC entry 2473 (class 0 OID 0)
-- Dependencies: 190
-- Name: giustificazioni_giustificazione_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE giustificazioni_giustificazione_seq OWNED BY giustificazioni.giustificazione;
--
-- TOC entry 193 (class 1259 OID 67114)
-- Name: gruppiqualifiche; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE gruppiqualifiche (
gruppoqualifiche integer NOT NULL,
istituto integer,
descrizione character varying(160) NOT NULL
);
ALTER TABLE public.gruppiqualifiche OWNER TO postgres;
--
-- TOC entry 192 (class 1259 OID 67112)
-- Name: gruppiqualifiche_gruppoqualifiche_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE gruppiqualifiche_gruppoqualifiche_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.gruppiqualifiche_gruppoqualifiche_seq OWNER TO postgres;
--
-- TOC entry 2474 (class 0 OID 0)
-- Dependencies: 192
-- Name: gruppiqualifiche_gruppoqualifiche_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE gruppiqualifiche_gruppoqualifiche_seq OWNED BY gruppiqualifiche.gruppoqualifiche;
--
-- TOC entry 195 (class 1259 OID 67125)
-- Name: gruppiqualifichedettaglio; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE gruppiqualifichedettaglio (
gruppoqualifichedetaglio integer NOT NULL,
gruppoqualifiche integer NOT NULL,
qualifica integer NOT NULL
);
ALTER TABLE public.gruppiqualifichedettaglio OWNER TO postgres;
--
-- TOC entry 194 (class 1259 OID 67123)
-- Name: gruppiqualifichedettaglio_gruppoqualifichedetaglio_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE gruppiqualifichedettaglio_gruppoqualifichedetaglio_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.gruppiqualifichedettaglio_gruppoqualifichedetaglio_seq OWNER TO postgres;
--
-- TOC entry 2475 (class 0 OID 0)
-- Dependencies: 194
-- Name: gruppiqualifichedettaglio_gruppoqualifichedetaglio_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE gruppiqualifichedettaglio_gruppoqualifichedetaglio_seq OWNED BY gruppiqualifichedettaglio.gruppoqualifichedetaglio;
--
-- TOC entry 197 (class 1259 OID 67136)
-- Name: indirizzi; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE indirizzi (
indirizzo integer NOT NULL,
tipoindirizzo integer NOT NULL,
soggetto integer NOT NULL,
prefissovia character varying(15),
via character varying(160),
civico character varying(15),
isolato character varying(60),
palazzo character varying(60),
scala character varying(60),
piano character varying(15),
interno character varying(15),
cap character varying(15),
localita character varying(160),
provincia character varying(160),
nazione integer NOT NULL
);
ALTER TABLE public.indirizzi OWNER TO postgres;
--
-- TOC entry 196 (class 1259 OID 67134)
-- Name: indirizzi_indirizzo_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE indirizzi_indirizzo_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.indirizzi_indirizzo_seq OWNER TO postgres;
--
-- TOC entry 2476 (class 0 OID 0)
-- Dependencies: 196
-- Name: indirizzi_indirizzo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE indirizzi_indirizzo_seq OWNED BY indirizzi.indirizzo;
--
-- TOC entry 199 (class 1259 OID 67147)
-- Name: indirizziscolastici; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE indirizziscolastici (
indirizzoscolastico integer NOT NULL,
istituto integer NOT NULL,
descrizione character varying(160) NOT NULL,
annidicorso integer NOT NULL
);
ALTER TABLE public.indirizziscolastici OWNER TO postgres;
--
-- TOC entry 198 (class 1259 OID 67145)
-- Name: indirizziscolastici_indirizzoscolastico_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE indirizziscolastici_indirizzoscolastico_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.indirizziscolastici_indirizzoscolastico_seq OWNER TO postgres;
--
-- TOC entry 2477 (class 0 OID 0)
-- Dependencies: 198
-- Name: indirizziscolastici_indirizzoscolastico_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE indirizziscolastici_indirizzoscolastico_seq OWNED BY indirizziscolastici.indirizzoscolastico;
--
-- TOC entry 201 (class 1259 OID 67158)
-- Name: istituti; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE istituti (
istituto integer NOT NULL,
descrizione character varying(160) NOT NULL,
codicemeccanografico character varying(160) NOT NULL
);
ALTER TABLE public.istituti OWNER TO postgres;
--
-- TOC entry 200 (class 1259 OID 67156)
-- Name: istituti_istituto_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE istituti_istituto_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.istituti_istituto_seq OWNER TO postgres;
--
-- TOC entry 2478 (class 0 OID 0)
-- Dependencies: 200
-- Name: istituti_istituto_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE istituti_istituto_seq OWNED BY istituti.istituto;
--
-- TOC entry 203 (class 1259 OID 67169)
-- Name: lezioni; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE lezioni (
lezione integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
materia integer NOT NULL,
docente integer NOT NULL,
descrizione character varying(2048) NOT NULL
);
ALTER TABLE public.lezioni OWNER TO postgres;
--
-- TOC entry 202 (class 1259 OID 67167)
-- Name: lezioni_lezione_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE lezioni_lezione_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.lezioni_lezione_seq OWNER TO postgres;
--
-- TOC entry 2479 (class 0 OID 0)
-- Dependencies: 202
-- Name: lezioni_lezione_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE lezioni_lezione_seq OWNED BY lezioni.lezione;
--
-- TOC entry 205 (class 1259 OID 67180)
-- Name: librettipersonali; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE librettipersonali (
librettopersonale integer NOT NULL,
classe integer NOT NULL,
alunno integer NOT NULL
);
ALTER TABLE public.librettipersonali OWNER TO postgres;
--
-- TOC entry 204 (class 1259 OID 67178)
-- Name: librettipersonali_librettopersonale_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE librettipersonali_librettopersonale_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.librettipersonali_librettopersonale_seq OWNER TO postgres;
--
-- TOC entry 2480 (class 0 OID 0)
-- Dependencies: 204
-- Name: librettipersonali_librettopersonale_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE librettipersonali_librettopersonale_seq OWNED BY librettipersonali.librettopersonale;
--
-- TOC entry 207 (class 1259 OID 67191)
-- Name: librettipersonaliconversazioni; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE librettipersonaliconversazioni (
librettopersonaleconversazione integer NOT NULL,
librettopersonale integer NOT NULL,
oggetto character varying(160) NOT NULL,
tipoconversazione character(1) NOT NULL
);
ALTER TABLE public.librettipersonaliconversazioni OWNER TO postgres;
--
-- TOC entry 206 (class 1259 OID 67189)
-- Name: librettipersonaliconversazion_librettopersonaleconversazion_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE librettipersonaliconversazion_librettopersonaleconversazion_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.librettipersonaliconversazion_librettopersonaleconversazion_seq OWNER TO postgres;
--
-- TOC entry 2481 (class 0 OID 0)
-- Dependencies: 206
-- Name: librettipersonaliconversazion_librettopersonaleconversazion_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE librettipersonaliconversazion_librettopersonaleconversazion_seq OWNED BY librettipersonaliconversazioni.librettopersonaleconversazione;
--
-- TOC entry 209 (class 1259 OID 67202)
-- Name: librettipersonalimessaggi; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE librettipersonalimessaggi (
librettopersonalemessaggio integer NOT NULL,
librettopersonaleconversazione integer NOT NULL,
fattoil timestamp(3) without time zone NOT NULL,
messaggio character varying(2048) NOT NULL,
tipomessaggio character(1) NOT NULL,
personafisica integer NOT NULL
);
ALTER TABLE public.librettipersonalimessaggi OWNER TO postgres;
--
-- TOC entry 208 (class 1259 OID 67200)
-- Name: librettipersonalimessaggi_librettopersonalemessaggio_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE librettipersonalimessaggi_librettopersonalemessaggio_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.librettipersonalimessaggi_librettopersonalemessaggio_seq OWNER TO postgres;
--
-- TOC entry 2482 (class 0 OID 0)
-- Dependencies: 208
-- Name: librettipersonalimessaggi_librettopersonalemessaggio_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE librettipersonalimessaggi_librettopersonalemessaggio_seq OWNED BY librettipersonalimessaggi.librettopersonalemessaggio;
--
-- TOC entry 211 (class 1259 OID 67213)
-- Name: librettipersonalimessaggiletti; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE librettipersonalimessaggiletti (
librettopersonalemessaggioletto integer NOT NULL,
librettopersonalemessaggio integer NOT NULL,
lettoil timestamp(3) without time zone NOT NULL,
personafisica integer NOT NULL
);
ALTER TABLE public.librettipersonalimessaggiletti OWNER TO postgres;
--
-- TOC entry 210 (class 1259 OID 67211)
-- Name: librettipersonalimessaggilett_librettopersonalemessaggiolet_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE librettipersonalimessaggilett_librettopersonalemessaggiolet_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.librettipersonalimessaggilett_librettopersonalemessaggiolet_seq OWNER TO postgres;
--
-- TOC entry 2483 (class 0 OID 0)
-- Dependencies: 210
-- Name: librettipersonalimessaggilett_librettopersonalemessaggiolet_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE librettipersonalimessaggilett_librettopersonalemessaggiolet_seq OWNED BY librettipersonalimessaggiletti.librettopersonalemessaggioletto;
--
-- TOC entry 213 (class 1259 OID 67224)
-- Name: logannotazioni; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE logannotazioni (
logannotazione integer NOT NULL,
logtimestamp character(50) NOT NULL,
logrevisore integer NOT NULL,
annotazione integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
alunno integer NOT NULL,
tipoannotazione character(1),
descrizione character varying(2048) NOT NULL,
docente integer NOT NULL
);
ALTER TABLE public.logannotazioni OWNER TO postgres;
--
-- TOC entry 212 (class 1259 OID 67222)
-- Name: logannotazioni_logannotazione_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE logannotazioni_logannotazione_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.logannotazioni_logannotazione_seq OWNER TO postgres;
--
-- TOC entry 2484 (class 0 OID 0)
-- Dependencies: 212
-- Name: logannotazioni_logannotazione_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE logannotazioni_logannotazione_seq OWNED BY logannotazioni.logannotazione;
--
-- TOC entry 215 (class 1259 OID 67235)
-- Name: logassenze; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE logassenze (
logassenza integer NOT NULL,
logtimestamp character(50) NOT NULL,
logrevisore integer NOT NULL,
assenza integer NOT NULL,
classe integer NOT NULL,
giorno date NOT NULL,
periododilezione integer NOT NULL,
alunno integer NOT NULL,
rilevazione character(1) NOT NULL,
docente integer NOT NULL,
giustificazione integer
);
ALTER TABLE public.logassenze OWNER TO postgres;
--
-- TOC entry 214 (class 1259 OID 67233)
-- Name: logassenze_logassenza_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE logassenze_logassenza_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE