Changeset 497 for trunk/admin/FullInstall.php
- Timestamp:
- Mar 3, 2013, 1:03:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/FullInstall.php
r494 r497 3 3 function FullInstall($Manager) 4 4 { 5 $Manager->Execute("CREATE TABLE IF NOT EXISTS `ChatHistory` ( 5 $Manager->Execute(" 6 -- 7 -- Funkce 8 -- 9 CREATE DEFINER=`centrala`@`localhost` FUNCTION `CompareNetworkPrefix`(Address1 INT(11) UNSIGNED, Address2 INT(11) UNSIGNED, Size INT(11)) RETURNS tinyint(1) 10 RETURN Address1 & (-1 << (32 - Size)) = Address2 & (-1 << (32 - Size)); 11 12 -- 13 -- Struktura tabulky `ChatHistory` 14 -- 15 16 CREATE TABLE IF NOT EXISTS `ChatHistory` ( 6 17 `Id` int(11) NOT NULL AUTO_INCREMENT, 7 18 `Nick` varchar(64) COLLATE utf8_czech_ci NOT NULL, … … 100 111 `ValidTo` date DEFAULT NULL, 101 112 PRIMARY KEY (`Id`) 102 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;113 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 103 114 104 115 -- -------------------------------------------------------- … … 115 126 PRIMARY KEY (`Id`), 116 127 KEY `Employee` (`Employee`) 117 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;128 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 118 129 119 130 -- -------------------------------------------------------- … … 127 138 `Name` varchar(256) COLLATE utf8_czech_ci NOT NULL, 128 139 `Size` int(11) NOT NULL, 129 PRIMARY KEY (`Id`) 130 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 140 `Directory` int(11) DEFAULT NULL, 141 PRIMARY KEY (`Id`), 142 KEY `Directory` (`Directory`) 143 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6298 ; 144 145 -- 146 -- RELACE PRO TABULKU `File`: 147 -- `Directory` 148 -- `FileDirectory` -> `Id` 149 -- 150 151 -- -------------------------------------------------------- 152 153 -- 154 -- Struktura tabulky `FileDirectory` 155 -- 156 157 CREATE TABLE IF NOT EXISTS `FileDirectory` ( 158 `Id` int(11) NOT NULL AUTO_INCREMENT, 159 `Name` varchar(255) NOT NULL, 160 `Parent` int(11) DEFAULT NULL, 161 PRIMARY KEY (`Id`), 162 KEY `Parent` (`Parent`) 163 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 164 165 -- 166 -- RELACE PRO TABULKU `FileDirectory`: 167 -- `Parent` 168 -- `FileDirectory` -> `Id` 169 -- 131 170 132 171 -- -------------------------------------------------------- … … 184 223 185 224 -- 186 -- Struktura tabulky `FinanceBills` 187 -- 188 189 CREATE TABLE IF NOT EXISTS `FinanceBills` ( 225 -- Struktura tabulky `FinanceBillsItemsOld` 226 -- 227 228 CREATE TABLE IF NOT EXISTS `FinanceBillsItemsOld` ( 229 `Id` int(11) NOT NULL AUTO_INCREMENT, 230 `Bill` int(11) NOT NULL DEFAULT '0', 231 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL, 232 `Price` float NOT NULL DEFAULT '0', 233 `Quantity` float NOT NULL DEFAULT '1', 234 PRIMARY KEY (`Id`), 235 KEY `Bill` (`Bill`) 236 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17839 ; 237 238 -- 239 -- RELACE PRO TABULKU `FinanceBillsItemsOld`: 240 -- `Bill` 241 -- `FinanceBillsOld` -> `Id` 242 -- 243 244 -- -------------------------------------------------------- 245 246 -- 247 -- Struktura tabulky `FinanceBillsOld` 248 -- 249 250 CREATE TABLE IF NOT EXISTS `FinanceBillsOld` ( 190 251 `Id` int(11) NOT NULL AUTO_INCREMENT, 191 252 `TimeFrom` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', … … 204 265 205 266 -- 206 -- RELACE PRO TABULKU `FinanceBills `:267 -- RELACE PRO TABULKU `FinanceBillsOld`: 207 268 -- `Subject` 208 269 -- `Subject` -> `Id` 209 --210 211 -- --------------------------------------------------------212 213 --214 -- Struktura tabulky `FinanceBillsItems`215 --216 217 CREATE TABLE IF NOT EXISTS `FinanceBillsItems` (218 `Id` int(11) NOT NULL AUTO_INCREMENT,219 `Bill` int(11) NOT NULL DEFAULT '0',220 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL,221 `Price` float NOT NULL DEFAULT '0',222 `Quantity` float NOT NULL DEFAULT '1',223 PRIMARY KEY (`Id`),224 KEY `Bill` (`Bill`)225 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17839 ;226 227 --228 -- RELACE PRO TABULKU `FinanceBillsItems`:229 -- `Bill`230 -- `FinanceBills` -> `Id`231 270 -- 232 271 … … 252 291 253 292 -- 254 -- Struktura tabulky `FinanceClaimLiabilityItem` 255 -- 256 257 CREATE TABLE IF NOT EXISTS `FinanceClaimLiabilityItem` ( 258 `Id` int(11) NOT NULL AUTO_INCREMENT, 259 `FinanceClaimLiability` int(11) NOT NULL DEFAULT '0', 293 -- Struktura tabulky `FinanceGroup` 294 -- 295 296 CREATE TABLE IF NOT EXISTS `FinanceGroup` ( 297 `Id` int(11) NOT NULL AUTO_INCREMENT, 298 `Description` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 299 PRIMARY KEY (`Id`) 300 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 301 302 -- -------------------------------------------------------- 303 304 -- 305 -- Struktura tabulky `FinanceInvoice` 306 -- 307 308 CREATE TABLE IF NOT EXISTS `FinanceInvoice` ( 309 `Id` int(11) NOT NULL AUTO_INCREMENT, 310 `BillCode` varchar(16) COLLATE utf8_czech_ci NOT NULL, 311 `Subject` int(11) NOT NULL DEFAULT '0', 312 `TimeCreation` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 313 `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 314 `TimePayment` datetime DEFAULT NULL, 315 `Value` float NOT NULL DEFAULT '0', 316 `File` int(11) DEFAULT NULL, 317 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 318 `PeriodTo` date DEFAULT NULL, 319 `PeriodFrom` date DEFAULT NULL, 320 PRIMARY KEY (`Id`), 321 KEY `Subject` (`Subject`), 322 KEY `Bill` (`File`) 323 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8773 ; 324 325 -- 326 -- RELACE PRO TABULKU `FinanceInvoice`: 327 -- `File` 328 -- `File` -> `Id` 329 -- `Subject` 330 -- `Subject` -> `Id` 331 -- 332 333 -- -------------------------------------------------------- 334 335 -- 336 -- Struktura tabulky `FinanceInvoiceItem` 337 -- 338 339 CREATE TABLE IF NOT EXISTS `FinanceInvoiceItem` ( 340 `Id` int(11) NOT NULL AUTO_INCREMENT, 341 `FinanceInvoice` int(11) NOT NULL DEFAULT '0', 260 342 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL, 261 343 `Price` float NOT NULL DEFAULT '0', … … 263 345 `Quantity` float NOT NULL DEFAULT '1', 264 346 PRIMARY KEY (`Id`), 265 KEY `FinanceClaimLiability` (`FinanceClaimLiability`) 266 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; 267 268 -- 269 -- RELACE PRO TABULKU `FinanceClaimLiabilityItem`: 270 -- `FinanceClaimLiability` 271 -- `FinanceClaimsLiabilities` -> `Id` 272 -- 273 274 -- -------------------------------------------------------- 275 276 -- 277 -- Struktura tabulky `FinanceClaimsLiabilities` 278 -- 279 280 CREATE TABLE IF NOT EXISTS `FinanceClaimsLiabilities` ( 281 `Id` int(11) NOT NULL AUTO_INCREMENT, 282 `BillCode` varchar(16) COLLATE utf8_czech_ci NOT NULL, 283 `Subject` int(11) NOT NULL DEFAULT '0', 284 `TimeCreation` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 285 `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 286 `TimePayment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 287 `Value` float NOT NULL DEFAULT '0', 288 `Bill` int(11) DEFAULT '0', 289 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 290 `PeriodTo` date DEFAULT NULL, 291 `PeriodFrom` date DEFAULT NULL, 292 PRIMARY KEY (`Id`), 293 KEY `Subject` (`Subject`), 294 KEY `Bill` (`Bill`) 295 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8770 ; 296 297 -- 298 -- RELACE PRO TABULKU `FinanceClaimsLiabilities`: 299 -- `Subject` 300 -- `Subject` -> `Id` 301 -- 302 303 -- -------------------------------------------------------- 304 305 -- 306 -- Struktura tabulky `FinanceGroup` 307 -- 308 309 CREATE TABLE IF NOT EXISTS `FinanceGroup` ( 310 `Id` int(11) NOT NULL AUTO_INCREMENT, 311 `Description` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 312 PRIMARY KEY (`Id`) 313 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 347 KEY `FinanceClaimLiability` (`FinanceInvoice`) 348 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8192 ; 349 350 -- 351 -- RELACE PRO TABULKU `FinanceInvoiceItem`: 352 -- `FinanceInvoice` 353 -- `FinanceInvoice` -> `Id` 354 -- 314 355 315 356 -- -------------------------------------------------------- … … 362 403 `BillCode` varchar(32) COLLATE utf8_czech_ci DEFAULT NULL, 363 404 `Taxable` tinyint(1) NOT NULL DEFAULT '1', 364 ` Bill` int(11) DEFAULT NULL,405 `File` int(11) DEFAULT NULL, 365 406 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT 'Vklad', 366 407 `Network` int(11) NOT NULL DEFAULT '1', … … 371 412 UNIQUE KEY `BillCode_2` (`BillCode`), 372 413 KEY `Subject` (`Subject`), 373 KEY `Bill` (` Bill`),414 KEY `Bill` (`File`), 374 415 KEY `BankAccount` (`BankAccount`), 375 416 KEY `Treasury` (`Treasury`) 376 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=654 3;417 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6546 ; 377 418 378 419 -- 379 420 -- RELACE PRO TABULKU `FinanceOperation`: 421 -- `File` 422 -- `File` -> `Id` 380 423 -- `Subject` 381 424 -- `Subject` -> `Id` 382 -- `Bill`383 -- `FinanceBills` -> `Id`384 425 -- `BankAccount` 385 426 -- `FinanceBankAccount` -> `Id` 386 427 -- `Treasury` 387 428 -- `FinanceTreasury` -> `Id` 388 --389 390 -- --------------------------------------------------------391 392 --393 -- Struktura tabulky `FinanceOperationItem`394 --395 396 CREATE TABLE IF NOT EXISTS `FinanceOperationItem` (397 `Id` int(11) NOT NULL AUTO_INCREMENT,398 `FinanceOperation` int(11) NOT NULL DEFAULT '0',399 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL,400 `Price` float NOT NULL DEFAULT '0',401 `VAT` float NOT NULL DEFAULT '0',402 `Quantity` float NOT NULL DEFAULT '1',403 PRIMARY KEY (`Id`),404 KEY `FinanceOperation` (`FinanceOperation`)405 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;406 407 --408 -- RELACE PRO TABULKU `FinanceOperationItem`:409 -- `FinanceOperation`410 -- `FinanceOperation` -> `Id`411 429 -- 412 430 … … 525 543 PRIMARY KEY (`Id`), 526 544 KEY `Parent` (`Parent`) 527 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 38;545 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=40 ; 528 546 529 547 -- … … 561 579 KEY `Time` (`Time`), 562 580 KEY `User` (`User`) 563 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 41115;581 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=38283 ; 564 582 565 583 -- … … 581 599 `Longitude` double NOT NULL, 582 600 PRIMARY KEY (`Id`) 583 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT= 260;601 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=767 ; 584 602 585 603 -- -------------------------------------------------------- … … 636 654 KEY `BillingPeriodNext` (`BillingPeriodNext`), 637 655 KEY `NetworkSegment` (`NetworkSegment`) 638 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=20 0;656 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=201 ; 639 657 640 658 -- … … 667 685 PRIMARY KEY (`Id`), 668 686 KEY `Member` (`Member`) 669 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 2;687 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=183 ; 670 688 671 689 -- … … 787 805 KEY `Type` (`Type`), 788 806 KEY `MapPosition` (`MapPosition`) 789 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=64 4;807 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=645 ; 790 808 791 809 -- … … 917 935 KEY `Device` (`Device`), 918 936 KEY `Type` (`Type`) 919 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=71 1;937 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=712 ; 920 938 921 939 -- … … 956 974 KEY `host_id` (`NetworkInterface`), 957 975 KEY `time` (`Time`) 958 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;976 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 959 977 960 978 -- -------------------------------------------------------- … … 987 1005 KEY `Interface1` (`Interface1`), 988 1006 KEY `Interface2` (`Interface2`) 989 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=35 7;1007 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=356 ; 990 1008 991 1009 -- 992 1010 -- RELACE PRO TABULKU `NetworkLink`: 1011 -- `Interface2` 1012 -- `NetworkInterface` -> `Id` 993 1013 -- `Interface1` 994 1014 -- `NetworkInterface` -> `Id` 995 -- `Interface2`996 -- `NetworkInterface` -> `Id`997 1015 -- 998 1016 … … 1021 1039 PRIMARY KEY (`Id`), 1022 1040 KEY `Comment` (`Comment`) 1023 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 22;1041 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1430 ; 1024 1042 1025 1043 -- -------------------------------------------------------- … … 1119 1137 KEY `Link` (`Link`), 1120 1138 KEY `User` (`User`) 1121 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9733 30;1139 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=973387 ; 1122 1140 1123 1141 -- … … 1254 1272 KEY `AssignedGroup` (`AssignedGroup`), 1255 1273 KEY `AssignedOperation` (`AssignedOperation`) 1256 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=22 6;1274 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=227 ; 1257 1275 1258 1276 -- … … 1304 1322 KEY `UnitOfMeasure` (`UnitOfMeasure`), 1305 1323 KEY `Manufacturer` (`Manufacturer`) 1306 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 0;1324 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=181 ; 1307 1325 1308 1326 -- … … 1345 1363 -- 1346 1364 -- RELACE PRO TABULKU `Service`: 1365 -- `ReplaceId` 1366 -- `Service` -> `Id` 1347 1367 -- `Category` 1348 1368 -- `ServiceCategory` -> `Id` 1349 -- `ReplaceId`1350 -- `Service` -> `Id`1351 1369 -- 1352 1370 … … 1377 1395 KEY `Service` (`Service`), 1378 1396 KEY `Customer` (`Customer`) 1379 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT= 437;1397 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=511 ; 1380 1398 1381 1399 -- 1382 1400 -- RELACE PRO TABULKU `ServiceCustomerRel`: 1401 -- `Service` 1402 -- `Service` -> `Id` 1383 1403 -- `Customer` 1384 1404 -- `Member` -> `Id` … … 1432 1452 KEY `Segment` (`Segment`), 1433 1453 KEY `Location` (`Location`) 1434 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=18 2;1454 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=186 ; 1435 1455 1436 1456 -- … … 1462 1482 `DIC` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 1463 1483 `PayVAT` int(11) NOT NULL, 1464 `MapPositionX` float NOT NULL DEFAULT '0', 1465 `MapPositionY` float NOT NULL DEFAULT '0', 1484 `MapPosition` int(11) DEFAULT NULL, 1466 1485 `WWW` varchar(255) COLLATE utf8_czech_ci NOT NULL, 1467 1486 `Note` varchar(255) COLLATE utf8_czech_ci NOT NULL, 1468 1487 PRIMARY KEY (`Id`), 1469 KEY `AddressCountry` (`AddressCountry`) 1470 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=231 ; 1488 KEY `AddressCountry` (`AddressCountry`), 1489 KEY `MapPosition` (`MapPosition`) 1490 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=233 ; 1471 1491 1472 1492 -- 1473 1493 -- RELACE PRO TABULKU `Subject`: 1494 -- `MapPosition` 1495 -- `MapPosition` -> `Id` 1474 1496 -- `AddressCountry` 1475 1497 -- `Country` -> `Id` … … 1663 1685 UNIQUE KEY `Name` (`Login`), 1664 1686 UNIQUE KEY `Nick` (`Name`) 1665 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=25 2;1687 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=253 ; 1666 1688 1667 1689 -- -------------------------------------------------------- … … 1678 1700 KEY `Customer` (`Customer`), 1679 1701 KEY `User` (`User`) 1680 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=52 0;1702 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=521 ; 1681 1703 1682 1704 -- … … 1696 1718 CREATE TABLE IF NOT EXISTS `UserOnline` ( 1697 1719 `Id` int(11) NOT NULL AUTO_INCREMENT, 1698 `User` int(11) NOT NULL DEFAULT '0'COMMENT 'User.Id',1720 `User` int(11) DEFAULT NULL COMMENT 'User.Id', 1699 1721 `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 1700 1722 `LoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', … … 1705 1727 PRIMARY KEY (`Id`), 1706 1728 KEY `User` (`User`) 1707 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;1729 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2430 ; 1708 1730 1709 1731 -- -------------------------------------------------------- … … 1747 1769 1748 1770 -- 1771 -- Omezení pro tabulku `File` 1772 -- 1773 ALTER TABLE `File` 1774 ADD CONSTRAINT `File_ibfk_1` FOREIGN KEY (`Directory`) REFERENCES `FileDirectory` (`Id`); 1775 1776 -- 1777 -- Omezení pro tabulku `FileDirectory` 1778 -- 1779 ALTER TABLE `FileDirectory` 1780 ADD CONSTRAINT `FileDirectory_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `FileDirectory` (`Id`); 1781 1782 -- 1749 1783 -- Omezení pro tabulku `FinanceBankAccount` 1750 1784 -- … … 1753 1787 1754 1788 -- 1755 -- Omezení pro tabulku `FinanceBills` 1756 -- 1757 ALTER TABLE `FinanceBills` 1758 ADD CONSTRAINT `FinanceBills_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1759 1760 -- 1761 -- Omezení pro tabulku `FinanceBillsItems` 1762 -- 1763 ALTER TABLE `FinanceBillsItems` 1764 ADD CONSTRAINT `FinanceBillsItems_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`); 1765 1766 -- 1767 -- Omezení pro tabulku `FinanceClaimLiabilityItem` 1768 -- 1769 ALTER TABLE `FinanceClaimLiabilityItem` 1770 ADD CONSTRAINT `FinanceClaimLiabilityItem_ibfk_1` FOREIGN KEY (`FinanceClaimLiability`) REFERENCES `FinanceClaimsLiabilities` (`Id`); 1771 1772 -- 1773 -- Omezení pro tabulku `FinanceClaimsLiabilities` 1774 -- 1775 ALTER TABLE `FinanceClaimsLiabilities` 1776 ADD CONSTRAINT `FinanceClaimsLiabilities_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1789 -- Omezení pro tabulku `FinanceBillsItemsOld` 1790 -- 1791 ALTER TABLE `FinanceBillsItemsOld` 1792 ADD CONSTRAINT `FinanceBillsItemsOld_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBillsOld` (`Id`); 1793 1794 -- 1795 -- Omezení pro tabulku `FinanceBillsOld` 1796 -- 1797 ALTER TABLE `FinanceBillsOld` 1798 ADD CONSTRAINT `FinanceBillsOld_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1799 1800 -- 1801 -- Omezení pro tabulku `FinanceInvoice` 1802 -- 1803 ALTER TABLE `FinanceInvoice` 1804 ADD CONSTRAINT `FinanceInvoice_ibfk_2` FOREIGN KEY (`File`) REFERENCES `File` (`Id`), 1805 ADD CONSTRAINT `FinanceInvoice_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); 1806 1807 -- 1808 -- Omezení pro tabulku `FinanceInvoiceItem` 1809 -- 1810 ALTER TABLE `FinanceInvoiceItem` 1811 ADD CONSTRAINT `FinanceInvoiceItem_ibfk_1` FOREIGN KEY (`FinanceInvoice`) REFERENCES `FinanceInvoice` (`Id`); 1777 1812 1778 1813 -- … … 1780 1815 -- 1781 1816 ALTER TABLE `FinanceOperation` 1817 ADD CONSTRAINT `FinanceOperation_ibfk_5` FOREIGN KEY (`File`) REFERENCES `File` (`Id`), 1782 1818 ADD CONSTRAINT `FinanceOperation_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`), 1783 ADD CONSTRAINT `FinanceOperation_ibfk_2` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`),1784 1819 ADD CONSTRAINT `FinanceOperation_ibfk_3` FOREIGN KEY (`BankAccount`) REFERENCES `FinanceBankAccount` (`Id`), 1785 1820 ADD CONSTRAINT `FinanceOperation_ibfk_4` FOREIGN KEY (`Treasury`) REFERENCES `FinanceTreasury` (`Id`); 1786 1787 --1788 -- Omezení pro tabulku `FinanceOperationItem`1789 --1790 ALTER TABLE `FinanceOperationItem`1791 ADD CONSTRAINT `FinanceOperationItem_ibfk_1` FOREIGN KEY (`FinanceOperation`) REFERENCES `FinanceOperation` (`Id`);1792 1821 1793 1822 -- … … 1868 1897 -- 1869 1898 ALTER TABLE `NetworkLink` 1870 ADD CONSTRAINT `NetworkLink_ibfk_1` FOREIGN KEY (`Interface1`) REFERENCES `NetworkDevice` (`Id`), 1871 ADD CONSTRAINT `NetworkLink_ibfk_2` FOREIGN KEY (`Interface1`) REFERENCES `NetworkInterface` (`Id`), 1872 ADD CONSTRAINT `NetworkLink_ibfk_3` FOREIGN KEY (`Interface2`) REFERENCES `NetworkInterface` (`Id`); 1899 ADD CONSTRAINT `NetworkLink_ibfk_2` FOREIGN KEY (`Interface2`) REFERENCES `NetworkInterface` (`Id`), 1900 ADD CONSTRAINT `NetworkLink_ibfk_1` FOREIGN KEY (`Interface1`) REFERENCES `NetworkInterface` (`Id`); 1873 1901 1874 1902 -- … … 1925 1953 -- 1926 1954 ALTER TABLE `Service` 1927 ADD CONSTRAINT `Service_ibfk_ 1` FOREIGN KEY (`Category`) REFERENCES `ServiceCategory` (`Id`),1928 ADD CONSTRAINT `Service_ibfk_ 2` FOREIGN KEY (`ReplaceId`) REFERENCES `Service` (`Id`);1955 ADD CONSTRAINT `Service_ibfk_2` FOREIGN KEY (`ReplaceId`) REFERENCES `Service` (`Id`), 1956 ADD CONSTRAINT `Service_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `ServiceCategory` (`Id`); 1929 1957 1930 1958 -- … … 1932 1960 -- 1933 1961 ALTER TABLE `ServiceCustomerRel` 1962 ADD CONSTRAINT `ServiceCustomerRel_ibfk_3` FOREIGN KEY (`Service`) REFERENCES `Service` (`Id`), 1934 1963 ADD CONSTRAINT `ServiceCustomerRel_ibfk_2` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`); 1935 1964 … … 1953 1982 -- 1954 1983 ALTER TABLE `Subject` 1984 ADD CONSTRAINT `Subject_ibfk_2` FOREIGN KEY (`MapPosition`) REFERENCES `MapPosition` (`Id`), 1955 1985 ADD CONSTRAINT `Subject_ibfk_1` FOREIGN KEY (`AddressCountry`) REFERENCES `Country` (`Id`); 1956 1986 … … 1999 2029 ALTER TABLE `Work` 2000 2030 ADD CONSTRAINT `Work_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`), 2001 ADD CONSTRAINT `Work_ibfk_2` FOREIGN KEY (`Task`) REFERENCES `Task` (`Id`);"); 2031 ADD CONSTRAINT `Work_ibfk_2` FOREIGN KEY (`Task`) REFERENCES `Task` (`Id`); 2032 "); 2002 2033 $Manager->Execute("INSERT INTO `SystemVersion` (`Id`, `Revision`) VALUES 2003 (1, 49 1);");2034 (1, 495);"); 2004 2035 2005 2036 } … … 2018 2049 $Manager->Execute("INSERT INTO `User` (`Id`, `Login`, `Name`, `Password`, `Salt`, `Email`, `LastIpAddress`, `LastLoginTime`, `RegistrationTime`, `Locked`, `ICQ`, `PhoneNumber`, `InitPassword`) VALUES 2019 2050 (1, 'admin', 'Správce', '05d97409afcce47d028c0d2a04cf359998cbaaf1', 'b295d117135a9763da282e7dae73a5ca7d3e5b11', 'admin@localhost', '', '0000-00-00 00:00:00', '2013-03-01 19:40:22', 0, 0, '+420123456789', '');"); 2020 $Manager->Execute("INSERT INTO `Subject` (`Id`, `Name`, `AddressStreet`, `AddressTown`, `AddressPSC`, `AddressCountry`, `IC`, `DIC`, `PayVAT`, `MapPositionX`, `MapPositionY`, `WWW`, `Note`) VALUES 2021 (1, 'Franta Vopršálek', 'Na hradě 1001', 'Bouzov', 12345, 1, '12345667', 'CZ1234567890', 0, 1, 2, '', '');"); 2051 $Manager->Execute("INSERT INTO `MapPosition` (`Id`, `Name`, `Latitude`, `Longitude`) VALUES 2052 (1, 'Franta Vopršálek', 47.555, 11.082)"); 2053 $Manager->Execute("INSERT INTO `Subject` (`Id`, `Name`, `AddressStreet`, `AddressTown`, `AddressPSC`, `AddressCountry`, `IC`, `DIC`, `PayVAT`, `MapPosition`, `WWW`, `Note`) VALUES 2054 (1, 'Franta Vopršálek', 'Na hradě 1001', 'Bouzov', 12345, 1, '12345667', 'CZ1234567890', 0, 1, '', '');"); 2022 2055 $Manager->Execute("INSERT INTO `UnitOfMeasure` (`Id`, `Unit`, `Name`) VALUES 2023 2056 (1, 'ks', 'kus'), … … 2186 2219 (15, 'Kino Vatra', 0, 15, 1, 'http://www.dkvsetin.cz/rss/kino/8'), 2187 2220 (16, 'Obec Hovězí', 0, 16, 1, 'http://www.obec-hovezi.cz/web/rss.xml');"); 2188 $Manager->Execute("INSERT INTO `MapPosition` (`Id`, `Name`, `Latitude`, `Longitude`) VALUES2189 (1, 'Franta Vopršálek', 47.555, 11.082)");2190 2221 $Manager->Execute("INSERT INTO `FinanceBillingPeriod` (`Id`, `Name`, `MonthCount`) VALUES 2191 2222 (1, 'Nikdy', 0), … … 2362 2393 $Manager->Execute("INSERT INTO `ServiceCustomerRel` (`Id`, `Service`, `Customer`, `Period`) VALUES 2363 2394 (1, 1, 1, 0), (2, 1, 1, 1);"); 2364 $Manager->Execute("INSERT INTO `File` (`Id` ,`Name` ,`Size` ,`Directory`) VALUES (NULL , 'invoice_1.pdf', '123', NULL);"); 2395 $Manager->Execute("INSERT INTO `File` (`Id` ,`Name` ,`Size` ,`Directory`) ". 2396 "VALUES (1 , 'invoice_1.pdf', '123', NULL);"); 2365 2397 $Manager->Execute("INSERT INTO `FinanceInvoice` (`Id` ,`BillCode` ,`Subject` ,`TimeCreation` ,`TimeDue` ,`TimePayment` ,`Value` ,`File` ,`Text` ,`PeriodTo` ,`PeriodFrom`) ". 2366 2398 "VALUES (1 , 'VF123/2013', '1', NOW( ) , '0000-00-00 00:00:00', NULL , '300', '1', 'Měsíční paušál', '2013-01-01', '2013-01-31');"); 2367 2399 $Manager->Execute("INSERT INTO `FinanceInvoiceItem` (`Id` ,`FinanceInvoice` ,`Description` ,`Price` ,`VAT` ,`Quantity`) ". 2368 2400 "VALUES (1 , '1', 'Internet 16M', '300', '21', '1');"); 2369 2401 $Manager->Execute("INSERT INTO `FinanceYear` (`Id`, `Year`, `DateStart`, `DateEnd`) VALUES 2370 2402 (1, 2007, '2007-12-01', '2007-12-31'), … … 2378 2410 (1, 10000, 100000, 10000, 50, 6, 1024, 50, 138), 2379 2411 (0, 10000, 100000, 10000, 50, 6, 1024, 50, 138);"); 2412 $Manager->Execute("INSERT INTO `DocumentLine` (`Id`, `Name`, `Shortcut`) VALUES 2413 (1, 'Příjmy do pokladny', 'PP'), 2414 (2, 'Výdeje z pokladny', 'VP'), 2415 (3, 'Příjem na účet', 'BV'), 2416 (4, 'Výdej z účtu', 'PR'), 2417 (5, 'Přijaté faktury', 'PF'), 2418 (6, 'Vydané faktury', 'VF'), 2419 (7, 'Výdej ze skladu', 'VS'), 2420 (8, 'Příjem na sklad', 'PS');"); 2380 2421 } 2381 2422
Note:
See TracChangeset
for help on using the changeset viewer.