|
@@ -1,11 +1,11 @@ |
1 |
1 |
|
-- phpMyAdmin SQL Dump |
2 |
|
- |
-- version 4.2.11 |
|
2 |
+ |
-- version 4.2.7.1 |
3 |
3 |
|
-- http://www.phpmyadmin.net |
4 |
4 |
|
-- |
5 |
|
- |
-- Host: localhost |
6 |
|
- |
-- Generation Time: Jul 17, 2015 at 10:00 |
7 |
|
- |
-- Server version: 5.6.21 |
8 |
|
- |
-- PHP Version: 5.6.3 |
|
5 |
+ |
-- Host: 127.0.0.1 |
|
6 |
+ |
-- Generation Time: Ago 03, 2015 alle 10:36 |
|
7 |
+ |
-- Versione del server: 5.6.20 |
|
8 |
+ |
-- PHP Version: 5.5.15 |
9 |
9 |
|
|
10 |
10 |
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
11 |
11 |
|
SET time_zone = "+00:00"; |
|
@@ -23,7 +23,7 @@ |
23 |
23 |
|
-- -------------------------------------------------------- |
24 |
24 |
|
|
25 |
25 |
|
-- |
26 |
|
- |
-- Table structure for table `commenti` |
|
26 |
+ |
-- Struttura della tabella `commenti` |
27 |
27 |
|
-- |
28 |
28 |
|
|
29 |
29 |
|
CREATE TABLE IF NOT EXISTS `commenti` ( |
|
@@ -32,13 +32,13 @@ |
32 |
32 |
|
`id_user` int(11) DEFAULT NULL, |
33 |
33 |
|
`voto` int(11) NOT NULL, |
34 |
34 |
|
`descrizione` varchar(255) NOT NULL, |
35 |
|
- |
`data` date NOT NULL |
36 |
|
- |
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; |
|
35 |
+ |
`data` datetime NOT NULL |
|
36 |
+ |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ; |
37 |
37 |
|
|
38 |
38 |
|
-- -------------------------------------------------------- |
39 |
39 |
|
|
40 |
40 |
|
-- |
41 |
|
- |
-- Table structure for table `immagini_commenti` |
|
41 |
+ |
-- Struttura della tabella `immagini_commenti` |
42 |
42 |
|
-- |
43 |
43 |
|
|
44 |
44 |
|
CREATE TABLE IF NOT EXISTS `immagini_commenti` ( |
|
@@ -49,7 +49,7 @@ |
49 |
49 |
|
-- -------------------------------------------------------- |
50 |
50 |
|
|
51 |
51 |
|
-- |
52 |
|
- |
-- Table structure for table `immagini_locali` |
|
52 |
+ |
-- Struttura della tabella `immagini_locali` |
53 |
53 |
|
-- |
54 |
54 |
|
|
55 |
55 |
|
CREATE TABLE IF NOT EXISTS `immagini_locali` ( |
|
@@ -60,7 +60,7 @@ |
60 |
60 |
|
-- -------------------------------------------------------- |
61 |
61 |
|
|
62 |
62 |
|
-- |
63 |
|
- |
-- Table structure for table `locale` |
|
63 |
+ |
-- Struttura della tabella `locale` |
64 |
64 |
|
-- |
65 |
65 |
|
|
66 |
66 |
|
CREATE TABLE IF NOT EXISTS `locale` ( |
|
@@ -71,13 +71,16 @@ |
71 |
71 |
|
`tipologia` int(11) NOT NULL, |
72 |
72 |
|
`lat` double DEFAULT NULL, |
73 |
73 |
|
`lon` double DEFAULT NULL, |
74 |
|
- |
`indirizzo` varchar(255) DEFAULT NULL |
75 |
|
- |
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; |
|
74 |
+ |
`indirizzo` varchar(255) DEFAULT NULL, |
|
75 |
+ |
`email` varchar(255) NOT NULL, |
|
76 |
+ |
`telefono` varchar(255) NOT NULL, |
|
77 |
+ |
`sito` varchar(255) NOT NULL |
|
78 |
+ |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; |
76 |
79 |
|
|
77 |
80 |
|
-- -------------------------------------------------------- |
78 |
81 |
|
|
79 |
82 |
|
-- |
80 |
|
- |
-- Table structure for table `utente` |
|
83 |
+ |
-- Struttura della tabella `utente` |
81 |
84 |
|
-- |
82 |
85 |
|
|
83 |
86 |
|
CREATE TABLE IF NOT EXISTS `utente` ( |
|
@@ -88,9 +91,8 @@ |
88 |
91 |
|
`cell` varchar(255) NOT NULL, |
89 |
92 |
|
`email` varchar(255) NOT NULL, |
90 |
93 |
|
`avatar` varchar(255) NOT NULL, |
91 |
|
- |
`is_owner` tinyint(1) NOT NULL, |
92 |
94 |
|
`token` varchar(255) DEFAULT NULL |
93 |
|
- |
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1; |
|
95 |
+ |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=52 ; |
94 |
96 |
|
|
95 |
97 |
|
-- |
96 |
98 |
|
-- Indexes for dumped tables |
|
@@ -124,7 +126,7 @@ |
124 |
126 |
|
-- Indexes for table `utente` |
125 |
127 |
|
-- |
126 |
128 |
|
ALTER TABLE `utente` |
127 |
|
- |
ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`), ADD UNIQUE KEY `email` (`email`), ADD UNIQUE KEY `token` (`token`); |
|
129 |
+ |
ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `username` (`username`), ADD UNIQUE KEY `email` (`email`), ADD KEY `token` (`token`), ADD KEY `email_2` (`email`); |
128 |
130 |
|
|
129 |
131 |
|
-- |
130 |
132 |
|
-- AUTO_INCREMENT for dumped tables |
|
@@ -134,42 +136,42 @@ |
134 |
136 |
|
-- AUTO_INCREMENT for table `commenti` |
135 |
137 |
|
-- |
136 |
138 |
|
ALTER TABLE `commenti` |
137 |
|
- |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2; |
|
139 |
+ |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=25; |
138 |
140 |
|
-- |
139 |
141 |
|
-- AUTO_INCREMENT for table `locale` |
140 |
142 |
|
-- |
141 |
143 |
|
ALTER TABLE `locale` |
142 |
|
- |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=15; |
|
144 |
+ |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10; |
143 |
145 |
|
-- |
144 |
146 |
|
-- AUTO_INCREMENT for table `utente` |
145 |
147 |
|
-- |
146 |
148 |
|
ALTER TABLE `utente` |
147 |
|
- |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=53; |
|
149 |
+ |
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=52; |
148 |
150 |
|
-- |
149 |
|
- |
-- Constraints for dumped tables |
|
151 |
+ |
-- Limiti per le tabelle scaricate |
150 |
152 |
|
-- |
151 |
153 |
|
|
152 |
154 |
|
-- |
153 |
|
- |
-- Constraints for table `commenti` |
|
155 |
+ |
-- Limiti per la tabella `commenti` |
154 |
156 |
|
-- |
155 |
157 |
|
ALTER TABLE `commenti` |
156 |
158 |
|
ADD CONSTRAINT `commenti_ibfk_1` FOREIGN KEY (`id_locale`) REFERENCES `locale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
157 |
159 |
|
ADD CONSTRAINT `commenti_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `utente` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; |
158 |
160 |
|
|
159 |
161 |
|
-- |
160 |
|
- |
-- Constraints for table `immagini_commenti` |
|
162 |
+ |
-- Limiti per la tabella `immagini_commenti` |
161 |
163 |
|
-- |
162 |
164 |
|
ALTER TABLE `immagini_commenti` |
163 |
165 |
|
ADD CONSTRAINT `immagini_commenti_ibfk_1` FOREIGN KEY (`id_commento`) REFERENCES `commenti` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; |
164 |
166 |
|
|
165 |
167 |
|
-- |
166 |
|
- |
-- Constraints for table `immagini_locali` |
|
168 |
+ |
-- Limiti per la tabella `immagini_locali` |
167 |
169 |
|
-- |
168 |
170 |
|
ALTER TABLE `immagini_locali` |
169 |
171 |
|
ADD CONSTRAINT `immagini_locali_ibfk_1` FOREIGN KEY (`id_locale`) REFERENCES `locale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; |
170 |
172 |
|
|
171 |
173 |
|
-- |
172 |
|
- |
-- Constraints for table `locale` |
|
174 |
+ |
-- Limiti per la tabella `locale` |
173 |
175 |
|
-- |
174 |
176 |
|
ALTER TABLE `locale` |
175 |
177 |
|
ADD CONSTRAINT `locale_ibfk_1` FOREIGN KEY (`id_utente_owner`) REFERENCES `utente` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; |