-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.sql
More file actions
91 lines (73 loc) · 2.6 KB
/
Copy pathdb.sql
File metadata and controls
91 lines (73 loc) · 2.6 KB
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
/*
* This file is part of Project Lumiére <http://monossido.ath.cx/cinema>
*
* Project Lumiére is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Project Lumiére is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Project Lumiére. If not, see <http://www.gnu.org/licenses/>.
*
*/
--
-- Database: `cinema`
--
-- --------------------------------------------------------
--
-- Table structure for table `Film`
--
CREATE TABLE IF NOT EXISTS `Film` (
`id_film` tinyint(4) NOT NULL auto_increment,
`titolo` varchar(255) NOT NULL,
`risoluzione` varchar(6) NOT NULL,
`lingua` varchar(255) NOT NULL,
`visto` tinyint(1) NOT NULL,
`durata` varchar(40) NOT NULL,
`voti` tinyint(4) NOT NULL,
`passato` tinyint(1) NOT NULL,
PRIMARY KEY (`id_film`),
UNIQUE KEY `titolo` (`titolo`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
-- --------------------------------------------------------
--
-- Table structure for table `Stato`
--
CREATE TABLE IF NOT EXISTS `Stato` (
`Round` tinyint(4) NOT NULL,
`RegistrazioniAperte` tinyint(1) NOT NULL,
`VotazioniAperte` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `Stato`
--
INSERT INTO `Stato` (`Round`, `RegistrazioniAperte`, `VotazioniAperte`) VALUES
(0, 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `Utenti`
--
CREATE TABLE IF NOT EXISTS `Utenti` (
`id_utente` tinyint(4) NOT NULL auto_increment,
`Username` varchar(20) NOT NULL,
`Password` varchar(255) NOT NULL,
`Voto` tinyint(4) NOT NULL,
`amministratore` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id_utente`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;
-- --------------------------------------------------------
--
-- Table structure for table `Votazioni`
--
CREATE TABLE IF NOT EXISTS `Votazioni` (
`idvotazione` tinyint(10) NOT NULL auto_increment,
`id_film` tinyint(4) NOT NULL,
`id_utente` tinyint(4) NOT NULL,
`voto` tinyint(2) NOT NULL,
PRIMARY KEY (`idvotazione`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;