source: trunk/sql/aggiornamento-2.0_2014-04-22.sql

Last change on this file was 223, checked in by luciano, 10 years ago

Admin: aggiornati gli update sql
il file sql/update_2014.php vi aiuta ad aggiornare tutti gli ultimi sql del 2014

File size: 3.6 KB
Line 
1
2DROP TABLE `soraldo_ele_conf`;
3CREATE TABLE `soraldo_ele_conf` (
4 `id_conf` int(11) NOT NULL AUTO_INCREMENT,
5 `descrizione` varchar(50) NOT NULL,
6 `limite` int(2) NOT NULL,
7 `consin` enum('0','1') NOT NULL DEFAULT '1',
8 `infpremio` int(3) NOT NULL,
9 `supsbarramento` int(3) NOT NULL,
10 `suppremio` int(3) NOT NULL,
11 `listinfsbar` int(3) NOT NULL DEFAULT '1',
12 `listinfconta` enum('0','1') NOT NULL DEFAULT '1',
13 `listsupconta` enum('0','1') NOT NULL DEFAULT '1',
14 `supminpremio` int(3) NOT NULL,
15 `infminpremio` int(3) NOT NULL,
16 `infdisgiunto` enum('0','1') NOT NULL DEFAULT '0',
17 `supdisgiunto` enum('0','1') NOT NULL DEFAULT '0',
18 `votolista` enum('0','1') NOT NULL DEFAULT '0',
19 `inffisso` enum('0','1') NOT NULL DEFAULT '0',
20 `supfisso` enum('0','1') NOT NULL DEFAULT '0',
21 `fascia_capoluogo` int(2) NOT NULL DEFAULT '0',
22 PRIMARY KEY (`id_conf`)
23) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
24
25INSERT INTO `soraldo_ele_conf` (`id_conf`, `descrizione`, `limite`, `consin`, `infpremio`, `supsbarramento`, `suppremio`, `listinfsbar`, `listinfconta`, `listsupconta`, `supminpremio`, `infminpremio`, `infdisgiunto`, `supdisgiunto`, `votolista`, `inffisso`, `supfisso`, `fascia_capoluogo`) VALUES
26(1, 'Legge Italiana 267/2000', 3, '1', 67, 3, 60, 3, '1', '1', 40, 40, '0', '0', '0', '0', '0', 6),
27(2, 'Regione Sicilia precedente al 2008', 2, '0', 67, 3, 60, 3, '1', '1', 40, 40, '0', '0', '0', '0', '0', 6),
28(3, 'Regione Sicilia Legge n. 22 del 16/12/2008', 2, '0', 67, 5, 60, 3, '1', '0', 40, 40, '0', '0', '0', '0', '0', 7),
29(4, 'Regione Sicilia Legge n.6/2011', 5, '1', 67, 5, 60, 5, '1', '1', 40, 40, '1', '1', '0', '0', '0', 7),
30(5, 'Legge Italiana 267/2000 con riduzione 2011', 3, '1', 67, 3, 60, 3, '1', '1', 40, 40, '0', '0', '0', '0', '0', 7),
31(6, 'Legge Italiana 267/2000 con riduzione 2012', 3, '1', 67, 3, 60, 3, '1', '1', 40, 40, '0', '0', '0', '0', '0', 7),
32(7, 'Legge Italiana 267/2000 con modifiche 2014', 3, '1', 67, 3, 60, 3, '1', '1', 40, 40, '0', '0', '0', '0', '0', 6);
33
34
35DROP TABLE `soraldo_ele_fasce`;
36
37CREATE TABLE IF NOT EXISTS `soraldo_ele_fasce` (
38 `id_fascia` int(2) NOT NULL,
39 `abitanti` int(11) NOT NULL,
40 `seggi` int(4) NOT NULL,
41 `id_conf` int(11) DEFAULT '1',
42 KEY `id_fascia` (`id_fascia`)
43) ENGINE=MyISAM DEFAULT CHARSET=latin1;
44
45
46INSERT INTO `soraldo_ele_fasce` (`id_fascia`, `abitanti`, `seggi`, `id_conf`) VALUES
47(1, 3000, 12, 1),
48(2, 10000, 16, 1),
49(3, 15000, 20, 1),
50(4, 30000, 20, 1),
51(5, 100000, 30, 1),
52(6, 250000, 40, 1),
53(7, 500000, 46, 1),
54(8, 1000000, 50, 1),
55(9, 100000000, 60, 1),
56(1, 3000, 12, 2),
57(2, 10000, 16, 2),
58(3, 15000, 20, 2),
59(4, 30000, 20, 2),
60(5, 100000, 30, 2),
61(6, 250000, 40, 2),
62(7, 500000, 46, 2),
63(8, 1000000, 50, 2),
64(9, 100000000, 60, 2),
65(1, 3000, 9, 3),
66(2, 5000, 9, 3),
67(4, 15000, 16, 3),
68(3, 10000, 12, 3),
69(5, 30000, 16, 3),
70(6, 100000, 24, 3),
71(7, 250000, 32, 3),
72(8, 500000, 36, 3),
73(9, 1000000, 40, 3),
74(10, 100000000, 48, 3),
75(1, 3000, 6, 4),
76(2, 5000, 7, 4),
77(3, 10000, 12, 4),
78(4, 15000, 16, 4),
79(5, 30000, 16, 4),
80(6, 100000, 24, 4),
81(7, 250000, 32, 4),
82(8, 500000, 36, 4),
83(9, 1000000, 40, 4),
84(10, 100000000, 48, 4),
85(1, 3000, 9, 5),
86(2, 5000, 9, 5),
87(3, 10000, 12, 5),
88(4, 15000, 16, 5),
89(5, 30000, 16, 5),
90(6, 100000, 24, 5),
91(7, 250000, 32, 5),
92(8, 500000, 36, 5),
93(9, 1000000, 40, 5),
94(10, 100000000, 48, 5),
95(1, 3000, 6, 6),
96(2, 5000, 7, 6),
97(3, 10000, 10, 6),
98(4, 15000, 16, 6),
99(5, 30000, 16, 6),
100(6, 100000, 24, 6),
101(7, 250000, 32, 6),
102(8, 500000, 36, 6),
103(9, 1000000, 40, 6),
104(10, 100000000, 48, 6),
105(1, 3000, 10, 7),
106(2, 10000, 12, 7),
107(3, 15000, 16, 7),
108(4, 30000, 16, 7),
109(5, 100000, 24, 7),
110(6, 250000, 32, 7),
111(7, 500000, 36, 7),
112(8, 1000000, 40, 7),
113(9, 100000000, 48, 7);
114
Note: See TracBrowser for help on using the repository browser.