Changeset 441
- Timestamp:
- Oct 13, 2012, 6:54:59 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 deleted
- 3 edited
- 9 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/form_classes.php
r440 r441 29 29 ), 30 30 ), 31 'Log' => array( 32 'Title' => 'Záznamy', 33 'Table' => 'Log', 34 'DefaultSortColumn' => 'Time', 35 'Items' => array( 36 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''), 37 'User' => array('Type' => 'TUser', 'Caption' => 'Uživatel', 'Default' => ''), 38 'Module' => array('Type' => 'String', 'Caption' => 'Modul', 'Default' => ''), 39 'Operation' => array('Type' => 'String', 'Caption' => 'Operace', 'Default' => ''), 40 'Value' => array('Type' => 'Text', 'Caption' => 'Hodnota', 'Default' => ''), 41 ), 42 ), 31 43 'FinanceBillingPeriod' => array( 32 44 'Title' => 'Platební období', … … 60 72 'Items' => array( 61 73 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 62 'ResponsibleUser' => array('Type' => ' String', 'Caption' => 'Zodpovědný uživatel', 'Default' => ''),74 'ResponsibleUser' => array('Type' => 'TUser', 'Caption' => 'Zodpovědný uživatel', 'Default' => ''), 63 75 'Subject' => array('Type' => 'TSubject', 'Caption' => 'Subjekt', 'Default' => ''), 64 76 'FamilyMemberCount' => array('Type' => 'String', 'Caption' => 'Osob v domácnosti', 'Default' => ''), … … 453 465 'Filter' => '1', 454 466 ), 467 'TUser' => array( 468 'Type' => 'Reference', 469 'Table' => 'User', 470 'Id' => 'Id', 471 'Name' => 'Name', 472 'Filter' => '1', 473 ), 455 474 'TFinanceSubject' => array( 456 475 'Type' => 'Reference', -
trunk/network/administration.php
r438 r441 44 44 '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/restart.php">Ruční restart konfigurace sítě</a><br />'. 45 45 //'<a href="'.$this->System->Config['Web']['RootFolder'].'/backup/index.php">Nastavení zálohování</a><br />'. 46 '<a href="'.$this->System->Config['Web']['RootFolder'].'/LogShow.php">Záznamy operací</a><br />'.47 46 '<a href="?Action=SendEmail">Zaslat email</a><br />'. 48 47 '<a href="?Action=ProcessEmailQueue">Zpracovat frontu emailů</a><br />'; -
trunk/sql/full.sql
r339 r441 1 1 -- phpMyAdmin SQL Dump 2 -- version 3.4. 42 -- version 3.4.7.1 3 3 -- http://www.phpmyadmin.net 4 4 -- 5 5 -- Počítač: localhost 6 -- Vygenerováno: Úte 10. led 2012, 10:147 -- Verze MySQL: 5.1. 586 -- Vygenerováno: Sob 13. říj 2012, 18:52 7 -- Verze MySQL: 5.1.60 8 8 -- Verze PHP: 5.3.8 9 9 … … 11 11 SET time_zone = "+00:00"; 12 12 13 14 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;15 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;16 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;17 /*!40101 SET NAMES utf8 */;18 19 13 -- 20 14 -- Databáze: `is` 21 15 -- 22 23 DELIMITER $$24 --25 -- Funkce26 --27 CREATE DEFINER=`centrala`@`localhost` FUNCTION `CompareNetworkPrefix`(Address1 INT(11) UNSIGNED, Address2 INT(11) UNSIGNED, Size INT(11)) RETURNS tinyint(1)28 RETURN Address1 & (-1 << (32 - Size)) = Address2 & (-1 << (32 - Size))$$29 30 DELIMITER ;31 32 -- --------------------------------------------------------33 34 --35 -- Struktura tabulky `ChatHistory`36 --37 38 CREATE TABLE IF NOT EXISTS `ChatHistory` (39 `Id` int(11) NOT NULL AUTO_INCREMENT,40 `Nick` varchar(64) COLLATE utf8_czech_ci NOT NULL,41 `Text` text COLLATE utf8_czech_ci NOT NULL,42 `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',43 `Color` int(11) NOT NULL DEFAULT '0',44 `RoomName` varchar(32) COLLATE utf8_czech_ci NOT NULL,45 `RoomType` int(11) NOT NULL DEFAULT '0',46 `Host` varchar(255) COLLATE utf8_czech_ci NOT NULL,47 PRIMARY KEY (`Id`)48 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=528576 ;49 50 -- --------------------------------------------------------51 52 --53 -- Struktura tabulky `DocumentLine`54 --55 56 CREATE TABLE IF NOT EXISTS `DocumentLine` (57 `Id` int(11) NOT NULL AUTO_INCREMENT,58 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,59 `Shortcut` varchar(16) COLLATE utf8_czech_ci NOT NULL,60 PRIMARY KEY (`Id`),61 UNIQUE KEY `Shortcut` (`Shortcut`)62 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7 ;63 64 -- --------------------------------------------------------65 66 --67 -- Struktura tabulky `DocumentLineSequence`68 --69 70 CREATE TABLE IF NOT EXISTS `DocumentLineSequence` (71 `Id` int(11) NOT NULL AUTO_INCREMENT,72 `DocumentLine` int(11) NOT NULL,73 `FinanceYear` int(11) NOT NULL,74 `NextNumber` int(11) NOT NULL,75 `YearPrefix` int(11) NOT NULL,76 PRIMARY KEY (`Id`),77 KEY `DocumentLine` (`DocumentLine`),78 KEY `FinanceYear` (`FinanceYear`)79 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=25 ;80 81 -- --------------------------------------------------------82 83 --84 -- Struktura tabulky `EmailQueue`85 --86 87 CREATE TABLE IF NOT EXISTS `EmailQueue` (88 `Id` int(11) NOT NULL AUTO_INCREMENT,89 `Time` datetime NOT NULL,90 `Address` varchar(255) COLLATE utf8_czech_ci NOT NULL,91 `Subject` varchar(255) COLLATE utf8_czech_ci NOT NULL,92 `Content` text COLLATE utf8_czech_ci NOT NULL,93 `Headers` varchar(255) COLLATE utf8_czech_ci NOT NULL,94 `Archive` int(11) NOT NULL DEFAULT '0',95 PRIMARY KEY (`Id`),96 KEY `Archive` (`Archive`)97 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2107 ;98 99 -- --------------------------------------------------------100 101 --102 -- Struktura tabulky `File`103 --104 105 CREATE TABLE IF NOT EXISTS `File` (106 `Id` int(11) NOT NULL AUTO_INCREMENT,107 `Name` varchar(256) COLLATE utf8_czech_ci NOT NULL,108 `Size` int(11) NOT NULL,109 PRIMARY KEY (`Id`)110 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;111 112 -- --------------------------------------------------------113 114 --115 -- Struktura tabulky `FinanceAssetsHistory`116 --117 118 CREATE TABLE IF NOT EXISTS `FinanceAssetsHistory` (119 `AssetsId` int(11) NOT NULL DEFAULT '0',120 `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',121 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',122 `User` int(11) NOT NULL DEFAULT '0',123 KEY `AssetsId` (`AssetsId`)124 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;125 126 -- --------------------------------------------------------127 128 --129 -- Struktura tabulky `FinanceBankAccount`130 --131 132 CREATE TABLE IF NOT EXISTS `FinanceBankAccount` (133 `Id` int(11) NOT NULL AUTO_INCREMENT,134 `TimeCreate` date NOT NULL,135 `Number` varchar(255) COLLATE utf8_czech_ci NOT NULL,136 `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,137 PRIMARY KEY (`Id`)138 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;139 140 -- --------------------------------------------------------141 142 --143 -- Struktura tabulky `FinanceBillingPeriod`144 --145 146 CREATE TABLE IF NOT EXISTS `FinanceBillingPeriod` (147 `Id` int(11) NOT NULL AUTO_INCREMENT,148 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,149 `MonthCount` int(11) NOT NULL,150 PRIMARY KEY (`Id`)151 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;152 153 -- --------------------------------------------------------154 155 --156 -- Struktura tabulky `FinanceBills`157 --158 159 CREATE TABLE IF NOT EXISTS `FinanceBills` (160 `Id` int(11) NOT NULL AUTO_INCREMENT,161 `TimeFrom` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',162 `Subject` int(11) NOT NULL DEFAULT '0',163 `TimeTo` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',164 `TimeCreate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',165 `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',166 `BillCode` varchar(32) COLLATE utf8_czech_ci NOT NULL,167 `Type` enum('invoice','income') COLLATE utf8_czech_ci NOT NULL,168 `Cash` int(11) NOT NULL DEFAULT '0',169 PRIMARY KEY (`Id`),170 KEY `Subject` (`Subject`),171 KEY `Subject_2` (`Subject`)172 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4957 ;173 174 -- --------------------------------------------------------175 176 --177 -- Struktura tabulky `FinanceBillsItems`178 --179 180 CREATE TABLE IF NOT EXISTS `FinanceBillsItems` (181 `Id` int(11) NOT NULL AUTO_INCREMENT,182 `Bill` int(11) NOT NULL DEFAULT '0',183 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL,184 `Price` float NOT NULL DEFAULT '0',185 `Quantity` float NOT NULL DEFAULT '1',186 PRIMARY KEY (`Id`),187 KEY `Bill` (`Bill`)188 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=16498 ;189 190 -- --------------------------------------------------------191 192 --193 -- Struktura tabulky `FinanceClaimsLiabilities`194 --195 196 CREATE TABLE IF NOT EXISTS `FinanceClaimsLiabilities` (197 `Id` int(11) NOT NULL AUTO_INCREMENT,198 `BillCode` varchar(16) COLLATE utf8_czech_ci NOT NULL,199 `Subject` int(11) NOT NULL DEFAULT '0',200 `TimeCreation` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',201 `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',202 `TimePayment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',203 `Value` float NOT NULL DEFAULT '0',204 `Bill` int(11) DEFAULT '0',205 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',206 PRIMARY KEY (`Id`),207 KEY `Subject` (`Subject`),208 KEY `Bill` (`Bill`)209 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7430 ;210 211 -- --------------------------------------------------------212 213 --214 -- Struktura tabulky `FinanceLog`215 --216 217 CREATE TABLE IF NOT EXISTS `FinanceLog` (218 `Id` int(11) NOT NULL AUTO_INCREMENT,219 `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',220 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',221 PRIMARY KEY (`Id`)222 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;223 224 -- --------------------------------------------------------225 226 --227 -- Struktura tabulky `FinanceOperation`228 --229 230 CREATE TABLE IF NOT EXISTS `FinanceOperation` (231 `Id` int(11) NOT NULL AUTO_INCREMENT,232 `Time` datetime NOT NULL,233 `Subject` int(11) NOT NULL DEFAULT '0',234 `Cash` int(11) NOT NULL DEFAULT '0',235 `Value` float NOT NULL,236 `BillCode` varchar(32) COLLATE utf8_czech_ci NOT NULL,237 `Taxable` tinyint(1) NOT NULL DEFAULT '1',238 `Bill` int(11) DEFAULT NULL,239 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT 'Vklad',240 `Network` int(11) NOT NULL DEFAULT '1',241 PRIMARY KEY (`Id`),242 KEY `Subject` (`Subject`),243 KEY `Bill` (`Bill`)244 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=5779 ;245 246 -- --------------------------------------------------------247 248 --249 -- Struktura tabulky `FinanceSmallAssets`250 --251 252 CREATE TABLE IF NOT EXISTS `FinanceSmallAssets` (253 `Id` int(11) NOT NULL AUTO_INCREMENT,254 `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',255 `PricePurchase` float NOT NULL DEFAULT '0',256 `TimeEnlistment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',257 `TimeElimination` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',258 `SupplySubject` int(11) NOT NULL DEFAULT '0',259 `DeviceId` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',260 PRIMARY KEY (`Id`)261 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;262 263 -- --------------------------------------------------------264 265 --266 -- Struktura tabulky `FinanceTariff`267 --268 269 CREATE TABLE IF NOT EXISTS `FinanceTariff` (270 `Id` int(11) NOT NULL AUTO_INCREMENT,271 `Name` varchar(32) COLLATE utf8_czech_ci NOT NULL,272 `Group` int(11) NOT NULL DEFAULT '0',273 `SpeedMin` int(11) NOT NULL DEFAULT '0',274 `SpeedMax` int(11) NOT NULL DEFAULT '0',275 `UploadAsymmetry` int(11) NOT NULL DEFAULT '1',276 `Price` int(11) NOT NULL DEFAULT '0',277 `MemberCount` int(11) NOT NULL DEFAULT '0',278 `ReplaceId` int(11) DEFAULT NULL,279 `Public` int(11) NOT NULL DEFAULT '1',280 PRIMARY KEY (`Id`),281 KEY `ReplaceId` (`ReplaceId`),282 KEY `Public` (`Public`)283 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ;284 285 -- --------------------------------------------------------286 287 --288 -- Struktura tabulky `FinanceYear`289 --290 291 CREATE TABLE IF NOT EXISTS `FinanceYear` (292 `Id` int(11) NOT NULL AUTO_INCREMENT,293 `Year` int(11) NOT NULL,294 `DateStart` date NOT NULL,295 `DateEnd` date NOT NULL,296 PRIMARY KEY (`Id`)297 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ;298 299 -- --------------------------------------------------------300 301 --302 -- Struktura tabulky `finance_charge`303 --304 305 CREATE TABLE IF NOT EXISTS `finance_charge` (306 `period` int(11) NOT NULL DEFAULT '0',307 `internet` int(11) NOT NULL DEFAULT '0',308 `internet_speed` int(11) NOT NULL DEFAULT '0',309 `internet_speed_reserve` int(11) NOT NULL DEFAULT '0',310 `administration_per_user` int(20) NOT NULL DEFAULT '0',311 `kWh` int(11) NOT NULL DEFAULT '0',312 `base_speed_element` int(11) NOT NULL DEFAULT '0',313 `BaseTariffPrice` int(11) NOT NULL DEFAULT '0',314 `TopTariffPrice` int(11) NOT NULL DEFAULT '0'315 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;316 317 -- --------------------------------------------------------318 319 --320 -- Struktura tabulky `finance_groups`321 --322 323 CREATE TABLE IF NOT EXISTS `finance_groups` (324 `Id` int(11) NOT NULL AUTO_INCREMENT,325 `Description` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',326 PRIMARY KEY (`Id`)327 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;328 329 -- --------------------------------------------------------330 331 --332 -- Struktura tabulky `finance_monthly_overall`333 --334 335 CREATE TABLE IF NOT EXISTS `finance_monthly_overall` (336 `id` int(11) NOT NULL AUTO_INCREMENT,337 `money` int(11) NOT NULL DEFAULT '0',338 `date` date NOT NULL DEFAULT '0000-00-00',339 `administration` int(11) NOT NULL DEFAULT '0',340 `kWh` int(11) NOT NULL DEFAULT '0',341 `administration_total` int(11) NOT NULL DEFAULT '0',342 `consumption_total` int(11) NOT NULL DEFAULT '0',343 `total_paid` int(11) NOT NULL DEFAULT '0',344 `BaseTariffPrice` int(11) NOT NULL DEFAULT '0',345 `TopTariffPrice` int(11) NOT NULL DEFAULT '0',346 `member_count` int(11) NOT NULL DEFAULT '0',347 `investment` int(11) NOT NULL,348 PRIMARY KEY (`id`)349 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=109 ;350 351 -- --------------------------------------------------------352 353 --354 -- Struktura tabulky `HostedProject`355 --356 357 CREATE TABLE IF NOT EXISTS `HostedProject` (358 `Id` int(11) NOT NULL AUTO_INCREMENT,359 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,360 `Homepage` varchar(255) COLLATE utf8_czech_ci NOT NULL,361 `User` int(255) NOT NULL COMMENT 'User.Id',362 `TimeCreate` datetime NOT NULL,363 `Server` int(11) DEFAULT NULL COMMENT 'NetworkDevice.Id',364 `Active` int(11) NOT NULL DEFAULT '1',365 `WebHosting` int(11) NOT NULL,366 PRIMARY KEY (`Id`)367 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=16 ;368 369 -- --------------------------------------------------------370 371 --372 -- Struktura tabulky `hosts_topology`373 --374 375 CREATE TABLE IF NOT EXISTS `hosts_topology` (376 `host` int(11) NOT NULL DEFAULT '0',377 `depth` int(11) NOT NULL DEFAULT '0',378 `pos` int(11) NOT NULL DEFAULT '0',379 `first` int(11) NOT NULL DEFAULT '0',380 `last` int(11) NOT NULL DEFAULT '0',381 PRIMARY KEY (`host`)382 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;383 384 -- --------------------------------------------------------385 386 --387 -- Struktura tabulky `Hyperlink`388 --389 390 CREATE TABLE IF NOT EXISTS `Hyperlink` (391 `Id` int(11) NOT NULL AUTO_INCREMENT,392 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,393 `URL` varchar(255) COLLATE utf8_czech_ci NOT NULL,394 `Group` int(11) NOT NULL,395 `IconFile` varchar(255) COLLATE utf8_czech_ci NOT NULL,396 `PermissionModule` varchar(255) COLLATE utf8_czech_ci NOT NULL,397 `PermissionOperation` varchar(255) COLLATE utf8_czech_ci NOT NULL,398 `Enable` int(11) NOT NULL DEFAULT '1',399 PRIMARY KEY (`Id`),400 KEY `Group` (`Group`),401 KEY `Enable` (`Enable`)402 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=66 ;403 404 -- --------------------------------------------------------405 406 --407 -- Struktura tabulky `HyperlinkGroup`408 --409 410 CREATE TABLE IF NOT EXISTS `HyperlinkGroup` (411 `Id` int(11) NOT NULL AUTO_INCREMENT,412 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,413 PRIMARY KEY (`Id`)414 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=10 ;415 16 416 17 -- -------------------------------------------------------- … … 425 26 `Module` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 426 27 `Operation` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', 427 `Value` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',28 `Value` text COLLATE utf8_czech_ci NOT NULL, 428 29 KEY `Time` (`Time`), 429 30 KEY `User` (`User`) 430 31 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; 431 32 432 -- --------------------------------------------------------433 434 33 -- 435 -- Struktura tabulky `Meals` 34 -- RELACE PRO TABULKU `Log`: 35 -- `User` 36 -- `User` -> `Id` 436 37 -- 437 438 CREATE TABLE IF NOT EXISTS `Meals` (439 `Date` date NOT NULL DEFAULT '0000-00-00',440 `Soup` varchar(255) COLLATE utf8_czech_ci NOT NULL,441 `Meal` varchar(255) COLLATE utf8_czech_ci NOT NULL,442 `Status` int(11) NOT NULL DEFAULT '0',443 UNIQUE KEY `date` (`Date`)444 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;445 446 -- --------------------------------------------------------447 448 --449 -- Struktura tabulky `MealsInfo`450 --451 452 CREATE TABLE IF NOT EXISTS `MealsInfo` (453 `Info` text COLLATE utf8_czech_ci NOT NULL,454 `Price` int(11) NOT NULL DEFAULT '0'455 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;456 457 -- --------------------------------------------------------458 459 --460 -- Struktura tabulky `Member`461 --462 463 CREATE TABLE IF NOT EXISTS `Member` (464 `Id` int(11) NOT NULL AUTO_INCREMENT,465 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,466 `Subject` int(11) NOT NULL,467 `ResponsibleUser` int(11) NOT NULL,468 `FamilyMemberCount` int(11) NOT NULL,469 `MembershipDate` date NOT NULL,470 `MemberState` int(11) NOT NULL,471 `InternetTariffCurrentMonth` int(11) NOT NULL,472 `InternetTariffNextMonth` int(11) NOT NULL,473 `GPS` int(11) NOT NULL,474 `BillingPeriod` int(11) NOT NULL DEFAULT '2',475 `NetworkSegment` int(11) NOT NULL,476 `BillingPeriodNext` int(11) NOT NULL DEFAULT '2',477 `BillingPeriodLastDate` date NOT NULL,478 `Hire` float NOT NULL DEFAULT '0',479 `Blocked` int(11) NOT NULL DEFAULT '0',480 PRIMARY KEY (`Id`),481 KEY `Subject` (`Subject`),482 KEY `ResponsibleUser` (`ResponsibleUser`),483 KEY `InternetTariffCurrentMonth` (`InternetTariffCurrentMonth`),484 KEY `InternetTariffNextMonth` (`InternetTariffNextMonth`),485 KEY `BillingPeriod` (`BillingPeriod`),486 KEY `BillingPeriodNext` (`BillingPeriodNext`)487 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=177 ;488 489 -- --------------------------------------------------------490 491 --492 -- Struktura tabulky `MemberPayment`493 --494 495 CREATE TABLE IF NOT EXISTS `MemberPayment` (496 `Id` int(11) NOT NULL AUTO_INCREMENT,497 `Member` int(11) NOT NULL,498 `MonthlyTotal` float NOT NULL,499 `MonthlyInternet` float NOT NULL,500 `MonthlyConsumption` float NOT NULL,501 `NetworkDevice` float NOT NULL,502 `MonthlyPlus` float NOT NULL,503 `Cash` float NOT NULL,504 PRIMARY KEY (`Id`),505 KEY `Member` (`Member`)506 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=161 ;507 508 -- --------------------------------------------------------509 510 --511 -- Struktura tabulky `NetworkAP`512 --513 514 CREATE TABLE IF NOT EXISTS `NetworkAP` (515 `Id` int(11) NOT NULL AUTO_INCREMENT,516 `SSID` varchar(255) COLLATE utf8_czech_ci NOT NULL,517 `Frequency` int(11) NOT NULL,518 `ChannelWidth` int(11) NOT NULL DEFAULT '20',519 `NetworkDevice` int(11) DEFAULT NULL,520 PRIMARY KEY (`Id`),521 KEY `NetworkDevice` (`NetworkDevice`)522 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=44 ;523 524 -- --------------------------------------------------------525 526 --527 -- Struktura tabulky `NetworkConfiguration`528 --529 530 CREATE TABLE IF NOT EXISTS `NetworkConfiguration` (531 `Id` int(11) NOT NULL AUTO_INCREMENT,532 `Caption` varchar(255) COLLATE utf8_czech_ci NOT NULL,533 `Execute` varchar(255) COLLATE utf8_czech_ci NOT NULL,534 `Changed` int(11) NOT NULL DEFAULT '0',535 `LastTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',536 `ExecutionTime` int(11) NOT NULL,537 `Enabled` int(11) NOT NULL DEFAULT '1',538 `Period` int(11) NOT NULL DEFAULT '60',539 `Log` mediumtext COLLATE utf8_czech_ci NOT NULL,540 PRIMARY KEY (`Id`)541 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ;542 543 -- --------------------------------------------------------544 545 --546 -- Struktura tabulky `NetworkDevice`547 --548 549 CREATE TABLE IF NOT EXISTS `NetworkDevice` (550 `Id` int(11) NOT NULL AUTO_INCREMENT,551 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,552 `Member` int(11) NOT NULL COMMENT 'Member',553 `Location` int(11) NOT NULL COMMENT 'Member',554 `Type` int(11) NOT NULL COMMENT 'NetworkDeviceType',555 `PositionLatitude` double NOT NULL DEFAULT '0',556 `PositionLongitude` double NOT NULL DEFAULT '0',557 `Used` int(11) NOT NULL DEFAULT '1',558 `Online` int(11) NOT NULL DEFAULT '0',559 `LastOnline` datetime NOT NULL,560 `PermanentOnline` int(11) NOT NULL,561 `InboundNATPriority` int(11) NOT NULL DEFAULT '1',562 PRIMARY KEY (`Id`),563 UNIQUE KEY `Name` (`Name`),564 KEY `Member` (`Member`),565 KEY `Location` (`Location`),566 KEY `Type` (`Type`)567 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=604 ;568 569 -- --------------------------------------------------------570 571 --572 -- Struktura tabulky `NetworkDeviceHistory`573 --574 575 CREATE TABLE IF NOT EXISTS `NetworkDeviceHistory` (576 `Id` int(11) NOT NULL AUTO_INCREMENT,577 `Device` int(11) NOT NULL DEFAULT '0',578 `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',579 `Action` int(11) NOT NULL DEFAULT '0',580 `Notice` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',581 PRIMARY KEY (`Id`),582 KEY `Device` (`Device`)583 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;584 585 -- --------------------------------------------------------586 587 --588 -- Struktura tabulky `NetworkDeviceType`589 --590 591 CREATE TABLE IF NOT EXISTS `NetworkDeviceType` (592 `Id` int(11) NOT NULL AUTO_INCREMENT,593 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,594 `ShowOnline` int(11) NOT NULL DEFAULT '0',595 `IconName` varchar(255) COLLATE utf8_czech_ci NOT NULL,596 PRIMARY KEY (`Id`)597 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=10 ;598 599 -- --------------------------------------------------------600 601 --602 -- Struktura tabulky `NetworkDomainAlias`603 --604 605 CREATE TABLE IF NOT EXISTS `NetworkDomainAlias` (606 `Id` int(11) NOT NULL AUTO_INCREMENT,607 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,608 `Target` varchar(255) COLLATE utf8_czech_ci NOT NULL,609 `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,610 PRIMARY KEY (`Id`)611 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=35 ;612 613 -- --------------------------------------------------------614 615 --616 -- Struktura tabulky `NetworkFirewall`617 --618 619 CREATE TABLE IF NOT EXISTS `NetworkFirewall` (620 `Id` int(11) NOT NULL AUTO_INCREMENT,621 `NetworkDevice` int(11) NOT NULL,622 `SourceInterface` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,623 `DestinationInterface` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,624 `SourceAddress` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,625 `DestinationAddress` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,626 `SourcePort` int(11) DEFAULT NULL,627 `DestinationPort` int(11) DEFAULT NULL,628 `Action` varchar(255) COLLATE utf8_czech_ci NOT NULL,629 `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,630 PRIMARY KEY (`Id`),631 KEY `NetworkDevice` (`NetworkDevice`)632 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ;633 634 -- --------------------------------------------------------635 636 --637 -- Struktura tabulky `NetworkInterface`638 --639 640 CREATE TABLE IF NOT EXISTS `NetworkInterface` (641 `Id` int(11) NOT NULL AUTO_INCREMENT,642 `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL,643 `Type` int(11) NOT NULL,644 `MAC` varchar(17) COLLATE utf8_czech_ci NOT NULL,645 `LocalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL,646 `IPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL,647 `ExternalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL,648 `Device` int(11) NOT NULL,649 `Online` int(11) NOT NULL DEFAULT '0',650 `LastOnline` datetime NOT NULL,651 PRIMARY KEY (`Id`),652 KEY `Device` (`Device`),653 KEY `Type` (`Type`)654 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=667 ;655 656 -- --------------------------------------------------------657 658 --659 -- Struktura tabulky `NetworkInterfacePortable`660 --661 662 CREATE TABLE IF NOT EXISTS `NetworkInterfacePortable` (663 `Id` int(11) NOT NULL AUTO_INCREMENT,664 `NetworkInterface` int(11) NOT NULL,665 `DynamicIP` varchar(255) COLLATE utf8_czech_ci NOT NULL,666 `Time` datetime NOT NULL,667 `Update` int(11) NOT NULL,668 PRIMARY KEY (`Id`),669 KEY `NetworkInterface` (`NetworkInterface`),670 KEY `Update` (`Update`)671 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;672 673 -- --------------------------------------------------------674 675 --676 -- Struktura tabulky `NetworkInterfaceStat`677 --678 679 CREATE TABLE IF NOT EXISTS `NetworkInterfaceStat` (680 `NetworkInterface` int(11) NOT NULL DEFAULT '0',681 `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',682 `PingCount` smallint(11) NOT NULL DEFAULT '0',683 KEY `host_id` (`NetworkInterface`),684 KEY `time` (`Time`)685 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;686 687 -- --------------------------------------------------------688 689 --690 -- Struktura tabulky `NetworkInterfaceType`691 --692 693 CREATE TABLE IF NOT EXISTS `NetworkInterfaceType` (694 `Id` int(11) NOT NULL AUTO_INCREMENT,695 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,696 `MaxSpeed` int(11) NOT NULL,697 `FullDuplex` int(11) NOT NULL DEFAULT '1',698 `Color` varchar(6) COLLATE utf8_czech_ci NOT NULL DEFAULT 'ffffff',699 PRIMARY KEY (`Id`)700 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ;701 702 -- --------------------------------------------------------703 704 --705 -- Struktura tabulky `NetworkLink`706 --707 708 CREATE TABLE IF NOT EXISTS `NetworkLink` (709 `Id` int(11) NOT NULL AUTO_INCREMENT,710 `Type` int(11) NOT NULL,711 `Interface1` int(11) NOT NULL,712 `Interface2` int(11) NOT NULL,713 PRIMARY KEY (`Id`),714 KEY `Interface1` (`Interface1`),715 KEY `Interface2` (`Interface2`)716 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=356 ;717 718 -- --------------------------------------------------------719 720 --721 -- Struktura tabulky `NetworkMangleSubgroup`722 --723 724 CREATE TABLE IF NOT EXISTS `NetworkMangleSubgroup` (725 `Id` int(11) NOT NULL AUTO_INCREMENT,726 `AddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL,727 PRIMARY KEY (`Id`),728 KEY `AddressRange` (`AddressRange`)729 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=144 ;730 731 -- --------------------------------------------------------732 733 --734 -- Struktura tabulky `NetworkMark`735 --736 737 CREATE TABLE IF NOT EXISTS `NetworkMark` (738 `Id` int(11) NOT NULL AUTO_INCREMENT,739 `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,740 PRIMARY KEY (`Id`),741 KEY `Comment` (`Comment`)742 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1278 ;743 744 -- --------------------------------------------------------745 746 --747 -- Struktura tabulky `NetworkSubnet`748 --749 750 CREATE TABLE IF NOT EXISTS `NetworkSubnet` (751 `Id` int(11) NOT NULL AUTO_INCREMENT,752 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,753 `AddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL,754 `Mask` int(11) NOT NULL,755 `DHCP` varchar(255) COLLATE utf8_czech_ci NOT NULL,756 `Gateway` varchar(255) COLLATE utf8_czech_ci NOT NULL,757 `WINS` varchar(255) COLLATE utf8_czech_ci NOT NULL,758 `DNS` varchar(255) COLLATE utf8_czech_ci NOT NULL,759 `Domain` varchar(255) COLLATE utf8_czech_ci NOT NULL,760 `NTP` varchar(255) COLLATE utf8_czech_ci NOT NULL,761 `Member` int(11) DEFAULT NULL,762 `ExtAddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL,763 `ExtMask` int(11) NOT NULL DEFAULT '32',764 `AddressRangeIPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL,765 `Configure` int(11) NOT NULL DEFAULT '1',766 PRIMARY KEY (`Id`),767 KEY `Member` (`Member`),768 KEY `Configure` (`Configure`)769 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=41 ;770 771 -- --------------------------------------------------------772 773 --774 -- Struktura tabulky `network_devices`775 --776 777 CREATE TABLE IF NOT EXISTS `network_devices` (778 `id` int(11) NOT NULL AUTO_INCREMENT,779 `name` varchar(128) COLLATE utf8_czech_ci NOT NULL,780 `price` int(11) NOT NULL DEFAULT '0',781 `count` int(11) NOT NULL DEFAULT '1',782 `date` date NOT NULL DEFAULT '0000-00-00',783 `segment` int(11) NOT NULL DEFAULT '0',784 `used` int(11) NOT NULL DEFAULT '0',785 `consumption` int(11) NOT NULL DEFAULT '0',786 `user` int(11) NOT NULL DEFAULT '0',787 `info` text COLLATE utf8_czech_ci NOT NULL,788 `channel` int(11) NOT NULL DEFAULT '0',789 `device_id` varchar(255) COLLATE utf8_czech_ci NOT NULL,790 `shop` varchar(64) COLLATE utf8_czech_ci NOT NULL,791 `deprecated_price` int(11) NOT NULL DEFAULT '0',792 `TimeEnlistment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',793 `TimeElimination` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',794 `StockCard` int(11) NOT NULL,795 PRIMARY KEY (`id`)796 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=162 ;797 798 -- --------------------------------------------------------799 800 --801 -- Struktura tabulky `network_segments`802 --803 804 CREATE TABLE IF NOT EXISTS `network_segments` (805 `id` int(11) NOT NULL AUTO_INCREMENT,806 `name` varchar(128) COLLATE utf8_czech_ci NOT NULL,807 `price` int(11) NOT NULL DEFAULT '0',808 `parent` int(11) NOT NULL DEFAULT '0',809 `users` int(11) NOT NULL DEFAULT '0',810 `consumption` int(11) NOT NULL DEFAULT '0',811 `users_overheads` int(11) NOT NULL DEFAULT '0',812 PRIMARY KEY (`id`)813 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=33 ;814 815 -- --------------------------------------------------------816 817 --818 -- Struktura tabulky `News`819 --820 821 CREATE TABLE IF NOT EXISTS `News` (822 `Id` int(11) NOT NULL AUTO_INCREMENT,823 `Title` varchar(255) COLLATE utf8_czech_ci NOT NULL,824 `Content` text COLLATE utf8_czech_ci NOT NULL,825 `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',826 `TargetDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',827 `Author` varchar(32) COLLATE utf8_czech_ci NOT NULL,828 `IP` varchar(16) COLLATE utf8_czech_ci NOT NULL,829 `Category` int(11) DEFAULT '0',830 `Enclosure` varchar(255) COLLATE utf8_czech_ci NOT NULL,831 `User` int(11) NOT NULL DEFAULT '0',832 `Link` varchar(255) COLLATE utf8_czech_ci NOT NULL,833 PRIMARY KEY (`Id`),834 KEY `category` (`Category`),835 KEY `date` (`Date`),836 KEY `Title` (`Title`),837 KEY `Link` (`Link`)838 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=34573 ;839 840 -- --------------------------------------------------------841 842 --843 -- Struktura tabulky `NewsCategory`844 --845 846 CREATE TABLE IF NOT EXISTS `NewsCategory` (847 `Id` int(11) NOT NULL AUTO_INCREMENT,848 `Caption` varchar(255) COLLATE utf8_czech_ci NOT NULL,849 `Permission` int(11) NOT NULL DEFAULT '0',850 `Sequence` int(11) NOT NULL,851 `Group` int(11) NOT NULL DEFAULT '1',852 `RSS` varchar(255) COLLATE utf8_czech_ci NOT NULL,853 PRIMARY KEY (`Id`),854 KEY `Sequence` (`Sequence`),855 KEY `Group` (`Group`)856 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17 ;857 858 -- --------------------------------------------------------859 860 --861 -- Struktura tabulky `Panel`862 --863 864 CREATE TABLE IF NOT EXISTS `Panel` (865 `Id` int(11) NOT NULL AUTO_INCREMENT,866 `Module` varchar(255) COLLATE utf8_czech_ci NOT NULL,867 `Parameters` varchar(255) COLLATE utf8_czech_ci NOT NULL,868 `Order` int(11) NOT NULL,869 `PanelColumn` int(11) NOT NULL,870 PRIMARY KEY (`Id`),871 KEY `PanelColumn` (`PanelColumn`)872 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ;873 874 -- --------------------------------------------------------875 876 --877 -- Struktura tabulky `PanelColumn`878 --879 880 CREATE TABLE IF NOT EXISTS `PanelColumn` (881 `Id` int(11) NOT NULL AUTO_INCREMENT,882 `Width` varchar(255) COLLATE utf8_czech_ci NOT NULL,883 PRIMARY KEY (`Id`)884 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;885 886 -- --------------------------------------------------------887 888 --889 -- Struktura tabulky `PermissionGroup`890 --891 892 CREATE TABLE IF NOT EXISTS `PermissionGroup` (893 `Id` int(11) NOT NULL AUTO_INCREMENT,894 `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',895 PRIMARY KEY (`Id`)896 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;897 898 -- --------------------------------------------------------899 900 --901 -- Struktura tabulky `PermissionGroupAssignment`902 --903 904 CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` (905 `Group` int(11) NOT NULL DEFAULT '0',906 `GroupOrOperation` int(11) NOT NULL DEFAULT '0',907 `Type` enum('Group','Operation') COLLATE utf8_czech_ci NOT NULL DEFAULT 'Group',908 KEY `Group` (`Group`)909 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;910 911 -- --------------------------------------------------------912 913 --914 -- Struktura tabulky `PermissionOperation`915 --916 917 CREATE TABLE IF NOT EXISTS `PermissionOperation` (918 `Id` int(11) NOT NULL AUTO_INCREMENT,919 `Module` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',920 `Operation` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',921 `Item` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',922 `ItemId` int(11) NOT NULL DEFAULT '0',923 PRIMARY KEY (`Id`)924 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=44 ;925 926 -- --------------------------------------------------------927 928 --929 -- Struktura tabulky `PermissionUserAssignment`930 --931 932 CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` (933 `User` int(11) NOT NULL DEFAULT '0',934 `GroupOrOperation` int(11) NOT NULL DEFAULT '0',935 `Type` enum('Group','Operation') COLLATE utf8_czech_ci NOT NULL DEFAULT 'Group',936 KEY `User` (`User`),937 KEY `GroupOrOperation` (`GroupOrOperation`)938 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;939 940 -- --------------------------------------------------------941 942 --943 -- Struktura tabulky `PhoneBook`944 --945 946 CREATE TABLE IF NOT EXISTS `PhoneBook` (947 `Id` int(11) NOT NULL AUTO_INCREMENT,948 `Number` varchar(255) COLLATE utf8_czech_ci NOT NULL,949 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,950 `Address` varchar(255) COLLATE utf8_czech_ci NOT NULL,951 `LastUpdate` datetime NOT NULL,952 `Operator` varchar(255) COLLATE utf8_czech_ci NOT NULL,953 PRIMARY KEY (`Id`)954 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=53 ;955 956 -- --------------------------------------------------------957 958 --959 -- Struktura tabulky `Service`960 --961 962 CREATE TABLE IF NOT EXISTS `Service` (963 `Id` int(11) NOT NULL AUTO_INCREMENT,964 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,965 PRIMARY KEY (`Id`)966 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;967 968 -- --------------------------------------------------------969 970 --971 -- Struktura tabulky `StockCard`972 --973 974 CREATE TABLE IF NOT EXISTS `StockCard` (975 `Id` int(11) NOT NULL AUTO_INCREMENT,976 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,977 `SellPrice` float NOT NULL,978 `Consumption` int(11) NOT NULL COMMENT 'In Watts',979 PRIMARY KEY (`Id`)980 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;981 982 -- --------------------------------------------------------983 984 --985 -- Struktura tabulky `Subject`986 --987 988 CREATE TABLE IF NOT EXISTS `Subject` (989 `Id` int(11) NOT NULL AUTO_INCREMENT,990 `Name` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',991 `AddressStreet` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',992 `AddressTown` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',993 `AddressPSC` int(11) NOT NULL DEFAULT '0',994 `AddressCountry` varchar(255) COLLATE utf8_czech_ci NOT NULL,995 `IC` varchar(32) COLLATE utf8_czech_ci NOT NULL,996 `DIC` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',997 `MapPositionX` float NOT NULL DEFAULT '0',998 `MapPositionY` float NOT NULL DEFAULT '0',999 `WWW` varchar(255) COLLATE utf8_czech_ci NOT NULL,1000 `Note` varchar(255) COLLATE utf8_czech_ci NOT NULL,1001 PRIMARY KEY (`Id`)1002 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=203 ;1003 1004 -- --------------------------------------------------------1005 1006 --1007 -- Struktura tabulky `SubjectOpenTime`1008 --1009 1010 CREATE TABLE IF NOT EXISTS `SubjectOpenTime` (1011 `Subject` int(11) NOT NULL DEFAULT '0',1012 `UpdateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',1013 `Notice` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1014 `Photo` int(11) NOT NULL,1015 KEY `Subject` (`Subject`)1016 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;1017 1018 -- --------------------------------------------------------1019 1020 --1021 -- Struktura tabulky `SubjectOpenTimeDay`1022 --1023 1024 CREATE TABLE IF NOT EXISTS `SubjectOpenTimeDay` (1025 `Subject` int(11) NOT NULL,1026 `Day` int(11) NOT NULL,1027 `Open1` int(11) NOT NULL,1028 `Close1` int(11) NOT NULL,1029 `Open2` int(11) NOT NULL,1030 `Close2` int(11) NOT NULL,1031 KEY `Subject` (`Subject`)1032 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;1033 1034 -- --------------------------------------------------------1035 1036 --1037 -- Struktura tabulky `TV`1038 --1039 1040 CREATE TABLE IF NOT EXISTS `TV` (1041 `Id` int(11) NOT NULL AUTO_INCREMENT,1042 `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL,1043 `Frequency` int(11) NOT NULL DEFAULT '0',1044 `Norm` varchar(8) COLLATE utf8_czech_ci NOT NULL,1045 `Homepage` varchar(255) COLLATE utf8_czech_ci NOT NULL,1046 `Language` varchar(32) COLLATE utf8_czech_ci NOT NULL,1047 `ShortName` varchar(16) COLLATE utf8_czech_ci NOT NULL,1048 `Stream` varchar(255) COLLATE utf8_czech_ci NOT NULL,1049 `StreamWeb` varchar(255) COLLATE utf8_czech_ci NOT NULL,1050 `SourceType` varchar(255) COLLATE utf8_czech_ci NOT NULL,1051 `Category` varchar(255) COLLATE utf8_czech_ci NOT NULL,1052 PRIMARY KEY (`Id`)1053 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=43 ;1054 1055 -- --------------------------------------------------------1056 1057 --1058 -- Struktura tabulky `User`1059 --1060 1061 CREATE TABLE IF NOT EXISTS `User` (1062 `Id` int(11) NOT NULL AUTO_INCREMENT,1063 `Login` varchar(64) COLLATE utf8_czech_ci NOT NULL,1064 `Name` varchar(128) COLLATE utf8_czech_ci NOT NULL,1065 `Password` varchar(255) COLLATE utf8_czech_ci NOT NULL,1066 `Email` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1067 `LastIpAddress` varchar(16) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1068 `LastLoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',1069 `RegistrationTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',1070 `Member` int(11) DEFAULT NULL,1071 `Locked` tinyint(1) NOT NULL DEFAULT '0',1072 `ICQ` int(11) NOT NULL DEFAULT '0',1073 `PhoneNumber` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1074 `InitPassword` varchar(255) COLLATE utf8_czech_ci NOT NULL,1075 PRIMARY KEY (`Id`),1076 UNIQUE KEY `Name` (`Login`),1077 UNIQUE KEY `Nick` (`Name`),1078 KEY `Member` (`Member`)1079 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=222 ;1080 1081 -- --------------------------------------------------------1082 1083 --1084 -- Struktura tabulky `UserOnline`1085 --1086 1087 CREATE TABLE IF NOT EXISTS `UserOnline` (1088 `Id` int(11) NOT NULL AUTO_INCREMENT,1089 `User` int(11) NOT NULL DEFAULT '0' COMMENT 'User.Id',1090 `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',1091 `LoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',1092 `SessionId` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1093 `IpAddress` varchar(16) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1094 `HostName` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',1095 `ScriptName` varchar(255) COLLATE utf8_czech_ci NOT NULL,1096 PRIMARY KEY (`Id`),1097 KEY `User` (`User`)1098 ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8430 ;1099 38 1100 39 -- … … 1103 42 1104 43 -- 1105 -- Omezení pro tabulku `DocumentLineSequence`1106 --1107 ALTER TABLE `DocumentLineSequence`1108 ADD CONSTRAINT `DocumentLineSequence_ibfk_1` FOREIGN KEY (`DocumentLine`) REFERENCES `DocumentLine` (`Id`),1109 ADD CONSTRAINT `DocumentLineSequence_ibfk_2` FOREIGN KEY (`FinanceYear`) REFERENCES `FinanceYear` (`Id`);1110 1111 --1112 -- Omezení pro tabulku `FinanceBills`1113 --1114 ALTER TABLE `FinanceBills`1115 ADD CONSTRAINT `FinanceBills_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);1116 1117 --1118 -- Omezení pro tabulku `FinanceBillsItems`1119 --1120 ALTER TABLE `FinanceBillsItems`1121 ADD CONSTRAINT `FinanceBillsItems_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`);1122 1123 --1124 -- Omezení pro tabulku `FinanceClaimsLiabilities`1125 --1126 ALTER TABLE `FinanceClaimsLiabilities`1127 ADD CONSTRAINT `FinanceClaimsLiabilities_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);1128 1129 --1130 -- Omezení pro tabulku `FinanceOperation`1131 --1132 ALTER TABLE `FinanceOperation`1133 ADD CONSTRAINT `FinanceOperation_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`),1134 ADD CONSTRAINT `FinanceOperation_ibfk_2` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`);1135 1136 --1137 -- Omezení pro tabulku `Hyperlink`1138 --1139 ALTER TABLE `Hyperlink`1140 ADD CONSTRAINT `Hyperlink_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `HyperlinkGroup` (`Id`);1141 1142 --1143 44 -- Omezení pro tabulku `Log` 1144 45 -- 1145 46 ALTER TABLE `Log` 1146 47 ADD CONSTRAINT `Log_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`); 1147 1148 --1149 -- Omezení pro tabulku `Member`1150 --1151 ALTER TABLE `Member`1152 ADD CONSTRAINT `Member_ibfk_28` FOREIGN KEY (`BillingPeriodNext`) REFERENCES `FinanceBillingPeriod` (`Id`),1153 ADD CONSTRAINT `Member_ibfk_23` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`),1154 ADD CONSTRAINT `Member_ibfk_24` FOREIGN KEY (`ResponsibleUser`) REFERENCES `User` (`Id`),1155 ADD CONSTRAINT `Member_ibfk_25` FOREIGN KEY (`InternetTariffCurrentMonth`) REFERENCES `FinanceTariff` (`Id`),1156 ADD CONSTRAINT `Member_ibfk_26` FOREIGN KEY (`InternetTariffNextMonth`) REFERENCES `FinanceTariff` (`Id`),1157 ADD CONSTRAINT `Member_ibfk_27` FOREIGN KEY (`BillingPeriod`) REFERENCES `FinanceBillingPeriod` (`Id`);1158 1159 --1160 -- Omezení pro tabulku `MemberPayment`1161 --1162 ALTER TABLE `MemberPayment`1163 ADD CONSTRAINT `MemberPayment_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`);1164 1165 --1166 -- Omezení pro tabulku `NetworkAP`1167 --1168 ALTER TABLE `NetworkAP`1169 ADD CONSTRAINT `NetworkAP_ibfk_1` FOREIGN KEY (`NetworkDevice`) REFERENCES `NetworkDevice` (`Id`);1170 1171 --1172 -- Omezení pro tabulku `NetworkDevice`1173 --1174 ALTER TABLE `NetworkDevice`1175 ADD CONSTRAINT `NetworkDevice_ibfk_4` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`),1176 ADD CONSTRAINT `NetworkDevice_ibfk_5` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`),1177 ADD CONSTRAINT `NetworkDevice_ibfk_6` FOREIGN KEY (`Type`) REFERENCES `NetworkDeviceType` (`Id`);1178 1179 --1180 -- Omezení pro tabulku `NetworkFirewall`1181 --1182 ALTER TABLE `NetworkFirewall`1183 ADD CONSTRAINT `NetworkFirewall_ibfk_1` FOREIGN KEY (`NetworkDevice`) REFERENCES `NetworkDevice` (`Id`);1184 1185 --1186 -- Omezení pro tabulku `NetworkInterface`1187 --1188 ALTER TABLE `NetworkInterface`1189 ADD CONSTRAINT `NetworkInterface_ibfk_1` FOREIGN KEY (`Type`) REFERENCES `NetworkInterfaceType` (`Id`),1190 ADD CONSTRAINT `NetworkInterface_ibfk_2` FOREIGN KEY (`Device`) REFERENCES `NetworkDevice` (`Id`);1191 1192 --1193 -- Omezení pro tabulku `NetworkSubnet`1194 --1195 ALTER TABLE `NetworkSubnet`1196 ADD CONSTRAINT `NetworkSubnet_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`);1197 1198 --1199 -- Omezení pro tabulku `News`1200 --1201 ALTER TABLE `News`1202 ADD CONSTRAINT `News_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `NewsCategory` (`Id`);1203 1204 --1205 -- Omezení pro tabulku `Panel`1206 --1207 ALTER TABLE `Panel`1208 ADD CONSTRAINT `Panel_ibfk_1` FOREIGN KEY (`PanelColumn`) REFERENCES `PanelColumn` (`Id`);1209 1210 --1211 -- Omezení pro tabulku `PermissionUserAssignment`1212 --1213 ALTER TABLE `PermissionUserAssignment`1214 ADD CONSTRAINT `PermissionUserAssignment_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`);1215 1216 --1217 -- Omezení pro tabulku `SubjectOpenTime`1218 --1219 ALTER TABLE `SubjectOpenTime`1220 ADD CONSTRAINT `SubjectOpenTime_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);1221 1222 --1223 -- Omezení pro tabulku `SubjectOpenTimeDay`1224 --1225 ALTER TABLE `SubjectOpenTimeDay`1226 ADD CONSTRAINT `SubjectOpenTimeDay_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);1227 1228 --1229 -- Omezení pro tabulku `User`1230 --1231 ALTER TABLE `User`1232 ADD CONSTRAINT `User_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`);1233 1234 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;1235 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;1236 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -
trunk/sql/updates/50.sql
r440 r441 1 1 ALTER TABLE `finance_charge` ADD `BaseTariffPrice` INT( 11 ) DEFAULT '0' NOT NULL AFTER `base_speed_element` ; 2 ALTER TABLE `finance_charge` ADD `TopTariffPrice` INT( 11 ) DEFAULT '0' NOT NULL AFTER `BaseTariffPrice` ; 2 3 3 ALTER TABLE `finance_charge` ADD `TopTariffPrice` INT( 11 ) DEFAULT '0' NOT NULL AFTER `BaseTariffPrice` ; 4 ALTER TABLE `finance_monthly_overall` ADD `BaseTariffPrice` INT( 11 ) DEFAULT '0' NOT NULL AFTER `total_paid` ; 5 ALTER TABLE `finance_monthly_overall` ADD `TopTariffPrice` INT( 11 ) DEFAULT '0' NOT NULL AFTER `BaseTariffPrice` ; 6 7 UPDATE users SET role=2 WHERE role=0; 8 9 CREATE TABLE IF NOT EXISTS `users_roles` ( 10 `Id` int(11) NOT NULL auto_increment, 11 `Description` varchar(128) collate utf8_czech_ci NOT NULL, 12 PRIMARY KEY (`Id`) 13 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ; 14 15 INSERT INTO `users_roles` (`Id`, `Description`) VALUES 16 (1, 'Uživatel'), 17 (2, 'Zástupce za domácnost'); -
trunk/sql/updates/61.sql
r440 r441 1 ALTER TABLE `finance_bills_items` CHANGE `quantity` `quantity` FLOAT( 11 ) NOT NULL DEFAULT '1' 1 ALTER TABLE `finance_bills_items` CHANGE `quantity` `quantity` FLOAT( 11 ) NOT NULL DEFAULT '1' ; 2 3 ALTER TABLE `users` ADD `dic` VARCHAR( 32 ) NOT NULL ;
Note:
See TracChangeset
for help on using the changeset viewer.