- Timestamp:
- Dec 23, 2019, 12:09:07 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SQL/Structure.sql
r31 r50 1 -- phpMyAdmin SQL Dump 2 -- version 4.6.6deb5 3 -- https://www.phpmyadmin.net/ 4 -- 5 -- Počítač: localhost:3306 6 -- Vytvořeno: Ned 30. pro 2018, 19:07 7 -- Verze serveru: 10.1.34-MariaDB-0ubuntu0.18.04.1 8 -- Verze PHP: 7.2.10-0ubuntu0.18.04.1 9 10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 SET time_zone = "+00:00"; 12 13 -- 14 -- Databáze: `tanec` 15 -- 16 1 -- -------------------------------------------------------- 2 -- Hostitel: localhost 3 -- Verze serveru: 10.3.20-MariaDB-0ubuntu0.19.10.1 - Ubuntu 19.10 4 -- OS serveru: debian-linux-gnu 5 -- HeidiSQL Verze: 10.3.0.5771 17 6 -- -------------------------------------------------------- 18 7 19 -- 20 -- Struktura tabulky `Dance` 21 -- 8 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 9 /*!40101 SET NAMES utf8 */; 10 /*!50503 SET NAMES utf8mb4 */; 11 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 12 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 22 13 23 CREATE TABLE `Dance` ( 24 `Id` int(11) NOT NULL, 14 -- Exportování struktury pro tabulka tanec.Dance 15 CREATE TABLE IF NOT EXISTS `Dance` ( 16 `Id` int(11) NOT NULL AUTO_INCREMENT, 25 17 `Name` varchar(255) NOT NULL, 26 `Group` int(11) DEFAULT NULL 27 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 18 `Group` int(11) DEFAULT NULL, 19 PRIMARY KEY (`Id`), 20 KEY `Group` (`Group`), 21 CONSTRAINT `Dance_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `DanceGroup` (`Id`) 22 ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; 28 23 29 -- 30 -- RELACE PRO TABULKU `Dance`: 31 -- `Group` 32 -- `DanceGroup` -> `Id` 33 -- 24 -- Export dat nebyl vybrán. 34 25 35 -- -------------------------------------------------------- 26 -- Exportování struktury pro tabulka tanec.DanceFigure 27 CREATE TABLE IF NOT EXISTS `DanceFigure` ( 28 `Id` int(11) NOT NULL AUTO_INCREMENT, 29 `NameCz` varchar(255) NOT NULL, 30 `NameEn` varchar(255) NOT NULL, 31 `Dance` int(11) NOT NULL, 32 PRIMARY KEY (`Id`), 33 UNIQUE KEY `Id` (`Id`), 34 KEY `Dance` (`Dance`), 35 CONSTRAINT `DanceFigure_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`) 36 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; 36 37 37 -- 38 -- Struktura tabulky `DanceGroup` 39 -- 38 -- Export dat nebyl vybrán. 40 39 41 CREATE TABLE `DanceGroup` ( 42 `Id` int(11) NOT NULL, 43 `Name` varchar(255) NOT NULL 44 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 40 -- Exportování struktury pro tabulka tanec.DanceGroup 41 CREATE TABLE IF NOT EXISTS `DanceGroup` ( 42 `Id` int(11) NOT NULL AUTO_INCREMENT, 43 `Name` varchar(255) NOT NULL, 44 PRIMARY KEY (`Id`) 45 ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; 45 46 46 -- 47 -- RELACE PRO TABULKU `DanceGroup`: 48 -- 47 -- Export dat nebyl vybrán. 49 48 50 -- -------------------------------------------------------- 51 52 -- 53 -- Struktura tabulky `MeetItem` 54 -- 55 56 CREATE TABLE `MeetItem` ( 57 `Id` int(11) NOT NULL, 49 -- Exportování struktury pro tabulka tanec.MeetItem 50 CREATE TABLE IF NOT EXISTS `MeetItem` ( 51 `Id` int(11) NOT NULL AUTO_INCREMENT, 58 52 `Message` text NOT NULL, 59 53 `Name` varchar(255) NOT NULL, … … 67 61 `Weight` int(11) DEFAULT NULL, 68 62 `Location` varchar(255) NOT NULL, 69 `Link` varchar(255) NOT NULL 63 `Link` varchar(255) NOT NULL, 64 `TimeImport` datetime DEFAULT NULL, 65 `RemoteId` varchar(255) DEFAULT NULL, 66 `Hidden` int(11) DEFAULT 0, 67 PRIMARY KEY (`Id`), 68 KEY `Source` (`Source`), 69 KEY `Time` (`Time`), 70 CONSTRAINT `MeetItem_ibfk_1` FOREIGN KEY (`Source`) REFERENCES `MeetSource` (`Id`) 71 ) ENGINE=InnoDB AUTO_INCREMENT=162 DEFAULT CHARSET=utf8; 72 73 -- Export dat nebyl vybrán. 74 75 -- Exportování struktury pro tabulka tanec.MeetSource 76 CREATE TABLE IF NOT EXISTS `MeetSource` ( 77 `Id` int(11) NOT NULL AUTO_INCREMENT, 78 `Name` varchar(255) NOT NULL, 79 `URL` varchar(255) NOT NULL, 80 `Method` varchar(255) NOT NULL, 81 PRIMARY KEY (`Id`) 82 ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; 83 84 -- Export dat nebyl vybrán. 85 86 -- Exportování struktury pro tabulka tanec.Movie 87 CREATE TABLE IF NOT EXISTS `Movie` ( 88 `Id` int(11) NOT NULL AUTO_INCREMENT, 89 `NameCz` varchar(255) NOT NULL, 90 `NameEn` varchar(255) NOT NULL, 91 `Year` int(11) NOT NULL, 92 `Imdb` varchar(255) NOT NULL, 93 `Csfd` varchar(255) NOT NULL, 94 PRIMARY KEY (`Id`), 95 KEY `Year` (`Year`) 96 ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 97 98 -- Export dat nebyl vybrán. 99 100 -- Exportování struktury pro tabulka tanec.Music 101 CREATE TABLE IF NOT EXISTS `Music` ( 102 `Id` int(11) NOT NULL AUTO_INCREMENT, 103 `Name` varchar(255) NOT NULL, 104 `URL` varchar(255) NOT NULL, 105 `Dance` int(11) NOT NULL, 106 PRIMARY KEY (`Id`), 107 KEY `Dance` (`Dance`), 108 CONSTRAINT `Music_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`) 70 109 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 71 110 72 -- 73 -- RELACE PRO TABULKU `MeetItem`: 74 -- `Source` 75 -- `MeetSource` -> `Id` 76 -- 111 -- Export dat nebyl vybrán. 77 112 78 -- -------------------------------------------------------- 79 80 -- 81 -- Struktura tabulky `MeetSource` 82 -- 83 84 CREATE TABLE `MeetSource` ( 85 `Id` int(11) NOT NULL, 86 `Name` varchar(255) NOT NULL, 87 `URL` varchar(255) NOT NULL, 88 `Method` varchar(255) NOT NULL 89 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 90 91 -- 92 -- RELACE PRO TABULKU `MeetSource`: 93 -- 94 95 -- -------------------------------------------------------- 96 97 -- 98 -- Struktura tabulky `Music` 99 -- 100 101 CREATE TABLE `Music` ( 102 `Id` int(11) NOT NULL, 103 `Name` varchar(255) NOT NULL, 104 `URL` varchar(255) NOT NULL, 105 `Dance` int(11) NOT NULL 106 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 107 108 -- 109 -- RELACE PRO TABULKU `Music`: 110 -- `Dance` 111 -- `Dance` -> `Id` 112 -- 113 114 -- -------------------------------------------------------- 115 116 -- 117 -- Struktura tabulky `Resource` 118 -- 119 120 CREATE TABLE `Resource` ( 121 `Id` int(11) NOT NULL, 113 -- Exportování struktury pro tabulka tanec.Resource 114 CREATE TABLE IF NOT EXISTS `Resource` ( 115 `Id` int(11) NOT NULL AUTO_INCREMENT, 122 116 `Name` varchar(255) NOT NULL, 123 117 `Dance` int(11) NOT NULL, 124 118 `URL` varchar(255) NOT NULL, 125 `Group` int(11) DEFAULT NULL 126 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 119 `Group` int(11) DEFAULT NULL, 120 PRIMARY KEY (`Id`), 121 KEY `Dance` (`Dance`), 122 KEY `Group` (`Group`), 123 CONSTRAINT `Resource_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`), 124 CONSTRAINT `Resource_ibfk_2` FOREIGN KEY (`Group`) REFERENCES `ResourceGroup` (`Id`) 125 ) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8; 127 126 128 -- 129 -- RELACE PRO TABULKU `Resource`: 130 -- `Dance` 131 -- `Dance` -> `Id` 132 -- `Group` 133 -- `ResourceGroup` -> `Id` 134 -- 127 -- Export dat nebyl vybrán. 135 128 136 -- -------------------------------------------------------- 129 -- Exportování struktury pro tabulka tanec.ResourceGroup 130 CREATE TABLE IF NOT EXISTS `ResourceGroup` ( 131 `Id` int(11) NOT NULL AUTO_INCREMENT, 132 `Name` varchar(255) NOT NULL, 133 `URL` varchar(255) NOT NULL, 134 PRIMARY KEY (`Id`) 135 ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 137 136 138 -- 139 -- Struktura tabulky `ResourceGroup` 140 -- 137 -- Export dat nebyl vybrán. 141 138 142 CREATE TABLE `ResourceGroup` ( 143 `Id` int(11) NOT NULL, 144 `Name` varchar(255) NOT NULL, 145 `URL` varchar(255) NOT NULL 146 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 147 148 -- 149 -- RELACE PRO TABULKU `ResourceGroup`: 150 -- 151 152 -- -------------------------------------------------------- 153 154 -- 155 -- Struktura tabulky `School` 156 -- 157 158 CREATE TABLE `School` ( 159 `Id` int(11) NOT NULL, 139 -- Exportování struktury pro tabulka tanec.School 140 CREATE TABLE IF NOT EXISTS `School` ( 141 `Id` int(11) NOT NULL AUTO_INCREMENT, 160 142 `Name` varchar(255) NOT NULL, 161 143 `Address` varchar(255) NOT NULL, 162 `URL` varchar(255) NOT NULL 163 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 144 `URL` varchar(255) NOT NULL, 145 PRIMARY KEY (`Id`) 146 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; 164 147 165 -- 166 -- RELACE PRO TABULKU `School`: 167 -- 148 -- Export dat nebyl vybrán. 168 149 169 -- 170 -- Klíče pro exportované tabulky 171 -- 172 173 -- 174 -- Klíče pro tabulku `Dance` 175 -- 176 ALTER TABLE `Dance` 177 ADD PRIMARY KEY (`Id`), 178 ADD KEY `Group` (`Group`); 179 180 -- 181 -- Klíče pro tabulku `DanceGroup` 182 -- 183 ALTER TABLE `DanceGroup` 184 ADD PRIMARY KEY (`Id`); 185 186 -- 187 -- Klíče pro tabulku `MeetItem` 188 -- 189 ALTER TABLE `MeetItem` 190 ADD PRIMARY KEY (`Id`), 191 ADD KEY `Source` (`Source`); 192 193 -- 194 -- Klíče pro tabulku `MeetSource` 195 -- 196 ALTER TABLE `MeetSource` 197 ADD PRIMARY KEY (`Id`); 198 199 -- 200 -- Klíče pro tabulku `Music` 201 -- 202 ALTER TABLE `Music` 203 ADD PRIMARY KEY (`Id`), 204 ADD KEY `Dance` (`Dance`); 205 206 -- 207 -- Klíče pro tabulku `Resource` 208 -- 209 ALTER TABLE `Resource` 210 ADD PRIMARY KEY (`Id`), 211 ADD KEY `Dance` (`Dance`), 212 ADD KEY `Group` (`Group`); 213 214 -- 215 -- Klíče pro tabulku `ResourceGroup` 216 -- 217 ALTER TABLE `ResourceGroup` 218 ADD PRIMARY KEY (`Id`); 219 220 -- 221 -- Klíče pro tabulku `School` 222 -- 223 ALTER TABLE `School` 224 ADD PRIMARY KEY (`Id`); 225 226 -- 227 -- AUTO_INCREMENT pro tabulky 228 -- 229 230 -- 231 -- AUTO_INCREMENT pro tabulku `Dance` 232 -- 233 ALTER TABLE `Dance` 234 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT; 235 -- 236 -- AUTO_INCREMENT pro tabulku `DanceGroup` 237 -- 238 ALTER TABLE `DanceGroup` 239 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT; 240 -- 241 -- AUTO_INCREMENT pro tabulku `MeetItem` 242 -- 243 ALTER TABLE `MeetItem` 244 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=93; 245 -- 246 -- AUTO_INCREMENT pro tabulku `MeetSource` 247 -- 248 ALTER TABLE `MeetSource` 249 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; 250 -- 251 -- AUTO_INCREMENT pro tabulku `Music` 252 -- 253 ALTER TABLE `Music` 254 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT; 255 -- 256 -- AUTO_INCREMENT pro tabulku `Resource` 257 -- 258 ALTER TABLE `Resource` 259 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT; 260 -- 261 -- AUTO_INCREMENT pro tabulku `ResourceGroup` 262 -- 263 ALTER TABLE `ResourceGroup` 264 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT; 265 -- 266 -- AUTO_INCREMENT pro tabulku `School` 267 -- 268 ALTER TABLE `School` 269 MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT; 270 -- 271 -- Omezení pro exportované tabulky 272 -- 273 274 -- 275 -- Omezení pro tabulku `Dance` 276 -- 277 ALTER TABLE `Dance` 278 ADD CONSTRAINT `Dance_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `DanceGroup` (`Id`); 279 280 -- 281 -- Omezení pro tabulku `MeetItem` 282 -- 283 ALTER TABLE `MeetItem` 284 ADD CONSTRAINT `MeetItem_ibfk_1` FOREIGN KEY (`Source`) REFERENCES `MeetSource` (`Id`); 285 286 -- 287 -- Omezení pro tabulku `Music` 288 -- 289 ALTER TABLE `Music` 290 ADD CONSTRAINT `Music_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`); 291 292 -- 293 -- Omezení pro tabulku `Resource` 294 -- 295 ALTER TABLE `Resource` 296 ADD CONSTRAINT `Resource_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`), 297 ADD CONSTRAINT `Resource_ibfk_2` FOREIGN KEY (`Group`) REFERENCES `ResourceGroup` (`Id`); 150 /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; 151 /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; 152 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
Note:
See TracChangeset
for help on using the changeset viewer.