Ignore:
Timestamp:
Mar 1, 2013, 9:20:14 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Zprovozněna kontrola aktuálnosti webu a automatické aktualizace.
  • Přidáno: Plná instalace výchozí databáze.
  • Upraveno: Anonymní uživatel je nyní reprezentován null hodnotou.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/FullInstall.php

    r491 r493  
    33function FullInstall($Manager)
    44{
    5   $Manager->Execute("");
     5  $Manager->Execute("CREATE TABLE IF NOT EXISTS `ChatHistory` (
     6  `Id` int(11) NOT NULL AUTO_INCREMENT,
     7  `Nick` varchar(64) COLLATE utf8_czech_ci NOT NULL,
     8  `Text` text COLLATE utf8_czech_ci NOT NULL,
     9  `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     10  `Color` int(11) NOT NULL DEFAULT '0',
     11  `RoomName` varchar(32) COLLATE utf8_czech_ci NOT NULL,
     12  `RoomType` int(11) NOT NULL DEFAULT '0',
     13  `Host` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     14  PRIMARY KEY (`Id`)
     15) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=528576 ;
     16
     17-- --------------------------------------------------------
     18
     19--
     20-- Struktura tabulky `Country`
     21--
     22
     23CREATE TABLE IF NOT EXISTS `Country` (
     24  `Id` int(11) NOT NULL AUTO_INCREMENT,
     25  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     26  PRIMARY KEY (`Id`)
     27) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;
     28
     29-- --------------------------------------------------------
     30
     31--
     32-- Struktura tabulky `DocumentLine`
     33--
     34
     35CREATE TABLE IF NOT EXISTS `DocumentLine` (
     36  `Id` int(11) NOT NULL AUTO_INCREMENT,
     37  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     38  `Shortcut` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     39  PRIMARY KEY (`Id`),
     40  UNIQUE KEY `Shortcut` (`Shortcut`)
     41) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9 ;
     42
     43-- --------------------------------------------------------
     44
     45--
     46-- Struktura tabulky `DocumentLineSequence`
     47--
     48
     49CREATE TABLE IF NOT EXISTS `DocumentLineSequence` (
     50  `Id` int(11) NOT NULL AUTO_INCREMENT,
     51  `DocumentLine` int(11) NOT NULL,
     52  `FinanceYear` int(11) NOT NULL,
     53  `NextNumber` int(11) NOT NULL,
     54  `YearPrefix` int(11) NOT NULL,
     55  PRIMARY KEY (`Id`),
     56  KEY `DocumentLine` (`DocumentLine`),
     57  KEY `FinanceYear` (`FinanceYear`)
     58) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=35 ;
     59
     60--
     61-- RELACE PRO TABULKU `DocumentLineSequence`:
     62--   `DocumentLine`
     63--       `DocumentLine` -> `Id`
     64--   `FinanceYear`
     65--       `FinanceYear` -> `Id`
     66--
     67
     68-- --------------------------------------------------------
     69
     70--
     71-- Struktura tabulky `EmailQueue`
     72--
     73
     74CREATE TABLE IF NOT EXISTS `EmailQueue` (
     75  `Id` int(11) NOT NULL AUTO_INCREMENT,
     76  `Time` datetime NOT NULL,
     77  `To` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     78  `Subject` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     79  `Content` text COLLATE utf8_czech_ci NOT NULL,
     80  `Headers` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     81  `Archive` int(11) NOT NULL DEFAULT '0',
     82  `From` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     83  `AttachmentFile` int(11) DEFAULT NULL,
     84  PRIMARY KEY (`Id`),
     85  KEY `Archive` (`Archive`)
     86) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3127 ;
     87
     88-- --------------------------------------------------------
     89
     90--
     91-- Struktura tabulky `Employee`
     92--
     93
     94CREATE TABLE IF NOT EXISTS `Employee` (
     95  `Id` int(11) NOT NULL AUTO_INCREMENT,
     96  `FirstName` varchar(255) NOT NULL,
     97  `SecondName` varchar(255) NOT NULL,
     98  `Salary` int(11) NOT NULL,
     99  `ValidFrom` date NOT NULL,
     100  `ValidTo` date DEFAULT NULL,
     101  PRIMARY KEY (`Id`)
     102) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     103
     104-- --------------------------------------------------------
     105
     106--
     107-- Struktura tabulky `EmployeeSalary`
     108--
     109
     110CREATE TABLE IF NOT EXISTS `EmployeeSalary` (
     111  `Id` int(11) NOT NULL AUTO_INCREMENT,
     112  `Date` date NOT NULL,
     113  `Employee` int(11) NOT NULL,
     114  `Amount` int(11) NOT NULL,
     115  PRIMARY KEY (`Id`),
     116  KEY `Employee` (`Employee`)
     117) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     118
     119-- --------------------------------------------------------
     120
     121--
     122-- Struktura tabulky `File`
     123--
     124
     125CREATE TABLE IF NOT EXISTS `File` (
     126  `Id` int(11) NOT NULL AUTO_INCREMENT,
     127  `Name` varchar(256) COLLATE utf8_czech_ci NOT NULL,
     128  `Size` int(11) NOT NULL,
     129  PRIMARY KEY (`Id`)
     130) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;
     131
     132-- --------------------------------------------------------
     133
     134--
     135-- Struktura tabulky `FinanceAssetsHistory`
     136--
     137
     138CREATE TABLE IF NOT EXISTS `FinanceAssetsHistory` (
     139  `AssetsId` int(11) NOT NULL DEFAULT '0',
     140  `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     141  `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     142  `User` int(11) NOT NULL DEFAULT '0',
     143  KEY `AssetsId` (`AssetsId`)
     144) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
     145
     146-- --------------------------------------------------------
     147
     148--
     149-- Struktura tabulky `FinanceBankAccount`
     150--
     151
     152CREATE TABLE IF NOT EXISTS `FinanceBankAccount` (
     153  `Id` int(11) NOT NULL AUTO_INCREMENT,
     154  `TimeCreate` date NOT NULL,
     155  `Number` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     156  `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     157  `Subject` int(11) DEFAULT NULL,
     158  `TimeEnd` date DEFAULT NULL,
     159  `Use` int(11) NOT NULL,
     160  PRIMARY KEY (`Id`),
     161  KEY `Subject` (`Subject`)
     162) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;
     163
     164--
     165-- RELACE PRO TABULKU `FinanceBankAccount`:
     166--   `Subject`
     167--       `Subject` -> `Id`
     168--
     169
     170-- --------------------------------------------------------
     171
     172--
     173-- Struktura tabulky `FinanceBillingPeriod`
     174--
     175
     176CREATE TABLE IF NOT EXISTS `FinanceBillingPeriod` (
     177  `Id` int(11) NOT NULL AUTO_INCREMENT,
     178  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     179  `MonthCount` int(11) NOT NULL,
     180  PRIMARY KEY (`Id`)
     181) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;
     182
     183-- --------------------------------------------------------
     184
     185--
     186-- Struktura tabulky `FinanceBills`
     187--
     188
     189CREATE TABLE IF NOT EXISTS `FinanceBills` (
     190  `Id` int(11) NOT NULL AUTO_INCREMENT,
     191  `TimeFrom` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     192  `Subject` int(11) NOT NULL DEFAULT '0',
     193  `PeriodFrom` date DEFAULT NULL,
     194  `PeriodTo` date DEFAULT NULL,
     195  `TimeCreate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     196  `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     197  `BillCode` varchar(32) COLLATE utf8_czech_ci NOT NULL,
     198  `Type` enum('invoice','income') COLLATE utf8_czech_ci NOT NULL,
     199  `Cash` int(11) NOT NULL DEFAULT '0',
     200  PRIMARY KEY (`Id`),
     201  KEY `Subject` (`Subject`),
     202  KEY `Subject_2` (`Subject`)
     203) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6298 ;
     204
     205--
     206-- RELACE PRO TABULKU `FinanceBills`:
     207--   `Subject`
     208--       `Subject` -> `Id`
     209--
     210
     211-- --------------------------------------------------------
     212
     213--
     214-- Struktura tabulky `FinanceBillsItems`
     215--
     216
     217CREATE 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--
     232
     233-- --------------------------------------------------------
     234
     235--
     236-- Struktura tabulky `FinanceCharge`
     237--
     238
     239CREATE TABLE IF NOT EXISTS `FinanceCharge` (
     240  `Period` int(11) NOT NULL DEFAULT '0',
     241  `Internet` int(11) NOT NULL DEFAULT '0',
     242  `InternetSpeed` int(11) NOT NULL DEFAULT '0',
     243  `InternetSpeedReserve` int(11) NOT NULL DEFAULT '0',
     244  `AdministrationPerUser` int(20) NOT NULL DEFAULT '0',
     245  `kWh` int(11) NOT NULL DEFAULT '0',
     246  `BaseSpeedElement` int(11) NOT NULL DEFAULT '0',
     247  `BaseTariffPrice` int(11) NOT NULL DEFAULT '0',
     248  `TopTariffPrice` int(11) NOT NULL DEFAULT '0'
     249) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
     250
     251-- --------------------------------------------------------
     252
     253--
     254-- Struktura tabulky `FinanceClaimLiabilityItem`
     255--
     256
     257CREATE TABLE IF NOT EXISTS `FinanceClaimLiabilityItem` (
     258  `Id` int(11) NOT NULL AUTO_INCREMENT,
     259  `FinanceClaimLiability` int(11) NOT NULL DEFAULT '0',
     260  `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     261  `Price` float NOT NULL DEFAULT '0',
     262  `VAT` float NOT NULL DEFAULT '0',
     263  `Quantity` float NOT NULL DEFAULT '1',
     264  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
     280CREATE 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
     309CREATE 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 ;
     314
     315-- --------------------------------------------------------
     316
     317--
     318-- Struktura tabulky `FinanceLog`
     319--
     320
     321CREATE TABLE IF NOT EXISTS `FinanceLog` (
     322  `Id` int(11) NOT NULL AUTO_INCREMENT,
     323  `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     324  `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     325  PRIMARY KEY (`Id`)
     326) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;
     327
     328-- --------------------------------------------------------
     329
     330--
     331-- Struktura tabulky `FinanceMonthlyOverall`
     332--
     333
     334CREATE TABLE IF NOT EXISTS `FinanceMonthlyOverall` (
     335  `Id` int(11) NOT NULL AUTO_INCREMENT,
     336  `Money` int(11) NOT NULL DEFAULT '0',
     337  `Date` date NOT NULL DEFAULT '0000-00-00',
     338  `Administration` int(11) NOT NULL DEFAULT '0',
     339  `kWh` int(11) NOT NULL DEFAULT '0',
     340  `AdministrationTotal` int(11) NOT NULL DEFAULT '0',
     341  `ConsumptionTotal` int(11) NOT NULL DEFAULT '0',
     342  `TotalPaid` int(11) NOT NULL DEFAULT '0',
     343  `BaseTariffPrice` int(11) NOT NULL DEFAULT '0',
     344  `TopTariffPrice` int(11) NOT NULL DEFAULT '0',
     345  `MemberCount` int(11) NOT NULL DEFAULT '0',
     346  `Investment` int(11) NOT NULL,
     347  PRIMARY KEY (`Id`)
     348) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=122 ;
     349
     350-- --------------------------------------------------------
     351
     352--
     353-- Struktura tabulky `FinanceOperation`
     354--
     355
     356CREATE TABLE IF NOT EXISTS `FinanceOperation` (
     357  `Id` int(11) NOT NULL AUTO_INCREMENT,
     358  `Time` datetime NOT NULL,
     359  `Subject` int(11) NOT NULL DEFAULT '0',
     360  `Cash` int(11) NOT NULL DEFAULT '0',
     361  `Value` float NOT NULL,
     362  `BillCode` varchar(32) COLLATE utf8_czech_ci DEFAULT NULL,
     363  `Taxable` tinyint(1) NOT NULL DEFAULT '1',
     364  `Bill` int(11) DEFAULT NULL,
     365  `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT 'Vklad',
     366  `Network` int(11) NOT NULL DEFAULT '1',
     367  `BankAccount` int(11) DEFAULT NULL COMMENT 'FinanceBankAccount',
     368  `Treasury` int(11) DEFAULT NULL COMMENT 'FinanceTreasury',
     369  PRIMARY KEY (`Id`),
     370  UNIQUE KEY `BillCode` (`BillCode`),
     371  UNIQUE KEY `BillCode_2` (`BillCode`),
     372  KEY `Subject` (`Subject`),
     373  KEY `Bill` (`Bill`),
     374  KEY `BankAccount` (`BankAccount`),
     375  KEY `Treasury` (`Treasury`)
     376) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6543 ;
     377
     378--
     379-- RELACE PRO TABULKU `FinanceOperation`:
     380--   `Subject`
     381--       `Subject` -> `Id`
     382--   `Bill`
     383--       `FinanceBills` -> `Id`
     384--   `BankAccount`
     385--       `FinanceBankAccount` -> `Id`
     386--   `Treasury`
     387--       `FinanceTreasury` -> `Id`
     388--
     389
     390-- --------------------------------------------------------
     391
     392--
     393-- Struktura tabulky `FinanceOperationItem`
     394--
     395
     396CREATE 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--
     412
     413-- --------------------------------------------------------
     414
     415--
     416-- Struktura tabulky `FinanceSmallAssets`
     417--
     418
     419CREATE TABLE IF NOT EXISTS `FinanceSmallAssets` (
     420  `Id` int(11) NOT NULL AUTO_INCREMENT,
     421  `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     422  `PricePurchase` float NOT NULL DEFAULT '0',
     423  `TimeEnlistment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     424  `TimeElimination` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     425  `SupplySubject` int(11) NOT NULL DEFAULT '0',
     426  `DeviceId` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     427  PRIMARY KEY (`Id`)
     428) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;
     429
     430-- --------------------------------------------------------
     431
     432--
     433-- Struktura tabulky `FinanceTreasury`
     434--
     435
     436CREATE TABLE IF NOT EXISTS `FinanceTreasury` (
     437  `Id` int(11) NOT NULL AUTO_INCREMENT,
     438  `TimeCreate` date NOT NULL,
     439  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     440  PRIMARY KEY (`Id`)
     441) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;
     442
     443-- --------------------------------------------------------
     444
     445--
     446-- Struktura tabulky `FinanceYear`
     447--
     448
     449CREATE TABLE IF NOT EXISTS `FinanceYear` (
     450  `Id` int(11) NOT NULL AUTO_INCREMENT,
     451  `Year` int(11) NOT NULL,
     452  `DateStart` date NOT NULL,
     453  `DateEnd` date NOT NULL,
     454  PRIMARY KEY (`Id`)
     455) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9 ;
     456
     457-- --------------------------------------------------------
     458
     459--
     460-- Struktura tabulky `HostedProject`
     461--
     462
     463CREATE TABLE IF NOT EXISTS `HostedProject` (
     464  `Id` int(11) NOT NULL AUTO_INCREMENT,
     465  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     466  `Homepage` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     467  `User` int(255) NOT NULL COMMENT 'User.Id',
     468  `TimeCreate` datetime NOT NULL,
     469  `Server` int(11) DEFAULT NULL COMMENT 'NetworkDevice.Id',
     470  `Active` int(11) NOT NULL DEFAULT '1',
     471  `WebHosting` int(11) NOT NULL,
     472  PRIMARY KEY (`Id`)
     473) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=16 ;
     474
     475-- --------------------------------------------------------
     476
     477--
     478-- Struktura tabulky `Hyperlink`
     479--
     480
     481CREATE TABLE IF NOT EXISTS `Hyperlink` (
     482  `Id` int(11) NOT NULL AUTO_INCREMENT,
     483  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     484  `URL` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     485  `Group` int(11) NOT NULL,
     486  `IconFile` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     487  `PermissionModule` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     488  `PermissionOperation` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     489  `Enable` int(11) NOT NULL DEFAULT '1',
     490  PRIMARY KEY (`Id`),
     491  KEY `Group` (`Group`),
     492  KEY `Enable` (`Enable`)
     493) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=70 ;
     494
     495--
     496-- RELACE PRO TABULKU `Hyperlink`:
     497--   `Group`
     498--       `HyperlinkGroup` -> `Id`
     499--
     500
     501-- --------------------------------------------------------
     502
     503--
     504-- Struktura tabulky `HyperlinkGroup`
     505--
     506
     507CREATE TABLE IF NOT EXISTS `HyperlinkGroup` (
     508  `Id` int(11) NOT NULL AUTO_INCREMENT,
     509  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     510  PRIMARY KEY (`Id`)
     511) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=10 ;
     512
     513-- --------------------------------------------------------
     514
     515--
     516-- Struktura tabulky `ISMenuItem`
     517--
     518
     519CREATE TABLE IF NOT EXISTS `ISMenuItem` (
     520  `Id` int(11) NOT NULL AUTO_INCREMENT,
     521  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     522  `Parent` int(11) DEFAULT NULL,
     523  `Table` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     524  `IconName` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     525  PRIMARY KEY (`Id`),
     526  KEY `Parent` (`Parent`)
     527) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=38 ;
     528
     529--
     530-- RELACE PRO TABULKU `ISMenuItem`:
     531--   `Parent`
     532--       `ISMenuItem` -> `Id`
     533--
     534
     535-- --------------------------------------------------------
     536
     537--
     538-- Struktura tabulky `Language`
     539--
     540
     541CREATE TABLE IF NOT EXISTS `Language` (
     542  `Id` int(11) NOT NULL AUTO_INCREMENT,
     543  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     544  PRIMARY KEY (`Id`)
     545) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7 ;
     546
     547-- --------------------------------------------------------
     548
     549--
     550-- Struktura tabulky `Log`
     551--
     552
     553CREATE TABLE IF NOT EXISTS `Log` (
     554  `Id` int(11) NOT NULL AUTO_INCREMENT,
     555  `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     556  `User` int(11) DEFAULT NULL,
     557  `Module` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     558  `Operation` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     559  `Value` text COLLATE utf8_czech_ci NOT NULL,
     560  PRIMARY KEY (`Id`),
     561  KEY `Time` (`Time`),
     562  KEY `User` (`User`)
     563) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=41115 ;
     564
     565--
     566-- RELACE PRO TABULKU `Log`:
     567--   `User`
     568--       `User` -> `Id`
     569--
     570
     571-- --------------------------------------------------------
     572
     573--
     574-- Struktura tabulky `MapPosition`
     575--
     576
     577CREATE TABLE IF NOT EXISTS `MapPosition` (
     578  `Id` int(11) NOT NULL AUTO_INCREMENT,
     579  `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
     580  `Latitude` double NOT NULL,
     581  `Longitude` double NOT NULL,
     582  PRIMARY KEY (`Id`)
     583) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=260 ;
     584
     585-- --------------------------------------------------------
     586
     587--
     588-- Struktura tabulky `Meals`
     589--
     590
     591CREATE TABLE IF NOT EXISTS `Meals` (
     592  `Date` date NOT NULL DEFAULT '0000-00-00',
     593  `Soup` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     594  `Meal` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     595  `Status` int(11) NOT NULL DEFAULT '0',
     596  UNIQUE KEY `date` (`Date`)
     597) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;
     598
     599-- --------------------------------------------------------
     600
     601--
     602-- Struktura tabulky `MealsInfo`
     603--
     604
     605CREATE TABLE IF NOT EXISTS `MealsInfo` (
     606  `Info` text COLLATE utf8_czech_ci NOT NULL,
     607  `Price` int(11) NOT NULL DEFAULT '0'
     608) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC;
     609
     610-- --------------------------------------------------------
     611
     612--
     613-- Struktura tabulky `Member`
     614--
     615
     616CREATE TABLE IF NOT EXISTS `Member` (
     617  `Id` int(11) NOT NULL AUTO_INCREMENT,
     618  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     619  `Subject` int(11) NOT NULL,
     620  `ResponsibleUser` int(11) NOT NULL,
     621  `FamilyMemberCount` int(11) NOT NULL,
     622  `MembershipDate` date NOT NULL,
     623  `MemberState` int(11) NOT NULL,
     624  `GPS` int(11) NOT NULL,
     625  `BillingPeriod` int(11) NOT NULL DEFAULT '2',
     626  `NetworkSegment` int(11) DEFAULT NULL,
     627  `BillingPeriodNext` int(11) NOT NULL DEFAULT '2',
     628  `BillingPeriodLastDate` date NOT NULL,
     629  `Hire` float NOT NULL DEFAULT '0',
     630  `Blocked` int(11) NOT NULL DEFAULT '0',
     631  `PayDay` int(11) NOT NULL DEFAULT '1',
     632  PRIMARY KEY (`Id`),
     633  KEY `Subject` (`Subject`),
     634  KEY `ResponsibleUser` (`ResponsibleUser`),
     635  KEY `BillingPeriod` (`BillingPeriod`),
     636  KEY `BillingPeriodNext` (`BillingPeriodNext`),
     637  KEY `NetworkSegment` (`NetworkSegment`)
     638) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=200 ;
     639
     640--
     641-- RELACE PRO TABULKU `Member`:
     642--   `Subject`
     643--       `Subject` -> `Id`
     644--   `ResponsibleUser`
     645--       `User` -> `Id`
     646--   `BillingPeriod`
     647--       `FinanceBillingPeriod` -> `Id`
     648--   `BillingPeriodNext`
     649--       `FinanceBillingPeriod` -> `Id`
     650--
     651
     652-- --------------------------------------------------------
     653
     654--
     655-- Struktura tabulky `MemberPayment`
     656--
     657
     658CREATE TABLE IF NOT EXISTS `MemberPayment` (
     659  `Id` int(11) NOT NULL AUTO_INCREMENT,
     660  `Member` int(11) NOT NULL,
     661  `MonthlyTotal` float NOT NULL,
     662  `MonthlyInternet` float NOT NULL,
     663  `MonthlyConsumption` float NOT NULL,
     664  `NetworkDevice` float NOT NULL,
     665  `MonthlyPlus` float NOT NULL,
     666  `Cash` float NOT NULL,
     667  PRIMARY KEY (`Id`),
     668  KEY `Member` (`Member`)
     669) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=182 ;
     670
     671--
     672-- RELACE PRO TABULKU `MemberPayment`:
     673--   `Member`
     674--       `Member` -> `Id`
     675--
     676
     677-- --------------------------------------------------------
     678
     679--
     680-- Struktura tabulky `MeteoStation`
     681--
     682
     683CREATE TABLE IF NOT EXISTS `MeteoStation` (
     684  `Id` int(11) NOT NULL AUTO_INCREMENT,
     685  `Name` varchar(255) NOT NULL,
     686  `URL` varchar(255) NOT NULL,
     687  `Enabled` tinyint(1) NOT NULL,
     688  `Period` int(11) NOT NULL,
     689  `Model` varchar(255) NOT NULL,
     690  PRIMARY KEY (`Id`)
     691) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     692
     693-- --------------------------------------------------------
     694
     695--
     696-- Struktura tabulky `MeteoStationMeasure`
     697--
     698
     699CREATE TABLE IF NOT EXISTS `MeteoStationMeasure` (
     700  `Id` int(11) NOT NULL AUTO_INCREMENT,
     701  `Time` datetime NOT NULL,
     702  `MeteoStation` int(11) NOT NULL,
     703  `WindSpeed` float NOT NULL,
     704  `WindDir` float NOT NULL,
     705  `WindGust` float NOT NULL,
     706  `Pressure` float NOT NULL,
     707  `SysTemp` float NOT NULL,
     708  `Temperature` float NOT NULL,
     709  `BarAltitude` float NOT NULL,
     710  `WindChill` float NOT NULL,
     711  `RelHumidity` float NOT NULL,
     712  `AbsHumidity` float NOT NULL,
     713  `DewPoint` float NOT NULL,
     714  PRIMARY KEY (`Id`),
     715  KEY `MeteoStation` (`MeteoStation`)
     716) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     717
     718--
     719-- RELACE PRO TABULKU `MeteoStationMeasure`:
     720--   `MeteoStation`
     721--       `MeteoStation` -> `Id`
     722--
     723
     724-- --------------------------------------------------------
     725
     726--
     727-- Struktura tabulky `NetworkAP`
     728--
     729
     730CREATE TABLE IF NOT EXISTS `NetworkAP` (
     731  `Id` int(11) NOT NULL AUTO_INCREMENT,
     732  `SSID` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     733  `Frequency` int(11) NOT NULL,
     734  `ChannelWidth` int(11) NOT NULL DEFAULT '20',
     735  `NetworkDevice` int(11) DEFAULT NULL,
     736  PRIMARY KEY (`Id`),
     737  KEY `NetworkDevice` (`NetworkDevice`)
     738) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=45 ;
     739
     740--
     741-- RELACE PRO TABULKU `NetworkAP`:
     742--   `NetworkDevice`
     743--       `NetworkDevice` -> `Id`
     744--
     745
     746-- --------------------------------------------------------
     747
     748--
     749-- Struktura tabulky `NetworkConfiguration`
     750--
     751
     752CREATE TABLE IF NOT EXISTS `NetworkConfiguration` (
     753  `Id` int(11) NOT NULL AUTO_INCREMENT,
     754  `Caption` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     755  `Execute` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     756  `Changed` int(11) NOT NULL DEFAULT '0',
     757  `LastTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     758  `ExecutionTime` int(11) NOT NULL,
     759  `Enabled` int(11) NOT NULL DEFAULT '1',
     760  `Period` int(11) NOT NULL DEFAULT '60',
     761  `Log` mediumtext COLLATE utf8_czech_ci NOT NULL,
     762  PRIMARY KEY (`Id`)
     763) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ;
     764
     765-- --------------------------------------------------------
     766
     767--
     768-- Struktura tabulky `NetworkDevice`
     769--
     770
     771CREATE TABLE IF NOT EXISTS `NetworkDevice` (
     772  `Id` int(11) NOT NULL AUTO_INCREMENT,
     773  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     774  `Member` int(11) NOT NULL COMMENT 'Member',
     775  `Location` int(11) NOT NULL COMMENT 'Member',
     776  `Type` int(11) NOT NULL COMMENT 'NetworkDeviceType',
     777  `Used` int(11) NOT NULL DEFAULT '1',
     778  `Online` int(11) NOT NULL DEFAULT '0',
     779  `LastOnline` datetime NOT NULL,
     780  `PermanentOnline` int(11) NOT NULL DEFAULT '0',
     781  `InboundNATPriority` int(11) NOT NULL DEFAULT '1',
     782  `MapPosition` int(11) DEFAULT NULL,
     783  PRIMARY KEY (`Id`),
     784  UNIQUE KEY `Name` (`Name`),
     785  KEY `Member` (`Member`),
     786  KEY `Location` (`Location`),
     787  KEY `Type` (`Type`),
     788  KEY `MapPosition` (`MapPosition`)
     789) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=644 ;
     790
     791--
     792-- RELACE PRO TABULKU `NetworkDevice`:
     793--   `Member`
     794--       `Member` -> `Id`
     795--   `Location`
     796--       `Member` -> `Id`
     797--   `Type`
     798--       `NetworkDeviceType` -> `Id`
     799--   `MapPosition`
     800--       `MapPosition` -> `Id`
     801--
     802
     803-- --------------------------------------------------------
     804
     805--
     806-- Struktura tabulky `NetworkDeviceConfig`
     807--
     808
     809CREATE TABLE IF NOT EXISTS `NetworkDeviceConfig` (
     810  `Id` int(11) NOT NULL AUTO_INCREMENT,
     811  `Device` int(11) NOT NULL,
     812  `Time` date NOT NULL,
     813  `ConfigFull` mediumtext NOT NULL,
     814  `ConfigCompact` mediumtext NOT NULL,
     815  PRIMARY KEY (`Id`),
     816  KEY `Time` (`Time`),
     817  KEY `Device` (`Device`)
     818) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     819
     820--
     821-- RELACE PRO TABULKU `NetworkDeviceConfig`:
     822--   `Device`
     823--       `NetworkDevice` -> `Id`
     824--
     825
     826-- --------------------------------------------------------
     827
     828--
     829-- Struktura tabulky `NetworkDeviceHistory`
     830--
     831
     832CREATE TABLE IF NOT EXISTS `NetworkDeviceHistory` (
     833  `Id` int(11) NOT NULL AUTO_INCREMENT,
     834  `Device` int(11) NOT NULL DEFAULT '0',
     835  `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     836  `Action` int(11) NOT NULL DEFAULT '0',
     837  `Notice` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     838  PRIMARY KEY (`Id`),
     839  KEY `Device` (`Device`)
     840) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;
     841
     842-- --------------------------------------------------------
     843
     844--
     845-- Struktura tabulky `NetworkDeviceType`
     846--
     847
     848CREATE TABLE IF NOT EXISTS `NetworkDeviceType` (
     849  `Id` int(11) NOT NULL AUTO_INCREMENT,
     850  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     851  `ShowOnline` int(11) NOT NULL DEFAULT '0',
     852  `IconName` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     853  PRIMARY KEY (`Id`)
     854) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ;
     855
     856-- --------------------------------------------------------
     857
     858--
     859-- Struktura tabulky `NetworkDomainAlias`
     860--
     861
     862CREATE TABLE IF NOT EXISTS `NetworkDomainAlias` (
     863  `Id` int(11) NOT NULL AUTO_INCREMENT,
     864  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     865  `Target` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     866  `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     867  PRIMARY KEY (`Id`),
     868  UNIQUE KEY `Name` (`Name`,`Target`),
     869  UNIQUE KEY `Name_2` (`Name`,`Target`)
     870) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=39 ;
     871
     872-- --------------------------------------------------------
     873
     874--
     875-- Struktura tabulky `NetworkFirewall`
     876--
     877
     878CREATE TABLE IF NOT EXISTS `NetworkFirewall` (
     879  `Id` int(11) NOT NULL AUTO_INCREMENT,
     880  `NetworkDevice` int(11) NOT NULL,
     881  `SourceInterface` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     882  `DestinationInterface` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     883  `SourceAddress` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     884  `DestinationAddress` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     885  `SourcePort` int(11) DEFAULT NULL,
     886  `DestinationPort` int(11) DEFAULT NULL,
     887  `Action` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     888  `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     889  PRIMARY KEY (`Id`),
     890  KEY `NetworkDevice` (`NetworkDevice`)
     891) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ;
     892
     893--
     894-- RELACE PRO TABULKU `NetworkFirewall`:
     895--   `NetworkDevice`
     896--       `NetworkDevice` -> `Id`
     897--
     898
     899-- --------------------------------------------------------
     900
     901--
     902-- Struktura tabulky `NetworkInterface`
     903--
     904
     905CREATE TABLE IF NOT EXISTS `NetworkInterface` (
     906  `Id` int(11) NOT NULL AUTO_INCREMENT,
     907  `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     908  `Type` int(11) NOT NULL,
     909  `MAC` varchar(17) COLLATE utf8_czech_ci NOT NULL,
     910  `LocalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     911  `IPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     912  `ExternalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     913  `Device` int(11) NOT NULL,
     914  `Online` int(11) NOT NULL DEFAULT '0',
     915  `LastOnline` datetime NOT NULL,
     916  PRIMARY KEY (`Id`),
     917  KEY `Device` (`Device`),
     918  KEY `Type` (`Type`)
     919) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=711 ;
     920
     921--
     922-- RELACE PRO TABULKU `NetworkInterface`:
     923--   `Type`
     924--       `NetworkInterfaceType` -> `Id`
     925--   `Device`
     926--       `NetworkDevice` -> `Id`
     927--
     928
     929-- --------------------------------------------------------
     930
     931--
     932-- Struktura tabulky `NetworkInterfacePortable`
     933--
     934
     935CREATE TABLE IF NOT EXISTS `NetworkInterfacePortable` (
     936  `Id` int(11) NOT NULL AUTO_INCREMENT,
     937  `NetworkInterface` int(11) NOT NULL,
     938  `DynamicIP` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     939  `Time` datetime NOT NULL,
     940  `Update` int(11) NOT NULL,
     941  PRIMARY KEY (`Id`),
     942  KEY `NetworkInterface` (`NetworkInterface`),
     943  KEY `Update` (`Update`)
     944) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;
     945
     946-- --------------------------------------------------------
     947
     948--
     949-- Struktura tabulky `NetworkInterfaceStat`
     950--
     951
     952CREATE TABLE IF NOT EXISTS `NetworkInterfaceStat` (
     953  `NetworkInterface` int(11) NOT NULL DEFAULT '0',
     954  `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     955  `PingCount` smallint(11) NOT NULL DEFAULT '0',
     956  KEY `host_id` (`NetworkInterface`),
     957  KEY `time` (`Time`)
     958) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
     959
     960-- --------------------------------------------------------
     961
     962--
     963-- Struktura tabulky `NetworkInterfaceType`
     964--
     965
     966CREATE TABLE IF NOT EXISTS `NetworkInterfaceType` (
     967  `Id` int(11) NOT NULL AUTO_INCREMENT,
     968  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     969  `MaxSpeed` int(11) NOT NULL,
     970  `FullDuplex` int(11) NOT NULL DEFAULT '1',
     971  `Color` varchar(6) COLLATE utf8_czech_ci NOT NULL DEFAULT 'ffffff',
     972  PRIMARY KEY (`Id`)
     973) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ;
     974
     975-- --------------------------------------------------------
     976
     977--
     978-- Struktura tabulky `NetworkLink`
     979--
     980
     981CREATE TABLE IF NOT EXISTS `NetworkLink` (
     982  `Id` int(11) NOT NULL AUTO_INCREMENT,
     983  `Type` int(11) NOT NULL,
     984  `Interface1` int(11) NOT NULL,
     985  `Interface2` int(11) NOT NULL,
     986  PRIMARY KEY (`Id`),
     987  KEY `Interface1` (`Interface1`),
     988  KEY `Interface2` (`Interface2`)
     989) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=357 ;
     990
     991--
     992-- RELACE PRO TABULKU `NetworkLink`:
     993--   `Interface1`
     994--       `NetworkInterface` -> `Id`
     995--   `Interface2`
     996--       `NetworkInterface` -> `Id`
     997--
     998
     999-- --------------------------------------------------------
     1000
     1001--
     1002-- Struktura tabulky `NetworkMangleSubgroup`
     1003--
     1004
     1005CREATE TABLE IF NOT EXISTS `NetworkMangleSubgroup` (
     1006  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1007  `AddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1008  PRIMARY KEY (`Id`),
     1009  KEY `AddressRange` (`AddressRange`)
     1010) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=147 ;
     1011
     1012-- --------------------------------------------------------
     1013
     1014--
     1015-- Struktura tabulky `NetworkMark`
     1016--
     1017
     1018CREATE TABLE IF NOT EXISTS `NetworkMark` (
     1019  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1020  `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1021  PRIMARY KEY (`Id`),
     1022  KEY `Comment` (`Comment`)
     1023) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1422 ;
     1024
     1025-- --------------------------------------------------------
     1026
     1027--
     1028-- Struktura tabulky `NetworkSegment`
     1029--
     1030
     1031CREATE TABLE IF NOT EXISTS `NetworkSegment` (
     1032  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1033  `Name` varchar(128) COLLATE utf8_czech_ci NOT NULL,
     1034  `Price` int(11) NOT NULL DEFAULT '0',
     1035  `Parent` int(11) DEFAULT '0',
     1036  `Users` int(11) NOT NULL DEFAULT '0',
     1037  `Consumption` int(11) NOT NULL DEFAULT '0',
     1038  `UsersOverheads` int(11) NOT NULL DEFAULT '0',
     1039  PRIMARY KEY (`Id`),
     1040  KEY `Parent` (`Parent`)
     1041) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=33 ;
     1042
     1043--
     1044-- RELACE PRO TABULKU `NetworkSegment`:
     1045--   `Parent`
     1046--       `NetworkSegment` -> `Id`
     1047--
     1048
     1049-- --------------------------------------------------------
     1050
     1051--
     1052-- Struktura tabulky `NetworkSubnet`
     1053--
     1054
     1055CREATE TABLE IF NOT EXISTS `NetworkSubnet` (
     1056  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1057  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1058  `AddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1059  `Mask` int(11) NOT NULL,
     1060  `DHCP` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1061  `Gateway` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1062  `WINS` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1063  `DNS` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1064  `Domain` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1065  `NTP` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1066  `Member` int(11) DEFAULT NULL,
     1067  `ExtAddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1068  `ExtMask` int(11) NOT NULL DEFAULT '32',
     1069  `AddressRangeIPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1070  `Configure` int(11) NOT NULL DEFAULT '1',
     1071  PRIMARY KEY (`Id`),
     1072  KEY `Member` (`Member`),
     1073  KEY `Configure` (`Configure`)
     1074) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=44 ;
     1075
     1076--
     1077-- RELACE PRO TABULKU `NetworkSubnet`:
     1078--   `Member`
     1079--       `Member` -> `Id`
     1080--
     1081
     1082-- --------------------------------------------------------
     1083
     1084--
     1085-- Struktura tabulky `NetworkTopology`
     1086--
     1087
     1088CREATE TABLE IF NOT EXISTS `NetworkTopology` (
     1089  `Host` int(11) NOT NULL DEFAULT '0',
     1090  `Depth` int(11) NOT NULL DEFAULT '0',
     1091  `Pos` int(11) NOT NULL DEFAULT '0',
     1092  `First` int(11) NOT NULL DEFAULT '0',
     1093  `Last` int(11) NOT NULL DEFAULT '0',
     1094  PRIMARY KEY (`Host`)
     1095) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
     1096
     1097-- --------------------------------------------------------
     1098
     1099--
     1100-- Struktura tabulky `News`
     1101--
     1102
     1103CREATE TABLE IF NOT EXISTS `News` (
     1104  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1105  `Title` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1106  `Content` text COLLATE utf8_czech_ci NOT NULL,
     1107  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1108  `TargetDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1109  `Author` varchar(32) COLLATE utf8_czech_ci NOT NULL,
     1110  `IP` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     1111  `Category` int(11) DEFAULT '0',
     1112  `Enclosure` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1113  `User` int(11) DEFAULT NULL,
     1114  `Link` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1115  PRIMARY KEY (`Id`),
     1116  KEY `category` (`Category`),
     1117  KEY `date` (`Date`),
     1118  KEY `Title` (`Title`),
     1119  KEY `Link` (`Link`),
     1120  KEY `User` (`User`)
     1121) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=973330 ;
     1122
     1123--
     1124-- RELACE PRO TABULKU `News`:
     1125--   `Category`
     1126--       `NewsCategory` -> `Id`
     1127--   `User`
     1128--       `User` -> `Id`
     1129--
     1130
     1131-- --------------------------------------------------------
     1132
     1133--
     1134-- Struktura tabulky `NewsCategory`
     1135--
     1136
     1137CREATE TABLE IF NOT EXISTS `NewsCategory` (
     1138  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1139  `Caption` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1140  `Permission` int(11) NOT NULL DEFAULT '0',
     1141  `Sequence` int(11) NOT NULL,
     1142  `Group` int(11) NOT NULL DEFAULT '1',
     1143  `RSS` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1144  PRIMARY KEY (`Id`),
     1145  KEY `Sequence` (`Sequence`),
     1146  KEY `Group` (`Group`)
     1147) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17 ;
     1148
     1149-- --------------------------------------------------------
     1150
     1151--
     1152-- Struktura tabulky `Panel`
     1153--
     1154
     1155CREATE TABLE IF NOT EXISTS `Panel` (
     1156  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1157  `Module` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1158  `Parameters` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1159  `Order` int(11) NOT NULL,
     1160  `PanelColumn` int(11) NOT NULL,
     1161  PRIMARY KEY (`Id`),
     1162  KEY `PanelColumn` (`PanelColumn`)
     1163) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ;
     1164
     1165--
     1166-- RELACE PRO TABULKU `Panel`:
     1167--   `PanelColumn`
     1168--       `PanelColumn` -> `Id`
     1169--
     1170
     1171-- --------------------------------------------------------
     1172
     1173--
     1174-- Struktura tabulky `PanelColumn`
     1175--
     1176
     1177CREATE TABLE IF NOT EXISTS `PanelColumn` (
     1178  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1179  `Width` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1180  PRIMARY KEY (`Id`)
     1181) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;
     1182
     1183-- --------------------------------------------------------
     1184
     1185--
     1186-- Struktura tabulky `PermissionGroup`
     1187--
     1188
     1189CREATE TABLE IF NOT EXISTS `PermissionGroup` (
     1190  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1191  `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1192  PRIMARY KEY (`Id`)
     1193) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ;
     1194
     1195-- --------------------------------------------------------
     1196
     1197--
     1198-- Struktura tabulky `PermissionGroupAssignment`
     1199--
     1200
     1201CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` (
     1202  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1203  `Group` int(11) NOT NULL DEFAULT '0',
     1204  `AssignedGroup` int(11) DEFAULT NULL,
     1205  `AssignedOperation` int(11) DEFAULT NULL,
     1206  PRIMARY KEY (`Id`),
     1207  KEY `Group` (`Group`),
     1208  KEY `AssignedGroup` (`AssignedGroup`),
     1209  KEY `AssignedOperation` (`AssignedOperation`)
     1210) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=48 ;
     1211
     1212--
     1213-- RELACE PRO TABULKU `PermissionGroupAssignment`:
     1214--   `Group`
     1215--       `PermissionGroup` -> `Id`
     1216--   `AssignedGroup`
     1217--       `PermissionGroup` -> `Id`
     1218--   `AssignedOperation`
     1219--       `PermissionOperation` -> `Id`
     1220--
     1221
     1222-- --------------------------------------------------------
     1223
     1224--
     1225-- Struktura tabulky `PermissionOperation`
     1226--
     1227
     1228CREATE TABLE IF NOT EXISTS `PermissionOperation` (
     1229  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1230  `Module` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1231  `Operation` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1232  `Item` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1233  `ItemId` int(11) NOT NULL DEFAULT '0',
     1234  PRIMARY KEY (`Id`),
     1235  KEY `Module` (`Module`),
     1236  KEY `Operation` (`Operation`),
     1237  KEY `Item` (`Item`),
     1238  KEY `ItemId` (`ItemId`)
     1239) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=45 ;
     1240
     1241-- --------------------------------------------------------
     1242
     1243--
     1244-- Struktura tabulky `PermissionUserAssignment`
     1245--
     1246
     1247CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` (
     1248  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1249  `User` int(11) NOT NULL DEFAULT '0',
     1250  `AssignedGroup` int(11) DEFAULT NULL,
     1251  `AssignedOperation` int(11) DEFAULT NULL,
     1252  PRIMARY KEY (`Id`),
     1253  KEY `User` (`User`),
     1254  KEY `AssignedGroup` (`AssignedGroup`),
     1255  KEY `AssignedOperation` (`AssignedOperation`)
     1256) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=226 ;
     1257
     1258--
     1259-- RELACE PRO TABULKU `PermissionUserAssignment`:
     1260--   `User`
     1261--       `User` -> `Id`
     1262--   `AssignedGroup`
     1263--       `PermissionGroup` -> `Id`
     1264--   `AssignedOperation`
     1265--       `PermissionOperation` -> `Id`
     1266--
     1267
     1268-- --------------------------------------------------------
     1269
     1270--
     1271-- Struktura tabulky `PhoneBook`
     1272--
     1273
     1274CREATE TABLE IF NOT EXISTS `PhoneBook` (
     1275  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1276  `Number` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1277  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1278  `Address` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1279  `LastUpdate` datetime NOT NULL,
     1280  `Operator` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1281  PRIMARY KEY (`Id`)
     1282) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=53 ;
     1283
     1284-- --------------------------------------------------------
     1285
     1286--
     1287-- Struktura tabulky `Product`
     1288--
     1289
     1290CREATE TABLE IF NOT EXISTS `Product` (
     1291  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1292  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1293  `SellPrice` float NOT NULL,
     1294  `BuyPrice` float NOT NULL,
     1295  `VAT` float DEFAULT NULL,
     1296  `Consumption` int(11) DEFAULT NULL COMMENT 'In Watts',
     1297  `Supplier` int(11) DEFAULT NULL COMMENT 'Subject',
     1298  `Manufacturer` int(11) DEFAULT NULL,
     1299  `Code` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     1300  `UnitOfMeasure` int(11) NOT NULL,
     1301  PRIMARY KEY (`Id`),
     1302  UNIQUE KEY `Code` (`Code`),
     1303  KEY `Supplier` (`Supplier`),
     1304  KEY `UnitOfMeasure` (`UnitOfMeasure`),
     1305  KEY `Manufacturer` (`Manufacturer`)
     1306) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=180 ;
     1307
     1308--
     1309-- RELACE PRO TABULKU `Product`:
     1310--   `Supplier`
     1311--       `Subject` -> `Id`
     1312--   `Manufacturer`
     1313--       `Subject` -> `Id`
     1314--   `UnitOfMeasure`
     1315--       `UnitOfMeasure` -> `Id`
     1316--
     1317
     1318-- --------------------------------------------------------
     1319
     1320--
     1321-- Struktura tabulky `Service`
     1322--
     1323
     1324CREATE TABLE IF NOT EXISTS `Service` (
     1325  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1326  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1327  `Category` int(11) NOT NULL,
     1328  `Price` int(11) NOT NULL,
     1329  `CustomerCount` int(11) NOT NULL,
     1330  `ReplaceId` int(11) DEFAULT NULL,
     1331  `Public` int(11) NOT NULL,
     1332  `InternetSpeedMin` int(11) NOT NULL,
     1333  `InternetSpeedMax` int(11) NOT NULL,
     1334  `UploadAsymmetry` int(11) NOT NULL,
     1335  `Memory` int(11) NOT NULL,
     1336  `MemorySwap` int(11) NOT NULL,
     1337  `Storage` int(11) NOT NULL,
     1338  `CPUCount` int(11) NOT NULL,
     1339  PRIMARY KEY (`Id`),
     1340  KEY `Category` (`Category`),
     1341  KEY `Public` (`Public`),
     1342  KEY `ReplaceId` (`ReplaceId`)
     1343) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=16 ;
     1344
     1345--
     1346-- RELACE PRO TABULKU `Service`:
     1347--   `Category`
     1348--       `ServiceCategory` -> `Id`
     1349--   `ReplaceId`
     1350--       `Service` -> `Id`
     1351--
     1352
     1353-- --------------------------------------------------------
     1354
     1355--
     1356-- Struktura tabulky `ServiceCategory`
     1357--
     1358
     1359CREATE TABLE IF NOT EXISTS `ServiceCategory` (
     1360  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1361  `Name` varchar(255) NOT NULL,
     1362  PRIMARY KEY (`Id`)
     1363) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
     1364
     1365-- --------------------------------------------------------
     1366
     1367--
     1368-- Struktura tabulky `ServiceCustomerRel`
     1369--
     1370
     1371CREATE TABLE IF NOT EXISTS `ServiceCustomerRel` (
     1372  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1373  `Service` int(11) NOT NULL,
     1374  `Customer` int(11) NOT NULL,
     1375  `Period` int(11) NOT NULL,
     1376  PRIMARY KEY (`Id`),
     1377  KEY `Service` (`Service`),
     1378  KEY `Customer` (`Customer`)
     1379) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=437 ;
     1380
     1381--
     1382-- RELACE PRO TABULKU `ServiceCustomerRel`:
     1383--   `Customer`
     1384--       `Member` -> `Id`
     1385--
     1386
     1387-- --------------------------------------------------------
     1388
     1389--
     1390-- Struktura tabulky `Stock`
     1391--
     1392
     1393CREATE TABLE IF NOT EXISTS `Stock` (
     1394  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1395  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1396  `Location` int(11) DEFAULT NULL,
     1397  PRIMARY KEY (`Id`),
     1398  KEY `Location` (`Location`)
     1399) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ;
     1400
     1401--
     1402-- RELACE PRO TABULKU `Stock`:
     1403--   `Location`
     1404--       `Member` -> `Id`
     1405--
     1406
     1407-- --------------------------------------------------------
     1408
     1409--
     1410-- Struktura tabulky `StockItem`
     1411--
     1412
     1413CREATE TABLE IF NOT EXISTS `StockItem` (
     1414  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1415  `Stock` int(11) NOT NULL,
     1416  `Product` int(11) NOT NULL,
     1417  `TimeEnlistment` date NOT NULL,
     1418  `TimeElimination` date DEFAULT NULL,
     1419  `BuyPrice` decimal(10,0) NOT NULL,
     1420  `SellPrice` decimal(10,0) NOT NULL,
     1421  `Amount` float NOT NULL,
     1422  `SerialNumber` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     1423  `RegNumber` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
     1424  `Location` int(11) DEFAULT NULL COMMENT 'Member',
     1425  `Segment` int(11) DEFAULT NULL,
     1426  `Info` text COLLATE utf8_czech_ci NOT NULL,
     1427  PRIMARY KEY (`Id`),
     1428  UNIQUE KEY `SerialNumber` (`SerialNumber`),
     1429  UNIQUE KEY `RegNumber` (`RegNumber`),
     1430  KEY `Product` (`Product`),
     1431  KEY `Stock` (`Stock`),
     1432  KEY `Segment` (`Segment`),
     1433  KEY `Location` (`Location`)
     1434) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=182 ;
     1435
     1436--
     1437-- RELACE PRO TABULKU `StockItem`:
     1438--   `Stock`
     1439--       `Stock` -> `Id`
     1440--   `Location`
     1441--       `Member` -> `Id`
     1442--   `Product`
     1443--       `Product` -> `Id`
     1444--   `Segment`
     1445--       `NetworkSegment` -> `Id`
     1446--
     1447
     1448-- --------------------------------------------------------
     1449
     1450--
     1451-- Struktura tabulky `Subject`
     1452--
     1453
     1454CREATE TABLE IF NOT EXISTS `Subject` (
     1455  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1456  `Name` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1457  `AddressStreet` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1458  `AddressTown` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1459  `AddressPSC` int(11) NOT NULL DEFAULT '0',
     1460  `AddressCountry` int(11) NOT NULL,
     1461  `IC` varchar(32) COLLATE utf8_czech_ci NOT NULL,
     1462  `DIC` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1463  `PayVAT` int(11) NOT NULL,
     1464  `MapPositionX` float NOT NULL DEFAULT '0',
     1465  `MapPositionY` float NOT NULL DEFAULT '0',
     1466  `WWW` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1467  `Note` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1468  PRIMARY KEY (`Id`),
     1469  KEY `AddressCountry` (`AddressCountry`)
     1470) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=231 ;
     1471
     1472--
     1473-- RELACE PRO TABULKU `Subject`:
     1474--   `AddressCountry`
     1475--       `Country` -> `Id`
     1476--
     1477
     1478-- --------------------------------------------------------
     1479
     1480--
     1481-- Struktura tabulky `SubjectOpenTime`
     1482--
     1483
     1484CREATE TABLE IF NOT EXISTS `SubjectOpenTime` (
     1485  `Subject` int(11) NOT NULL DEFAULT '0',
     1486  `UpdateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1487  `Notice` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1488  `Photo` int(11) NOT NULL,
     1489  KEY `Subject` (`Subject`)
     1490) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
     1491
     1492--
     1493-- RELACE PRO TABULKU `SubjectOpenTime`:
     1494--   `Subject`
     1495--       `Subject` -> `Id`
     1496--
     1497
     1498-- --------------------------------------------------------
     1499
     1500--
     1501-- Struktura tabulky `SubjectOpenTimeDay`
     1502--
     1503
     1504CREATE TABLE IF NOT EXISTS `SubjectOpenTimeDay` (
     1505  `Subject` int(11) NOT NULL,
     1506  `Day` int(11) NOT NULL,
     1507  `Open1` int(11) NOT NULL,
     1508  `Close1` int(11) NOT NULL,
     1509  `Open2` int(11) NOT NULL,
     1510  `Close2` int(11) NOT NULL,
     1511  KEY `Subject` (`Subject`)
     1512) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;
     1513
     1514--
     1515-- RELACE PRO TABULKU `SubjectOpenTimeDay`:
     1516--   `Subject`
     1517--       `Subject` -> `Id`
     1518--
     1519
     1520-- --------------------------------------------------------
     1521
     1522--
     1523-- Struktura tabulky `SystemVersion`
     1524--
     1525
     1526CREATE TABLE IF NOT EXISTS `SystemVersion` (
     1527  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1528  `Revision` int(11) NOT NULL,
     1529  PRIMARY KEY (`Id`)
     1530) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
     1531
     1532-- --------------------------------------------------------
     1533
     1534--
     1535-- Struktura tabulky `Task`
     1536--
     1537
     1538CREATE TABLE IF NOT EXISTS `Task` (
     1539  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1540  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1541  `Description` text COLLATE utf8_czech_ci NOT NULL,
     1542  `TimeCreate` date NOT NULL,
     1543  `TimeDue` date DEFAULT NULL,
     1544  `TimeClose` date DEFAULT NULL,
     1545  `Priority` int(11) NOT NULL,
     1546  `Conclusion` text COLLATE utf8_czech_ci NOT NULL,
     1547  `Public` int(11) NOT NULL,
     1548  `Progress` int(11) NOT NULL,
     1549  `Group` int(11) DEFAULT NULL,
     1550  `AssignedTo` int(11) DEFAULT NULL,
     1551  PRIMARY KEY (`Id`),
     1552  KEY `Group` (`Group`),
     1553  KEY `AssignedTo` (`AssignedTo`)
     1554) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ;
     1555
     1556--
     1557-- RELACE PRO TABULKU `Task`:
     1558--   `Group`
     1559--       `TaskGroup` -> `Id`
     1560--   `AssignedTo`
     1561--       `User` -> `Id`
     1562--
     1563
     1564-- --------------------------------------------------------
     1565
     1566--
     1567-- Struktura tabulky `TaskGroup`
     1568--
     1569
     1570CREATE TABLE IF NOT EXISTS `TaskGroup` (
     1571  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1572  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1573  `Description` text COLLATE utf8_czech_ci NOT NULL,
     1574  `Parent` int(11) DEFAULT NULL,
     1575  PRIMARY KEY (`Id`),
     1576  KEY `Parent` (`Parent`)
     1577) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ;
     1578
     1579--
     1580-- RELACE PRO TABULKU `TaskGroup`:
     1581--   `Parent`
     1582--       `TaskGroup` -> `Id`
     1583--
     1584
     1585-- --------------------------------------------------------
     1586
     1587--
     1588-- Struktura tabulky `TV`
     1589--
     1590
     1591CREATE TABLE IF NOT EXISTS `TV` (
     1592  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1593  `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     1594  `Frequency` int(11) NOT NULL DEFAULT '0',
     1595  `Norm` varchar(8) COLLATE utf8_czech_ci NOT NULL,
     1596  `Homepage` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1597  `Language` int(11) DEFAULT NULL,
     1598  `ShortName` varchar(16) COLLATE utf8_czech_ci NOT NULL,
     1599  `Stream` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1600  `StreamWeb` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1601  `SourceType` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1602  `Category` int(11) DEFAULT NULL,
     1603  PRIMARY KEY (`Id`),
     1604  UNIQUE KEY `ShortName` (`ShortName`),
     1605  KEY `Language` (`Language`),
     1606  KEY `Category` (`Category`)
     1607) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=46 ;
     1608
     1609--
     1610-- RELACE PRO TABULKU `TV`:
     1611--   `Language`
     1612--       `Language` -> `Id`
     1613--   `Category`
     1614--       `TVGroup` -> `Id`
     1615--
     1616
     1617-- --------------------------------------------------------
     1618
     1619--
     1620-- Struktura tabulky `TVGroup`
     1621--
     1622
     1623CREATE TABLE IF NOT EXISTS `TVGroup` (
     1624  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1625  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1626  PRIMARY KEY (`Id`)
     1627) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7 ;
     1628
     1629-- --------------------------------------------------------
     1630
     1631--
     1632-- Struktura tabulky `UnitOfMeasure`
     1633--
     1634
     1635CREATE TABLE IF NOT EXISTS `UnitOfMeasure` (
     1636  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1637  `Unit` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1638  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1639  PRIMARY KEY (`Id`)
     1640) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ;
     1641
     1642-- --------------------------------------------------------
     1643
     1644--
     1645-- Struktura tabulky `User`
     1646--
     1647
     1648CREATE TABLE IF NOT EXISTS `User` (
     1649  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1650  `Login` varchar(64) COLLATE utf8_czech_ci NOT NULL,
     1651  `Name` varchar(128) COLLATE utf8_czech_ci NOT NULL,
     1652  `Password` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1653  `Salt` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1654  `Email` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1655  `LastIpAddress` varchar(16) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1656  `LastLoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1657  `RegistrationTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1658  `Locked` tinyint(1) NOT NULL DEFAULT '0',
     1659  `ICQ` int(11) NOT NULL DEFAULT '0',
     1660  `PhoneNumber` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1661  `InitPassword` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1662  PRIMARY KEY (`Id`),
     1663  UNIQUE KEY `Name` (`Login`),
     1664  UNIQUE KEY `Nick` (`Name`)
     1665) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=252 ;
     1666
     1667-- --------------------------------------------------------
     1668
     1669--
     1670-- Struktura tabulky `UserCustomerRel`
     1671--
     1672
     1673CREATE TABLE IF NOT EXISTS `UserCustomerRel` (
     1674  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1675  `Customer` int(11) NOT NULL,
     1676  `User` int(11) NOT NULL,
     1677  PRIMARY KEY (`Id`),
     1678  KEY `Customer` (`Customer`),
     1679  KEY `User` (`User`)
     1680) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=520 ;
     1681
     1682--
     1683-- RELACE PRO TABULKU `UserCustomerRel`:
     1684--   `Customer`
     1685--       `Member` -> `Id`
     1686--   `User`
     1687--       `User` -> `Id`
     1688--
     1689
     1690-- --------------------------------------------------------
     1691
     1692--
     1693-- Struktura tabulky `UserOnline`
     1694--
     1695
     1696CREATE TABLE IF NOT EXISTS `UserOnline` (
     1697  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1698  `User` int(11) NOT NULL DEFAULT '0' COMMENT 'User.Id',
     1699  `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1700  `LoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
     1701  `SessionId` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1702  `IpAddress` varchar(16) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1703  `HostName` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '',
     1704  `ScriptName` varchar(255) COLLATE utf8_czech_ci NOT NULL,
     1705  PRIMARY KEY (`Id`),
     1706  KEY `User` (`User`)
     1707) ENGINE=MEMORY  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;
     1708
     1709-- --------------------------------------------------------
     1710
     1711--
     1712-- Struktura tabulky `Work`
     1713--
     1714
     1715CREATE TABLE IF NOT EXISTS `Work` (
     1716  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1717  `Name` varchar(255) NOT NULL,
     1718  `Description` text,
     1719  `TimeStart` datetime NOT NULL,
     1720  `Duration` float NOT NULL,
     1721  `User` int(11) DEFAULT NULL,
     1722  `Task` int(11) DEFAULT NULL,
     1723  PRIMARY KEY (`Id`),
     1724  KEY `User` (`User`),
     1725  KEY `Task` (`Task`),
     1726  KEY `TimeStart` (`TimeStart`)
     1727) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
     1728
     1729--
     1730-- RELACE PRO TABULKU `Work`:
     1731--   `User`
     1732--       `User` -> `Id`
     1733--   `Task`
     1734--       `Task` -> `Id`
     1735--
     1736
     1737--
     1738-- Omezení pro exportované tabulky
     1739--
     1740
     1741--
     1742-- Omezení pro tabulku `DocumentLineSequence`
     1743--
     1744ALTER TABLE `DocumentLineSequence`
     1745  ADD CONSTRAINT `DocumentLineSequence_ibfk_1` FOREIGN KEY (`DocumentLine`) REFERENCES `DocumentLine` (`Id`),
     1746  ADD CONSTRAINT `DocumentLineSequence_ibfk_2` FOREIGN KEY (`FinanceYear`) REFERENCES `FinanceYear` (`Id`);
     1747
     1748--
     1749-- Omezení pro tabulku `FinanceBankAccount`
     1750--
     1751ALTER TABLE `FinanceBankAccount`
     1752  ADD CONSTRAINT `FinanceBankAccount_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);
     1753
     1754--
     1755-- Omezení pro tabulku `FinanceBills`
     1756--
     1757ALTER TABLE `FinanceBills`
     1758  ADD CONSTRAINT `FinanceBills_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);
     1759
     1760--
     1761-- Omezení pro tabulku `FinanceBillsItems`
     1762--
     1763ALTER TABLE `FinanceBillsItems`
     1764  ADD CONSTRAINT `FinanceBillsItems_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`);
     1765
     1766--
     1767-- Omezení pro tabulku `FinanceClaimLiabilityItem`
     1768--
     1769ALTER TABLE `FinanceClaimLiabilityItem`
     1770  ADD CONSTRAINT `FinanceClaimLiabilityItem_ibfk_1` FOREIGN KEY (`FinanceClaimLiability`) REFERENCES `FinanceClaimsLiabilities` (`Id`);
     1771
     1772--
     1773-- Omezení pro tabulku `FinanceClaimsLiabilities`
     1774--
     1775ALTER TABLE `FinanceClaimsLiabilities`
     1776  ADD CONSTRAINT `FinanceClaimsLiabilities_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);
     1777
     1778--
     1779-- Omezení pro tabulku `FinanceOperation`
     1780--
     1781ALTER TABLE `FinanceOperation`
     1782  ADD CONSTRAINT `FinanceOperation_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`),
     1783  ADD CONSTRAINT `FinanceOperation_ibfk_2` FOREIGN KEY (`Bill`) REFERENCES `FinanceBills` (`Id`),
     1784  ADD CONSTRAINT `FinanceOperation_ibfk_3` FOREIGN KEY (`BankAccount`) REFERENCES `FinanceBankAccount` (`Id`),
     1785  ADD CONSTRAINT `FinanceOperation_ibfk_4` FOREIGN KEY (`Treasury`) REFERENCES `FinanceTreasury` (`Id`);
     1786
     1787--
     1788-- Omezení pro tabulku `FinanceOperationItem`
     1789--
     1790ALTER TABLE `FinanceOperationItem`
     1791  ADD CONSTRAINT `FinanceOperationItem_ibfk_1` FOREIGN KEY (`FinanceOperation`) REFERENCES `FinanceOperation` (`Id`);
     1792
     1793--
     1794-- Omezení pro tabulku `Hyperlink`
     1795--
     1796ALTER TABLE `Hyperlink`
     1797  ADD CONSTRAINT `Hyperlink_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `HyperlinkGroup` (`Id`);
     1798
     1799--
     1800-- Omezení pro tabulku `ISMenuItem`
     1801--
     1802ALTER TABLE `ISMenuItem`
     1803  ADD CONSTRAINT `ISMenuItem_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `ISMenuItem` (`Id`);
     1804
     1805--
     1806-- Omezení pro tabulku `Log`
     1807--
     1808ALTER TABLE `Log`
     1809  ADD CONSTRAINT `Log_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`);
     1810
     1811--
     1812-- Omezení pro tabulku `Member`
     1813--
     1814ALTER TABLE `Member`
     1815  ADD CONSTRAINT `Member_ibfk_23` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`),
     1816  ADD CONSTRAINT `Member_ibfk_24` FOREIGN KEY (`ResponsibleUser`) REFERENCES `User` (`Id`),
     1817  ADD CONSTRAINT `Member_ibfk_27` FOREIGN KEY (`BillingPeriod`) REFERENCES `FinanceBillingPeriod` (`Id`),
     1818  ADD CONSTRAINT `Member_ibfk_28` FOREIGN KEY (`BillingPeriodNext`) REFERENCES `FinanceBillingPeriod` (`Id`);
     1819
     1820--
     1821-- Omezení pro tabulku `MemberPayment`
     1822--
     1823ALTER TABLE `MemberPayment`
     1824  ADD CONSTRAINT `MemberPayment_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`);
     1825
     1826--
     1827-- Omezení pro tabulku `MeteoStationMeasure`
     1828--
     1829ALTER TABLE `MeteoStationMeasure`
     1830  ADD CONSTRAINT `MeteoStationMeasure_ibfk_1` FOREIGN KEY (`MeteoStation`) REFERENCES `MeteoStation` (`Id`);
     1831
     1832--
     1833-- Omezení pro tabulku `NetworkAP`
     1834--
     1835ALTER TABLE `NetworkAP`
     1836  ADD CONSTRAINT `NetworkAP_ibfk_1` FOREIGN KEY (`NetworkDevice`) REFERENCES `NetworkDevice` (`Id`);
     1837
     1838--
     1839-- Omezení pro tabulku `NetworkDevice`
     1840--
     1841ALTER TABLE `NetworkDevice`
     1842  ADD CONSTRAINT `NetworkDevice_ibfk_4` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`),
     1843  ADD CONSTRAINT `NetworkDevice_ibfk_5` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`),
     1844  ADD CONSTRAINT `NetworkDevice_ibfk_6` FOREIGN KEY (`Type`) REFERENCES `NetworkDeviceType` (`Id`),
     1845  ADD CONSTRAINT `NetworkDevice_ibfk_7` FOREIGN KEY (`MapPosition`) REFERENCES `MapPosition` (`Id`);
     1846
     1847--
     1848-- Omezení pro tabulku `NetworkDeviceConfig`
     1849--
     1850ALTER TABLE `NetworkDeviceConfig`
     1851  ADD CONSTRAINT `NetworkDeviceConfig_ibfk_1` FOREIGN KEY (`Device`) REFERENCES `NetworkDevice` (`Id`);
     1852
     1853--
     1854-- Omezení pro tabulku `NetworkFirewall`
     1855--
     1856ALTER TABLE `NetworkFirewall`
     1857  ADD CONSTRAINT `NetworkFirewall_ibfk_1` FOREIGN KEY (`NetworkDevice`) REFERENCES `NetworkDevice` (`Id`);
     1858
     1859--
     1860-- Omezení pro tabulku `NetworkInterface`
     1861--
     1862ALTER TABLE `NetworkInterface`
     1863  ADD CONSTRAINT `NetworkInterface_ibfk_1` FOREIGN KEY (`Type`) REFERENCES `NetworkInterfaceType` (`Id`),
     1864  ADD CONSTRAINT `NetworkInterface_ibfk_2` FOREIGN KEY (`Device`) REFERENCES `NetworkDevice` (`Id`);
     1865
     1866--
     1867-- Omezení pro tabulku `NetworkLink`
     1868--
     1869ALTER 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`);
     1873
     1874--
     1875-- Omezení pro tabulku `NetworkSegment`
     1876--
     1877ALTER TABLE `NetworkSegment`
     1878  ADD CONSTRAINT `NetworkSegment_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `NetworkSegment` (`Id`);
     1879
     1880--
     1881-- Omezení pro tabulku `NetworkSubnet`
     1882--
     1883ALTER TABLE `NetworkSubnet`
     1884  ADD CONSTRAINT `NetworkSubnet_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`);
     1885
     1886--
     1887-- Omezení pro tabulku `News`
     1888--
     1889ALTER TABLE `News`
     1890  ADD CONSTRAINT `News_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `NewsCategory` (`Id`),
     1891  ADD CONSTRAINT `News_ibfk_2` FOREIGN KEY (`User`) REFERENCES `User` (`Id`);
     1892
     1893--
     1894-- Omezení pro tabulku `Panel`
     1895--
     1896ALTER TABLE `Panel`
     1897  ADD CONSTRAINT `Panel_ibfk_1` FOREIGN KEY (`PanelColumn`) REFERENCES `PanelColumn` (`Id`);
     1898
     1899--
     1900-- Omezení pro tabulku `PermissionGroupAssignment`
     1901--
     1902ALTER TABLE `PermissionGroupAssignment`
     1903  ADD CONSTRAINT `PermissionGroupAssignment_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `PermissionGroup` (`Id`),
     1904  ADD CONSTRAINT `PermissionGroupAssignment_ibfk_2` FOREIGN KEY (`AssignedGroup`) REFERENCES `PermissionGroup` (`Id`),
     1905  ADD CONSTRAINT `PermissionGroupAssignment_ibfk_3` FOREIGN KEY (`AssignedOperation`) REFERENCES `PermissionOperation` (`Id`);
     1906
     1907--
     1908-- Omezení pro tabulku `PermissionUserAssignment`
     1909--
     1910ALTER TABLE `PermissionUserAssignment`
     1911  ADD CONSTRAINT `PermissionUserAssignment_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`),
     1912  ADD CONSTRAINT `PermissionUserAssignment_ibfk_2` FOREIGN KEY (`AssignedGroup`) REFERENCES `PermissionGroup` (`Id`),
     1913  ADD CONSTRAINT `PermissionUserAssignment_ibfk_3` FOREIGN KEY (`AssignedOperation`) REFERENCES `PermissionOperation` (`Id`);
     1914
     1915--
     1916-- Omezení pro tabulku `Product`
     1917--
     1918ALTER TABLE `Product`
     1919  ADD CONSTRAINT `Product_ibfk_1` FOREIGN KEY (`Supplier`) REFERENCES `Subject` (`Id`),
     1920  ADD CONSTRAINT `Product_ibfk_2` FOREIGN KEY (`Manufacturer`) REFERENCES `Subject` (`Id`),
     1921  ADD CONSTRAINT `Product_ibfk_3` FOREIGN KEY (`UnitOfMeasure`) REFERENCES `UnitOfMeasure` (`Id`);
     1922
     1923--
     1924-- Omezení pro tabulku `Service`
     1925--
     1926ALTER 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`);
     1929
     1930--
     1931-- Omezení pro tabulku `ServiceCustomerRel`
     1932--
     1933ALTER TABLE `ServiceCustomerRel`
     1934  ADD CONSTRAINT `ServiceCustomerRel_ibfk_2` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`);
     1935
     1936--
     1937-- Omezení pro tabulku `Stock`
     1938--
     1939ALTER TABLE `Stock`
     1940  ADD CONSTRAINT `Stock_ibfk_1` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`);
     1941
     1942--
     1943-- Omezení pro tabulku `StockItem`
     1944--
     1945ALTER TABLE `StockItem`
     1946  ADD CONSTRAINT `StockItem_ibfk_1` FOREIGN KEY (`Stock`) REFERENCES `Stock` (`Id`),
     1947  ADD CONSTRAINT `StockItem_ibfk_3` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`),
     1948  ADD CONSTRAINT `StockItem_ibfk_5` FOREIGN KEY (`Product`) REFERENCES `Product` (`Id`),
     1949  ADD CONSTRAINT `StockItem_ibfk_6` FOREIGN KEY (`Segment`) REFERENCES `NetworkSegment` (`Id`);
     1950
     1951--
     1952-- Omezení pro tabulku `Subject`
     1953--
     1954ALTER TABLE `Subject`
     1955  ADD CONSTRAINT `Subject_ibfk_1` FOREIGN KEY (`AddressCountry`) REFERENCES `Country` (`Id`);
     1956
     1957--
     1958-- Omezení pro tabulku `SubjectOpenTime`
     1959--
     1960ALTER TABLE `SubjectOpenTime`
     1961  ADD CONSTRAINT `SubjectOpenTime_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);
     1962
     1963--
     1964-- Omezení pro tabulku `SubjectOpenTimeDay`
     1965--
     1966ALTER TABLE `SubjectOpenTimeDay`
     1967  ADD CONSTRAINT `SubjectOpenTimeDay_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`);
     1968
     1969--
     1970-- Omezení pro tabulku `Task`
     1971--
     1972ALTER TABLE `Task`
     1973  ADD CONSTRAINT `Task_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `TaskGroup` (`Id`),
     1974  ADD CONSTRAINT `Task_ibfk_2` FOREIGN KEY (`AssignedTo`) REFERENCES `User` (`Id`);
     1975
     1976--
     1977-- Omezení pro tabulku `TaskGroup`
     1978--
     1979ALTER TABLE `TaskGroup`
     1980  ADD CONSTRAINT `TaskGroup_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `TaskGroup` (`Id`);
     1981
     1982--
     1983-- Omezení pro tabulku `TV`
     1984--
     1985ALTER TABLE `TV`
     1986  ADD CONSTRAINT `TV_ibfk_1` FOREIGN KEY (`Language`) REFERENCES `Language` (`Id`),
     1987  ADD CONSTRAINT `TV_ibfk_2` FOREIGN KEY (`Category`) REFERENCES `TVGroup` (`Id`);
     1988
     1989--
     1990-- Omezení pro tabulku `UserCustomerRel`
     1991--
     1992ALTER TABLE `UserCustomerRel`
     1993  ADD CONSTRAINT `usercustomerrel_ibfk_1` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`),
     1994  ADD CONSTRAINT `usercustomerrel_ibfk_2` FOREIGN KEY (`User`) REFERENCES `User` (`Id`);
     1995
     1996--
     1997-- Omezení pro tabulku `Work`
     1998--
     1999ALTER TABLE `Work`
     2000  ADD CONSTRAINT `Work_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`),
     2001  ADD CONSTRAINT `Work_ibfk_2` FOREIGN KEY (`Task`) REFERENCES `Task` (`Id`);");
     2002  $Manager->Execute("INSERT INTO `SystemVersion` (`Id`, `Revision`) VALUES
     2003(1, 491);");
     2004 
    62005}
    72006
     2007function InsertSampleData($Manager)
     2008{
     2009  $Manager->Execute("INSERT INTO `Country` (`Id`, `Name`) VALUES
     2010(1, 'Česká Republika'),
     2011(2, 'Slovenská Republika'),
     2012(3, 'Litva'),
     2013(4, 'Rakousko'),
     2014(5, 'Německo'),
     2015(6, 'Polsko'),
     2016(7, 'Francie'),
     2017(8, 'Itálie');");
     2018  $Manager->Execute("INSERT INTO `User` (`Id`, `Login`, `Name`, `Password`, `Salt`, `Email`, `LastIpAddress`, `LastLoginTime`, `RegistrationTime`, `Locked`, `ICQ`, `PhoneNumber`, `InitPassword`) VALUES
     2019(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, '', '');");
     2022  $Manager->Execute("INSERT INTO `UnitOfMeasure` (`Id`, `Unit`, `Name`) VALUES
     2023(1, 'ks', 'kus'),
     2024(2, 'l', 'litr'),
     2025(3, 'g', 'gram'),
     2026(4, 'Kg', 'Kilogram'),
     2027(5, 'm', 'metr'),
     2028(6, 'km', 'kilometr'),
     2029(7, 'mm', 'milimetr'),
     2030(8, 'cm', 'centimetr'),
     2031(9, 'Mbit/s', 'megabity za sekundu'),
     2032(10, 'bit/s', 'bity za sekundu');");
     2033  $Manager->Execute("INSERT INTO `TVGroup` (`Id`, `Name`) VALUES
     2034(1, 'Sportovní'),
     2035(2, 'Zábavný'),
     2036(3, 'Hudební'),
     2037(4, 'Zpravodajský'),
     2038(5, 'Regionální'),
     2039(6, 'Filmový');");
     2040  $Manager->Execute("INSERT INTO `HyperlinkGroup` (`Id`, `Name`) VALUES
     2041(1, 'Síť'),
     2042(2, 'Místní organizace'),
     2043(3, 'Stránky občanů'),
     2044(4, 'Vyhledávání'),
     2045(5, 'Užitečné'),
     2046(6, 'Zábava'),
     2047(7, 'Hostované stránky'),
     2048(8, 'Prodej počítačů'),
     2049(9, 'Různé');");
     2050  $Manager->Execute("INSERT INTO `Language` (`Id`, `Name`) VALUES
     2051(1, 'Česky'),
     2052(2, 'Slovensky'),
     2053(3, 'Anglicky'),
     2054(4, 'Německy'),
     2055(6, 'Polsky');");
     2056  $Manager->Execute("INSERT INTO `Hyperlink` (`Id`, `Name`, `URL`, `Group`, `IconFile`, `PermissionModule`, `PermissionOperation`, `Enable`) VALUES
     2057(1, 'Finance', '/finance/', 1, 'money.png', '', '', 1),
     2058(2, 'Statistika', 'http://stat.zdechov.net/centrala/', 1, 'chart.png', '', '', 1),
     2059(3, 'Seznam uživatelů', '/userlist.php', 1, 'comp.png', '', '', 1),
     2060(4, 'Seznam počítačů', '/hostlist.php', 1, 'comp.png', '', '', 1),
     2061(5, 'Sdílení souborů', 'http://wiki.zdechov.net/index.php/DC_hub', 1, 'prohledavac_sdileni.png', '', '', 0),
     2062(6, 'Historie chatu', '/chat/history.php', 9, 'sunrisechat.png', 'Chat', 'Display', 0),
     2063(7, 'Webový chat', 'http://embed.mibbit.com/?server=game.zdechov.net%3A6667&channel=%23zdechov&forcePrompt=true&charset=utf-8', 9, 'sunrisechat.png', '', '', 1),
     2064(8, 'Fotogalerie', '/galerie/', 9, 'gallery.png', '', '', 1),
     2065(9, 'Diskusní fórum', 'http://forum.zdechov.net/', 9, 'discus.png', '', '', 1),
     2066(10, 'WebMail', 'https://mail.zdechov.net/', 9, 'openwebmail.png', '', '', 1),
     2067(11, 'Jídelníček', '/jidelna/', 9, 'apple.png', '', '', 1),
     2068(12, 'Mapa sítě', '/map/', 1, 'map.png', '', '', 1),
     2069(13, 'Otvírací doby', '/otevreno.php', 9, 'otv_doby.png', '', '', 1),
     2070(14, 'Wiki', 'http://wiki.zdechov.net/', 9, 'clear.png', '', '', 1),
     2071(15, 'Topologie sítě', '/is/topologie.php', 1, 'topologie.png', '', '', 1),
     2072(16, 'Technické informace', '/network.php', 1, 'tech.png', '', '', 1),
     2073(17, 'Webkamery', 'http://www.zdechov.net/kamery/', 9, 'camera.png', '', '', 1),
     2074(18, 'ZděchovNET', 'http://www.zdechov.net/', 1, '', '', '', 1),
     2075(21, 'Obecní úřad', 'http://www.zdechov.cz/', 2, 'obec_zdechov.png', '', '', 1),
     2076(22, 'Motokrosová grapa', 'http://zdechovskagrapa.sweb.cz/', 2, '', '', '', 1),
     2077(23, 'Skiareál', 'http://skiareal.zdechov.net/', 2, 'www_snbzdechov_com.png', '', '', 1),
     2078(24, 'Sbor dobrovolných hasičů', 'http://sdh.zdechov.net/', 2, '', '', '', 1),
     2079(25, 'TJ Sokol', 'http://fotbal.zdechov.net/', 2, 'socer.png', '', '', 1),
     2080(26, 'Farnost', 'http://farnost.zdechov.net/', 2, 'cfix.png', '', '', 1),
     2081(27, 'Staněk Tatra team', 'http://www.stanek-tatra.cz/', 3, 'www_stanek-tatra_cz.png', '', '', 1),
     2082(28, 'Zděchov.eu', 'http://www.zdechov.eu/', 3, 'obec_zdechov.png', '', '', 1),
     2083(29, 'Google', 'http://www.google.cz/', 4, 'www_google_cz.png', '', '', 1),
     2084(30, 'Morfeo', 'http://morfeo.centrum.cz/', 4, 'morfeo.png', '', '', 0),
     2085(31, 'Centrum', 'http://www.centrum.cz/', 4, 'www_centrum_cz.png', '', '', 1),
     2086(32, 'Seznam', 'http://www.seznam.cz/', 4, 'www_seznam_cz.png', '', '', 1),
     2087(33, 'Atlas', 'http://www.atlas.cz/', 4, 'www_atlas_cz.png', '', '', 1),
     2088(34, 'Tiscali', 'http://www.tiscali.cz/', 4, 'www_tiscali_cz.png', '', '', 1),
     2089(35, 'Mapa ČR', 'http://www.mapy.cz/', 5, 'www_mapy_cz.png', '', '', 1),
     2090(36, 'Online TV', 'http://www.tvinfo.cz/live/televize/evropa/cz', 5, 'www_tvinfo_cz.png', '', '', 1),
     2091(37, 'Jízdní řády', 'http://jizdnirady.idnes.cz/', 5, 'www_idos_cz.png', '', '', 1),
     2092(38, 'TV programy', 'http://tv.atlas.cz/', 5, 'www_atlas_cz.png', '', '', 1),
     2093(39, 'ICQ', 'http://www.icq.com/download/icq2go/', 5, 'www_icq_com.png', '', '', 1),
     2094(40, 'Slovníky', 'http://www.slovnik.cz/', 5, 'www_slovnik_cz.png', '', '', 1),
     2095(41, 'Počasí', 'http://www.meteopress.cz/', 5, 'pocasi.png', '', '', 1),
     2096(42, 'T-Mobile SMS', 'http://www.tzones.cz/', 5, 'www_tzones_cz.png', '', '', 1),
     2097(43, 'Knihovna Vsetín', 'http://www.mvk.cz/', 5, 'www_mvk_cz.png', '', '', 1),
     2098(44, 'Youtube', 'http://www.youtube.com/', 6, 'www_youtube_com.png', '', '', 1),
     2099(45, 'Stream.cz', 'http://www.stream.cz/', 6, 'www_stream_cz.png', '', '', 1),
     2100(46, 'Last.fm', 'http://www.last.fm/', 6, 'www_last_fm.png', '', '', 1),
     2101(47, 'Ulož.to', 'http://uloz.to/', 6, 'uloz_to.png', '', '', 1),
     2102(48, 'SOFTCOM', 'http://www.softcom.cz', 8, 'www_computershop_cz.png', '', '', 1),
     2103(49, 'Alfacomp', 'http://www.alfacomp.cz/php/zbozi.php?akc=2', 8, 'www_alfacomp_cz.png', '', '', 1),
     2104(50, 'Petracomp', 'http://www.petracomp.cz/', 8, 'www_petracomp_cz.png', '', '', 0),
     2105(51, 'TS Bohemia', 'http://interlink.tsbohemia.cz/', 8, 'www_tsbohemia_cz.png', '', '', 1),
     2106(58, 'Volný', 'http://web.volny.cz/', 4, 'volny.png', '', '', 1),
     2107(61, 'Test rychlost', 'http://rychlost.cz/', 5, 'rychlost_cz.png', '', '', 1),
     2108(62, 'Zděchov na Facebooku', 'http://www.facebook.com/group.php?gid=180682342445', 3, 'facebook.png', '', '', 1),
     2109(63, 'Pizzerie Zádilský', 'http://pizzerie.huslenky.cz/', 5, '', '', '', 1),
     2110(64, 'Televize', '/tv/', 1, 'tv.png', '', '', 1),
     2111(65, 'Telefonní seznam', 'http://wiki.zdechov.net/wiki/Telefonní_seznam', 9, 'tel.png', '', '', 1),
     2112(66, 'JT Servis', 'http://jtservis.cz/', 3, '', '', '', 1),
     2113(67, 'Speedtest mini', '/speedtestnet/', 1, 'speedtestnet.png', '', '', 1),
     2114(68, 'Zděchovská 30', 'http://tricitka.zdechov.net', 2, '', '', '', 1),
     2115(69, 'ZŠ a MŠ Zděchov', 'http://zsams.zdechov.net', 2, '', '', '', 1);");
     2116  $Manager->Execute("INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2117(1, 'DNS server (named)', '/usr/bin/php dns.php|/etc/init.d/named reload', 0, '2013-02-04 00:36:38', 0, 1, 60, ''),
     2118(2, 'Firewall rules (iptables)', '/usr/bin/php iptables.php', 0, '2008-12-06 17:36:26', 0, 0, 60, ''),
     2119(3, 'Traffic Shaping (tc, iptables)', '/usr/bin/php traffic_shaping.php|/a/bin/htb.sh', 0, '2009-03-02 20:41:41', 0, 0, 60, ''),
     2120(4, 'DHCP server (dhcpd)', '/usr/bin/php dhcp.php|/etc/init.d/dhcpd restart 1>/dev/null 2>/dev/null', 0, '2009-03-09 16:42:43', 0, 0, 60, ''),
     2121(5, 'VPN server (pptpd)', '/usr/bin/php vpn.php|/a/bin/vpn.sh', 0, '2008-04-26 08:33:50', 0, 0, 60, '');
     2122INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2123(7, 'DHCP server (/ip dhcp-server lease)', '/usr/bin/php dhcp.php', 0, '2013-01-01 16:00:44', 48, 1, 60, '');
     2124INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2125(8, 'Netwatch (/tool netwatch)', '/usr/bin/php netwatch.php', 0, '2012-12-01 15:18:53', 39, 1, 60, '');
     2126INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2127(9, 'Queue (/queue tree)', '/usr/bin/php queue.php', 0, '2013-02-04 00:07:06', 4, 1, 60, '');
     2128INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2129(10, 'Network translation (/ip firewall nat)', '/usr/bin/php firewall_nat.php', 0, '2013-01-27 17:25:33', 3, 1, 60, '');
     2130INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2131(11, 'Traffic marking (/ip firewall mangle)', '/usr/bin/php firewall_mangle.php', 0, '2013-02-04 00:05:31', 4, 1, 60, '');
     2132INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES
     2133(12, 'Firewall filter (/ip firewall filter)', '/usr/bin/php firewall_filter.php', 0, '2011-01-15 09:32:57', 0, 1, 60, ''),
     2134(13, 'DNS server (routerboard)', '/usr/bin/php dns_routerboard.php', 0, '0000-00-00 00:00:00', 0, 1, 60, '');");
     2135  $Manager->Execute("INSERT INTO `NetworkDeviceType` (`Id`, `Name`, `ShowOnline`, `IconName`) VALUES
     2136(1, 'Server', 0, 'device'),
     2137(2, 'Stolní počítač', 1, 'comp'),
     2138(3, 'Přenosný počítač', 1, 'comp'),
     2139(4, 'Směrovač', 0, 'device'),
     2140(5, 'Rozbočovač', 0, 'device'),
     2141(6, 'Tiskárna', 0, 'device'),
     2142(7, 'Telefón', 0, 'device'),
     2143(8, 'PDA/MDA', 1, 'comp'),
     2144(9, 'Kamera', 0, 'device'),
     2145(10, 'Meteostanice', 1, 'device');");
     2146  $Manager->Execute("INSERT INTO `NetworkInterfaceType` (`Id`, `Name`, `MaxSpeed`, `FullDuplex`, `Color`) VALUES
     2147(1, 'Fast Ethernet', 100, 1, 'ffffff'),
     2148(2, 'Gigabit Ethernet', 1000, 1, 'ffffff'),
     2149(3, 'Ethernet', 10, 1, 'ffffff'),
     2150(4, 'Wi-Fi 802.11b', 11, 0, 'ffffff'),
     2151(5, 'Wi-Fi 802.11b/g', 54, 0, 'ffffff'),
     2152(6, 'Wi-Fi 802.11a/b/g', 54, 0, 'ffffff'),
     2153(7, 'Wi-Fi 802.11n', 300, 0, 'ffffff');");
     2154  $Manager->Execute("INSERT INTO `NetworkSubnet` (`Id`, `Name`, `AddressRange`, `Mask`, `DHCP`, `Gateway`, `WINS`, `DNS`, `Domain`, `NTP`, `Member`, `ExtAddressRange`, `ExtMask`, `AddressRangeIPv6`, `Configure`) VALUES
     2155(1, 'Hlavní', '172.16.0.0', 24, '172.16.0.1', '172.16.0.1', '172.16.1.2', '172.16.0.2,172.16.0.3', 'company.net', '172.16.0.2,172.16.0.3', NULL, '', 32, '2001:470:1234:1::/64', 1),
     2156(2, 'Servery', '172.16.1.0', 24, '172.16.1.1', '172.16.1.1', '172.16.1.2', '172.16.0.2,172.16.0.3', 'company.net', '172.16.0.2,172.16.0.3', NULL, '', 32, '2001:470:1234:2::/64', 1);");
     2157  $Manager->Execute("INSERT INTO `PanelColumn` (`Id`, `Width`) VALUES
     2158(1, ''),
     2159(2, ''),
     2160(3, '70%');");
     2161  $Manager->Execute("INSERT INTO `Panel` (`Id`, `Module`, `Parameters`, `Order`, `PanelColumn`) VALUES
     2162(1, 'HyperlinkGroup', '1', 2, 1),
     2163(3, 'HyperlinkGroup', '4', 1, 2),
     2164(4, 'HyperlinkGroup', '5', 2, 2),
     2165(5, 'HyperlinkGroup', '6', 3, 2),
     2166(6, 'HyperlinkGroup', '2', 4, 2),
     2167(7, 'HyperlinkGroup', '3', 5, 2),
     2168(8, 'NewsGroupList', '', 2, 3),
     2169(9, 'Webcam', '', 3, 1),
     2170(11, 'UserOptions', '', 1, 3),
     2171(13, 'HyperlinkGroup', '9', 1, 1);");
     2172  $Manager->Execute("INSERT INTO `NewsCategory` (`Id`, `Caption`, `Permission`, `Sequence`, `Group`, `RSS`) VALUES
     2173(1, 'Různé informace', 1, 3, 2, ''),
     2174(2, 'Bazar', 1, 6, 2, ''),
     2175(3, 'Dění v obci', 1, 2, 2, ''),
     2176(4, 'Diskusní fórum', 0, 10, 1, ''),
     2177(5, 'Správa sítě - oznámení', 0, 1, 1, ''),
     2178(6, 'Správa sítě - výpadky', 0, 13, 1, ''),
     2179(8, 'Fotbal', 1, 4, 2, ''),
     2180(9, 'Správa sítě - změny zařízení', 0, 12, 1, ''),
     2181(10, 'Multimediální archív', 0, 11, 1, ''),
     2182(11, 'Obecní úřad - úřední deska', 0, 7, 2, ''),
     2183(12, 'Obecní úřad - aktuality', 0, 8, 2, ''),
     2184(13, 'TV Beskyd', 0, 9, 1, ''),
     2185(14, 'Hokej', 1, 5, 2, ''),
     2186(15, 'Kino Vatra', 0, 15, 1, 'http://www.dkvsetin.cz/rss/kino/8'),
     2187(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`) VALUES
     2189(1, 'Franta Vopršálek', 47.555, 11.082)");
     2190  $Manager->Execute("INSERT INTO `FinanceBillingPeriod` (`Id`, `Name`, `MonthCount`) VALUES
     2191(1, 'Nikdy', 0),
     2192(2, 'Měsíčně', 1),
     2193(3, 'Čtvrtletně', 3),
     2194(4, 'Pololetně', 6),
     2195(5, 'Ročně', 12);");
     2196  $Manager->Execute("INSERT INTO `Member` (`Id`, `Name`, `Subject`, `ResponsibleUser`, `FamilyMemberCount`, `MembershipDate`, `MemberState`, `GPS`, `BillingPeriod`, `NetworkSegment`, `BillingPeriodNext`, `BillingPeriodLastDate`, `Hire`, `Blocked`, `PayDay`) VALUES
     2197(1, 'Franta Vopršálek', 1, 1, 5, '2004-07-31', 0, 0, 1, 5, 1, '2009-03-31', 0, 0, 1);");
     2198  $Manager->Execute("INSERT INTO `PermissionGroup` (`Id`, `Description`) VALUES
     2199(1, 'Ostatní'),
     2200(2, 'Registrovaní uživatelé'),
     2201(3, 'Zástupci za domácnost'),
     2202(4, 'Správci sítě'),
     2203(5, 'Systémoví administrátoři');");
     2204  $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES
     2205(1, 'News', 'Display', 'Item', 0),
     2206(2, 'News', 'Insert', '', 0),
     2207(3, 'News', 'Display', 'Item', 0),
     2208(4, 'News', 'Insert', 'Group', 5),
     2209(5, 'News', 'Display', 'Group', 5),
     2210(6, 'News', 'Insert', 'Group', 1),
     2211(7, 'News', 'Display', 'Group', 1),
     2212(8, 'News', 'Insert', 'Group', 2),
     2213(9, 'News', 'Display', 'Group', 2),
     2214(10, 'News', 'Insert', 'Group', 3),
     2215(11, 'News', 'Display', 'Group', 3),
     2216(12, 'News', 'Insert', 'Group', 4),
     2217(13, 'News', 'Display', 'Group', 4),
     2218(14, 'News', 'Insert', 'Group', 6),
     2219(15, 'News', 'Display', 'Group', 6),
     2220(16, 'News', 'Insert', 'Group', 8),
     2221(17, 'News', 'Display', 'Group', 8),
     2222(18, 'News', 'Insert', 'Group', 9),
     2223(19, 'News', 'Display', 'Group', 9),
     2224(20, 'News', 'Insert', 'Group', 10),
     2225(21, 'News', 'Display', 'Group', 10),
     2226(22, 'News', 'Insert', 'Group', 11),
     2227(23, 'News', 'Display', 'Group', 11),
     2228(24, 'News', 'Insert', 'Group', 12),
     2229(25, 'News', 'Display', 'Group', 12),
     2230(26, 'Chat', 'Display', '', 0),
     2231(27, 'Share', 'Display', '', 0),
     2232(28, 'Finance', 'DisplaySubjectState', '', 0),
     2233(29, 'EatingPlace', 'Edit', '', 0),
     2234(30, 'Finance', 'Manage', '', 0),
     2235(31, 'Network', 'Edit', '', 0),
     2236(32, 'Finance', 'SubjectList', '', 0),
     2237(33, 'Network', 'Administration', '', 0),
     2238(34, 'Log', 'Show', '', 0),
     2239(35, 'Network', 'RegistredHostList', '', 0),
     2240(36, 'Finance', 'TradingStatus', '', 0),
     2241(37, 'Finance', 'MemberOptions', '', 0),
     2242(38, 'SubjectOpenTime', 'Edit', '', 0),
     2243(39, 'News', 'Display', 'Group', 13),
     2244(40, 'News', 'Insert', 'Group', 14),
     2245(41, 'News', 'Display', 'Group', 14),
     2246(42, 'News', 'Display', 'Group', 15),
     2247(43, 'News', 'Display', 'Group', 16),
     2248(44, 'IS', 'Manage', '', 0);");
     2249  $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES
     2250(1, 2, 1, NULL),
     2251(2, 3, 2, NULL),
     2252(3, 4, 3, NULL),
     2253(4, 5, 4, NULL),
     2254(5, 1, NULL, 1),
     2255(6, 2, NULL, 2),
     2256(7, 1, NULL, 3),
     2257(8, 1, NULL, 5),
     2258(9, 4, NULL, 4),
     2259(10, 1, NULL, 7),
     2260(11, 2, NULL, 6),
     2261(12, 1, NULL, 9),
     2262(13, 2, NULL, 8),
     2263(14, 1, NULL, 11),
     2264(15, 2, NULL, 10),
     2265(16, 1, NULL, 13),
     2266(17, 4, NULL, 12),
     2267(18, 1, NULL, 15),
     2268(19, 4, NULL, 14),
     2269(20, 1, NULL, 17),
     2270(21, 2, NULL, 16),
     2271(22, 1, NULL, 19),
     2272(23, 4, NULL, 18),
     2273(24, 1, NULL, 21),
     2274(25, 4, NULL, 20),
     2275(26, 1, NULL, 23),
     2276(27, 4, NULL, 22),
     2277(28, 1, NULL, 25),
     2278(29, 4, NULL, 24),
     2279(30, 1, NULL, 26),
     2280(31, 2, NULL, 27),
     2281(32, 3, NULL, 28),
     2282(33, 4, NULL, 30),
     2283(34, 4, NULL, 31),
     2284(35, 4, NULL, 32),
     2285(36, 4, NULL, 33),
     2286(37, 4, NULL, 34),
     2287(38, 3, NULL, 35),
     2288(39, 5, NULL, 36),
     2289(40, 3, NULL, 37),
     2290(41, 4, NULL, 38),
     2291(42, 1, NULL, 39),
     2292(43, 2, NULL, 40),
     2293(44, 1, NULL, 41),
     2294(45, 1, NULL, 42),
     2295(46, 1, NULL, 43),
     2296(47, 4, NULL, 44);");
     2297  $Manager->Execute("INSERT INTO `PermissionUserAssignment` (`Id`, `User`, `AssignedGroup`, `AssignedOperation`) VALUES
     2298(1, 1, 5, NULL);");
     2299  $Manager->Execute("INSERT INTO `UserCustomerRel` (`Id`, `Customer`, `User`) VALUES
     2300(1, 1, 1);");
     2301  $Manager->Execute("INSERT INTO `ISMenuItem` (`Id`, `Name`, `Parent`, `Table`, `IconName`) VALUES
     2302(1, 'Síť', NULL, '', ''),
     2303(2, 'Finance', NULL, '', ''),
     2304(3, 'Zařízení', 1, 'NetworkDevice', ''),
     2305(4, 'Rozhraní', 1, 'NetworkInterface', ''),
     2306(5, 'Příjmy a výdaje', 2, 'FinanceOperation', ''),
     2307(6, 'Závazky a pohledávky', 2, 'FinanceClaimsLiabilities', ''),
     2308(7, 'Typ zařízení', 1, 'NetworkDeviceType', ''),
     2309(8, 'Typ rozhraní', 1, 'NetworkInterfaceType', ''),
     2310(9, 'Doménové aliasy', 1, 'NetworkDomainAlias', ''),
     2311(10, 'Bankovní účty', 2, 'FinanceBankAccount', ''),
     2312(11, 'Pokladny', 2, 'FinanceTreasury', ''),
     2313(12, 'Obecné', NULL, '', ''),
     2314(13, 'Uživatelé', 12, 'User', ''),
     2315(14, 'Subjekty', 12, 'Subject', ''),
     2316(15, 'Země', 12, 'Country', ''),
     2317(18, 'Platební období', 2, 'FinanceBillingPeriod', ''),
     2318(19, 'Služby', 2, 'Service', ''),
     2319(20, 'Zákazníci', 2, 'Member', ''),
     2320(22, 'Podsítě', 1, 'NetworkSubnet', ''),
     2321(23, 'Systém', NULL, '', ''),
     2322(24, 'Záznamy', 23, 'Log', ''),
     2323(25, 'Úkoly', 12, 'Task', ''),
     2324(26, 'Kategorie úkolů', 12, 'TaskGroup', ''),
     2325(27, 'Sklad', NULL, '', ''),
     2326(30, 'TV kanály', 12, 'TV', ''),
     2327(31, 'Jazyky', 12, 'Language', ''),
     2328(32, 'Kategorie TV kanálů', 12, 'TVGroup', ''),
     2329(33, 'Účetní roky', 2, 'FinanceYear', ''),
     2330(34, 'Dokladové řady', 2, 'DocumentLine', ''),
     2331(35, 'Čísleník dokladové řady', 2, 'DocumentLineSequence', ''),
     2332(36, 'Nastavení zařízení', 1, 'NetworkDeviceConfig', ''),
     2333(37, 'Práce', 12, 'Work', ''),
     2334(38, 'Skladové položky', 27, 'StockItem', ''),
     2335(39, 'Měrné jednotky', 27, 'UnitOfMeasure', ''),
     2336(40, 'Produkty', 27, 'Product', ''),
     2337(41, 'Sklady', 27, 'Stock', '');");
     2338}
     2339
    82340?>
Note: See TracChangeset for help on using the changeset viewer.