Execute(" -- -- Funkce -- CREATE DEFINER=`centrala`@`localhost` FUNCTION `CompareNetworkPrefix`(Address1 INT(11) UNSIGNED, Address2 INT(11) UNSIGNED, Size INT(11)) RETURNS tinyint(1) RETURN Address1 & (-1 << (32 - Size)) = Address2 & (-1 << (32 - Size)); -- -- Struktura tabulky `ChatHistory` -- CREATE TABLE IF NOT EXISTS `ChatHistory` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Nick` varchar(64) COLLATE utf8_czech_ci NOT NULL, `Text` text COLLATE utf8_czech_ci NOT NULL, `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Color` int(11) NOT NULL DEFAULT '0', `RoomName` varchar(32) COLLATE utf8_czech_ci NOT NULL, `RoomType` int(11) NOT NULL DEFAULT '0', `Host` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=528576 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Country` -- CREATE TABLE IF NOT EXISTS `Country` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; -- -------------------------------------------------------- -- -- Struktura tabulky `DocumentLine` -- CREATE TABLE IF NOT EXISTS `DocumentLine` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Shortcut` varchar(16) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Shortcut` (`Shortcut`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9 ; -- -------------------------------------------------------- -- -- Struktura tabulky `DocumentLineSequence` -- CREATE TABLE IF NOT EXISTS `DocumentLineSequence` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `DocumentLine` int(11) NOT NULL, `FinanceYear` int(11) NOT NULL, `NextNumber` int(11) NOT NULL, `YearPrefix` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `DocumentLine` (`DocumentLine`), KEY `FinanceYear` (`FinanceYear`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=35 ; -- -- RELACE PRO TABULKU `DocumentLineSequence`: -- `DocumentLine` -- `DocumentLine` -> `Id` -- `FinanceYear` -- `FinanceYear` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `EmailQueue` -- CREATE TABLE IF NOT EXISTS `EmailQueue` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Time` datetime NOT NULL, `To` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Subject` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Content` text COLLATE utf8_czech_ci NOT NULL, `Headers` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Archive` int(11) NOT NULL DEFAULT '0', `From` varchar(255) COLLATE utf8_czech_ci NOT NULL, `AttachmentFile` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Archive` (`Archive`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3127 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Employee` -- CREATE TABLE IF NOT EXISTS `Employee` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `FirstName` varchar(255) NOT NULL, `SecondName` varchar(255) NOT NULL, `Salary` int(11) NOT NULL, `ValidFrom` date NOT NULL, `ValidTo` date DEFAULT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Struktura tabulky `EmployeeSalary` -- CREATE TABLE IF NOT EXISTS `EmployeeSalary` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Date` date NOT NULL, `Employee` int(11) NOT NULL, `Amount` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `Employee` (`Employee`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Struktura tabulky `File` -- CREATE TABLE IF NOT EXISTS `File` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(256) COLLATE utf8_czech_ci NOT NULL, `Size` int(11) NOT NULL, `Directory` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Directory` (`Directory`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6298 ; -- -- RELACE PRO TABULKU `File`: -- `Directory` -- `FileDirectory` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FileDirectory` -- CREATE TABLE IF NOT EXISTS `FileDirectory` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, `Parent` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Parent` (`Parent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- RELACE PRO TABULKU `FileDirectory`: -- `Parent` -- `FileDirectory` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceAssetsHistory` -- CREATE TABLE IF NOT EXISTS `FinanceAssetsHistory` ( `AssetsId` int(11) NOT NULL DEFAULT '0', `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `User` int(11) NOT NULL DEFAULT '0', KEY `AssetsId` (`AssetsId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceBankAccount` -- CREATE TABLE IF NOT EXISTS `FinanceBankAccount` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `TimeCreate` date NOT NULL, `Number` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Subject` int(11) DEFAULT NULL, `TimeEnd` date DEFAULT NULL, `Use` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `Subject` (`Subject`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; -- -- RELACE PRO TABULKU `FinanceBankAccount`: -- `Subject` -- `Subject` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceBillingPeriod` -- CREATE TABLE IF NOT EXISTS `FinanceBillingPeriod` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `MonthCount` int(11) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceBillsItemsOld` -- CREATE TABLE IF NOT EXISTS `FinanceBillsItemsOld` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Bill` int(11) NOT NULL DEFAULT '0', `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Price` float NOT NULL DEFAULT '0', `Quantity` float NOT NULL DEFAULT '1', PRIMARY KEY (`Id`), KEY `Bill` (`Bill`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17839 ; -- -- RELACE PRO TABULKU `FinanceBillsItemsOld`: -- `Bill` -- `FinanceBillsOld` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceBillsOld` -- CREATE TABLE IF NOT EXISTS `FinanceBillsOld` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `TimeFrom` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Subject` int(11) NOT NULL DEFAULT '0', `PeriodFrom` date DEFAULT NULL, `PeriodTo` date DEFAULT NULL, `TimeCreate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `BillCode` varchar(32) COLLATE utf8_czech_ci NOT NULL, `Type` enum('invoice','income') COLLATE utf8_czech_ci NOT NULL, `Cash` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`Id`), KEY `Subject` (`Subject`), KEY `Subject_2` (`Subject`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6298 ; -- -- RELACE PRO TABULKU `FinanceBillsOld`: -- `Subject` -- `Subject` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceCharge` -- CREATE TABLE IF NOT EXISTS `FinanceCharge` ( `Period` int(11) NOT NULL DEFAULT '0', `Internet` int(11) NOT NULL DEFAULT '0', `InternetSpeed` int(11) NOT NULL DEFAULT '0', `InternetSpeedReserve` int(11) NOT NULL DEFAULT '0', `AdministrationPerUser` int(20) NOT NULL DEFAULT '0', `kWh` int(11) NOT NULL DEFAULT '0', `BaseSpeedElement` int(11) NOT NULL DEFAULT '0', `BaseTariffPrice` int(11) NOT NULL DEFAULT '0', `TopTariffPrice` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceGroup` -- CREATE TABLE IF NOT EXISTS `FinanceGroup` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Description` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceInvoice` -- CREATE TABLE IF NOT EXISTS `FinanceInvoice` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `BillCode` varchar(16) COLLATE utf8_czech_ci NOT NULL, `Subject` int(11) NOT NULL DEFAULT '0', `TimeCreation` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `TimeDue` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `TimePayment` datetime DEFAULT NULL, `Value` float NOT NULL DEFAULT '0', `File` int(11) DEFAULT NULL, `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `PeriodTo` date DEFAULT NULL, `PeriodFrom` date DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Subject` (`Subject`), KEY `Bill` (`File`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8773 ; -- -- RELACE PRO TABULKU `FinanceInvoice`: -- `File` -- `File` -> `Id` -- `Subject` -- `Subject` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceInvoiceItem` -- CREATE TABLE IF NOT EXISTS `FinanceInvoiceItem` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `FinanceInvoice` int(11) NOT NULL DEFAULT '0', `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Price` float NOT NULL DEFAULT '0', `VAT` float NOT NULL DEFAULT '0', `Quantity` float NOT NULL DEFAULT '1', PRIMARY KEY (`Id`), KEY `FinanceClaimLiability` (`FinanceInvoice`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8192 ; -- -- RELACE PRO TABULKU `FinanceInvoiceItem`: -- `FinanceInvoice` -- `FinanceInvoice` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceLog` -- CREATE TABLE IF NOT EXISTS `FinanceLog` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceMonthlyOverall` -- CREATE TABLE IF NOT EXISTS `FinanceMonthlyOverall` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Money` int(11) NOT NULL DEFAULT '0', `Date` date NOT NULL DEFAULT '0000-00-00', `Administration` int(11) NOT NULL DEFAULT '0', `kWh` int(11) NOT NULL DEFAULT '0', `AdministrationTotal` int(11) NOT NULL DEFAULT '0', `ConsumptionTotal` int(11) NOT NULL DEFAULT '0', `TotalPaid` int(11) NOT NULL DEFAULT '0', `BaseTariffPrice` int(11) NOT NULL DEFAULT '0', `TopTariffPrice` int(11) NOT NULL DEFAULT '0', `MemberCount` int(11) NOT NULL DEFAULT '0', `Investment` int(11) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=122 ; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceOperation` -- CREATE TABLE IF NOT EXISTS `FinanceOperation` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Time` datetime NOT NULL, `Subject` int(11) NOT NULL DEFAULT '0', `Cash` int(11) NOT NULL DEFAULT '0', `Value` float NOT NULL, `BillCode` varchar(32) COLLATE utf8_czech_ci DEFAULT NULL, `Taxable` tinyint(1) NOT NULL DEFAULT '1', `File` int(11) DEFAULT NULL, `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT 'Vklad', `Network` int(11) NOT NULL DEFAULT '1', `BankAccount` int(11) DEFAULT NULL COMMENT 'FinanceBankAccount', `Treasury` int(11) DEFAULT NULL COMMENT 'FinanceTreasury', PRIMARY KEY (`Id`), UNIQUE KEY `BillCode` (`BillCode`), UNIQUE KEY `BillCode_2` (`BillCode`), KEY `Subject` (`Subject`), KEY `Bill` (`File`), KEY `BankAccount` (`BankAccount`), KEY `Treasury` (`Treasury`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6546 ; -- -- RELACE PRO TABULKU `FinanceOperation`: -- `File` -- `File` -> `Id` -- `Subject` -- `Subject` -> `Id` -- `BankAccount` -- `FinanceBankAccount` -> `Id` -- `Treasury` -- `FinanceTreasury` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceSmallAssets` -- CREATE TABLE IF NOT EXISTS `FinanceSmallAssets` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Text` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `PricePurchase` float NOT NULL DEFAULT '0', `TimeEnlistment` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `TimeElimination` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SupplySubject` int(11) NOT NULL DEFAULT '0', `DeviceId` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceTreasury` -- CREATE TABLE IF NOT EXISTS `FinanceTreasury` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `TimeCreate` date NOT NULL, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Struktura tabulky `FinanceYear` -- CREATE TABLE IF NOT EXISTS `FinanceYear` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Year` int(11) NOT NULL, `DateStart` date NOT NULL, `DateEnd` date NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=9 ; -- -------------------------------------------------------- -- -- Struktura tabulky `HostedProject` -- CREATE TABLE IF NOT EXISTS `HostedProject` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Homepage` varchar(255) COLLATE utf8_czech_ci NOT NULL, `User` int(255) NOT NULL COMMENT 'User.Id', `TimeCreate` datetime NOT NULL, `Server` int(11) DEFAULT NULL COMMENT 'NetworkDevice.Id', `Active` int(11) NOT NULL DEFAULT '1', `WebHosting` int(11) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=16 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Hyperlink` -- CREATE TABLE IF NOT EXISTS `Hyperlink` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `URL` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Group` int(11) NOT NULL, `IconFile` varchar(255) COLLATE utf8_czech_ci NOT NULL, `PermissionModule` varchar(255) COLLATE utf8_czech_ci NOT NULL, `PermissionOperation` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Enable` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`Id`), KEY `Group` (`Group`), KEY `Enable` (`Enable`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=70 ; -- -- RELACE PRO TABULKU `Hyperlink`: -- `Group` -- `HyperlinkGroup` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `HyperlinkGroup` -- CREATE TABLE IF NOT EXISTS `HyperlinkGroup` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=10 ; -- -------------------------------------------------------- -- -- Struktura tabulky `ISMenuItem` -- CREATE TABLE IF NOT EXISTS `ISMenuItem` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Parent` int(11) DEFAULT NULL, `Table` varchar(255) COLLATE utf8_czech_ci NOT NULL, `IconName` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `Parent` (`Parent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=40 ; -- -- RELACE PRO TABULKU `ISMenuItem`: -- `Parent` -- `ISMenuItem` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `Language` -- CREATE TABLE IF NOT EXISTS `Language` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Log` -- CREATE TABLE IF NOT EXISTS `Log` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `User` int(11) DEFAULT NULL, `Module` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `Operation` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `Value` text COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `Time` (`Time`), KEY `User` (`User`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=38283 ; -- -- RELACE PRO TABULKU `Log`: -- `User` -- `User` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `MapPosition` -- CREATE TABLE IF NOT EXISTS `MapPosition` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, `Latitude` double NOT NULL, `Longitude` double NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=767 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Meals` -- CREATE TABLE IF NOT EXISTS `Meals` ( `Date` date NOT NULL DEFAULT '0000-00-00', `Soup` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Meal` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Status` int(11) NOT NULL DEFAULT '0', UNIQUE KEY `date` (`Date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- -- -- Struktura tabulky `MealsInfo` -- CREATE TABLE IF NOT EXISTS `MealsInfo` ( `Info` text COLLATE utf8_czech_ci NOT NULL, `Price` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci ROW_FORMAT=DYNAMIC; -- -------------------------------------------------------- -- -- Struktura tabulky `Member` -- CREATE TABLE IF NOT EXISTS `Member` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Subject` int(11) NOT NULL, `ResponsibleUser` int(11) NOT NULL, `FamilyMemberCount` int(11) NOT NULL, `MembershipDate` date NOT NULL, `MemberState` int(11) NOT NULL, `GPS` int(11) NOT NULL, `BillingPeriod` int(11) NOT NULL DEFAULT '2', `NetworkSegment` int(11) DEFAULT NULL, `BillingPeriodNext` int(11) NOT NULL DEFAULT '2', `BillingPeriodLastDate` date NOT NULL, `Hire` float NOT NULL DEFAULT '0', `Blocked` int(11) NOT NULL DEFAULT '0', `PayDay` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`Id`), KEY `Subject` (`Subject`), KEY `ResponsibleUser` (`ResponsibleUser`), KEY `BillingPeriod` (`BillingPeriod`), KEY `BillingPeriodNext` (`BillingPeriodNext`), KEY `NetworkSegment` (`NetworkSegment`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=201 ; -- -- RELACE PRO TABULKU `Member`: -- `Subject` -- `Subject` -> `Id` -- `ResponsibleUser` -- `User` -> `Id` -- `BillingPeriod` -- `FinanceBillingPeriod` -> `Id` -- `BillingPeriodNext` -- `FinanceBillingPeriod` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `MemberPayment` -- CREATE TABLE IF NOT EXISTS `MemberPayment` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Member` int(11) NOT NULL, `MonthlyTotal` float NOT NULL, `MonthlyInternet` float NOT NULL, `MonthlyConsumption` float NOT NULL, `NetworkDevice` float NOT NULL, `MonthlyPlus` float NOT NULL, `Cash` float NOT NULL, PRIMARY KEY (`Id`), KEY `Member` (`Member`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=183 ; -- -- RELACE PRO TABULKU `MemberPayment`: -- `Member` -- `Member` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `MeteoStation` -- CREATE TABLE IF NOT EXISTS `MeteoStation` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, `URL` varchar(255) NOT NULL, `Enabled` tinyint(1) NOT NULL, `Period` int(11) NOT NULL, `Model` varchar(255) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Struktura tabulky `MeteoStationMeasure` -- CREATE TABLE IF NOT EXISTS `MeteoStationMeasure` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Time` datetime NOT NULL, `MeteoStation` int(11) NOT NULL, `WindSpeed` float NOT NULL, `WindDir` float NOT NULL, `WindGust` float NOT NULL, `Pressure` float NOT NULL, `SysTemp` float NOT NULL, `Temperature` float NOT NULL, `BarAltitude` float NOT NULL, `WindChill` float NOT NULL, `RelHumidity` float NOT NULL, `AbsHumidity` float NOT NULL, `DewPoint` float NOT NULL, PRIMARY KEY (`Id`), KEY `MeteoStation` (`MeteoStation`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- RELACE PRO TABULKU `MeteoStationMeasure`: -- `MeteoStation` -- `MeteoStation` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkAP` -- CREATE TABLE IF NOT EXISTS `NetworkAP` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `SSID` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Frequency` int(11) NOT NULL, `ChannelWidth` int(11) NOT NULL DEFAULT '20', `NetworkDevice` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `NetworkDevice` (`NetworkDevice`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=45 ; -- -- RELACE PRO TABULKU `NetworkAP`: -- `NetworkDevice` -- `NetworkDevice` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkConfiguration` -- CREATE TABLE IF NOT EXISTS `NetworkConfiguration` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Caption` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Execute` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Changed` int(11) NOT NULL DEFAULT '0', `LastTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `ExecutionTime` int(11) NOT NULL, `Enabled` int(11) NOT NULL DEFAULT '1', `Period` int(11) NOT NULL DEFAULT '60', `Log` mediumtext COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkDevice` -- CREATE TABLE IF NOT EXISTS `NetworkDevice` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Member` int(11) NOT NULL COMMENT 'Member', `Location` int(11) NOT NULL COMMENT 'Member', `Type` int(11) NOT NULL COMMENT 'NetworkDeviceType', `Used` int(11) NOT NULL DEFAULT '1', `Online` int(11) NOT NULL DEFAULT '0', `LastOnline` datetime NOT NULL, `PermanentOnline` int(11) NOT NULL DEFAULT '0', `InboundNATPriority` int(11) NOT NULL DEFAULT '1', `MapPosition` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Name` (`Name`), KEY `Member` (`Member`), KEY `Location` (`Location`), KEY `Type` (`Type`), KEY `MapPosition` (`MapPosition`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=645 ; -- -- RELACE PRO TABULKU `NetworkDevice`: -- `Member` -- `Member` -> `Id` -- `Location` -- `Member` -> `Id` -- `Type` -- `NetworkDeviceType` -> `Id` -- `MapPosition` -- `MapPosition` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkDeviceConfig` -- CREATE TABLE IF NOT EXISTS `NetworkDeviceConfig` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Device` int(11) NOT NULL, `Time` date NOT NULL, `ConfigFull` mediumtext NOT NULL, `ConfigCompact` mediumtext NOT NULL, PRIMARY KEY (`Id`), KEY `Time` (`Time`), KEY `Device` (`Device`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- RELACE PRO TABULKU `NetworkDeviceConfig`: -- `Device` -- `NetworkDevice` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkDeviceHistory` -- CREATE TABLE IF NOT EXISTS `NetworkDeviceHistory` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Device` int(11) NOT NULL DEFAULT '0', `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Action` int(11) NOT NULL DEFAULT '0', `Notice` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', PRIMARY KEY (`Id`), KEY `Device` (`Device`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkDeviceType` -- CREATE TABLE IF NOT EXISTS `NetworkDeviceType` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `ShowOnline` int(11) NOT NULL DEFAULT '0', `IconName` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkDomainAlias` -- CREATE TABLE IF NOT EXISTS `NetworkDomainAlias` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Target` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Name` (`Name`,`Target`), UNIQUE KEY `Name_2` (`Name`,`Target`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=39 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkFirewall` -- CREATE TABLE IF NOT EXISTS `NetworkFirewall` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `NetworkDevice` int(11) NOT NULL, `SourceInterface` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `DestinationInterface` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `SourceAddress` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `DestinationAddress` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `SourcePort` int(11) DEFAULT NULL, `DestinationPort` int(11) DEFAULT NULL, `Action` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `NetworkDevice` (`NetworkDevice`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ; -- -- RELACE PRO TABULKU `NetworkFirewall`: -- `NetworkDevice` -- `NetworkDevice` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkInterface` -- CREATE TABLE IF NOT EXISTS `NetworkInterface` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL, `Type` int(11) NOT NULL, `MAC` varchar(17) COLLATE utf8_czech_ci NOT NULL, `LocalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL, `IPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL, `ExternalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL, `Device` int(11) NOT NULL, `Online` int(11) NOT NULL DEFAULT '0', `LastOnline` datetime NOT NULL, PRIMARY KEY (`Id`), KEY `Device` (`Device`), KEY `Type` (`Type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=712 ; -- -- RELACE PRO TABULKU `NetworkInterface`: -- `Type` -- `NetworkInterfaceType` -> `Id` -- `Device` -- `NetworkDevice` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkInterfacePortable` -- CREATE TABLE IF NOT EXISTS `NetworkInterfacePortable` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `NetworkInterface` int(11) NOT NULL, `DynamicIP` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Time` datetime NOT NULL, `Update` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `NetworkInterface` (`NetworkInterface`), KEY `Update` (`Update`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkInterfaceStat` -- CREATE TABLE IF NOT EXISTS `NetworkInterfaceStat` ( `NetworkInterface` int(11) NOT NULL DEFAULT '0', `Time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `PingCount` smallint(11) NOT NULL DEFAULT '0', KEY `host_id` (`NetworkInterface`), KEY `time` (`Time`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkInterfaceType` -- CREATE TABLE IF NOT EXISTS `NetworkInterfaceType` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `MaxSpeed` int(11) NOT NULL, `FullDuplex` int(11) NOT NULL DEFAULT '1', `Color` varchar(6) COLLATE utf8_czech_ci NOT NULL DEFAULT 'ffffff', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=8 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkLink` -- CREATE TABLE IF NOT EXISTS `NetworkLink` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Type` int(11) NOT NULL, `Interface1` int(11) NOT NULL, `Interface2` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `Interface1` (`Interface1`), KEY `Interface2` (`Interface2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=356 ; -- -- RELACE PRO TABULKU `NetworkLink`: -- `Interface2` -- `NetworkInterface` -> `Id` -- `Interface1` -- `NetworkInterface` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkMangleSubgroup` -- CREATE TABLE IF NOT EXISTS `NetworkMangleSubgroup` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `AddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `AddressRange` (`AddressRange`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=147 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkMark` -- CREATE TABLE IF NOT EXISTS `NetworkMark` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Comment` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `Comment` (`Comment`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1430 ; -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkSegment` -- CREATE TABLE IF NOT EXISTS `NetworkSegment` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(128) COLLATE utf8_czech_ci NOT NULL, `Price` int(11) NOT NULL DEFAULT '0', `Parent` int(11) DEFAULT '0', `Users` int(11) NOT NULL DEFAULT '0', `Consumption` int(11) NOT NULL DEFAULT '0', `UsersOverheads` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`Id`), KEY `Parent` (`Parent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=33 ; -- -- RELACE PRO TABULKU `NetworkSegment`: -- `Parent` -- `NetworkSegment` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkSubnet` -- CREATE TABLE IF NOT EXISTS `NetworkSubnet` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `AddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Mask` int(11) NOT NULL, `DHCP` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Gateway` varchar(255) COLLATE utf8_czech_ci NOT NULL, `WINS` varchar(255) COLLATE utf8_czech_ci NOT NULL, `DNS` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Domain` varchar(255) COLLATE utf8_czech_ci NOT NULL, `NTP` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Member` int(11) DEFAULT NULL, `ExtAddressRange` varchar(255) COLLATE utf8_czech_ci NOT NULL, `ExtMask` int(11) NOT NULL DEFAULT '32', `AddressRangeIPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Configure` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`Id`), KEY `Member` (`Member`), KEY `Configure` (`Configure`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=44 ; -- -- RELACE PRO TABULKU `NetworkSubnet`: -- `Member` -- `Member` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NetworkTopology` -- CREATE TABLE IF NOT EXISTS `NetworkTopology` ( `Host` int(11) NOT NULL DEFAULT '0', `Depth` int(11) NOT NULL DEFAULT '0', `Pos` int(11) NOT NULL DEFAULT '0', `First` int(11) NOT NULL DEFAULT '0', `Last` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`Host`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; -- -------------------------------------------------------- -- -- Struktura tabulky `News` -- CREATE TABLE IF NOT EXISTS `News` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Title` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Content` text COLLATE utf8_czech_ci NOT NULL, `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `TargetDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Author` varchar(32) COLLATE utf8_czech_ci NOT NULL, `IP` varchar(16) COLLATE utf8_czech_ci NOT NULL, `Category` int(11) DEFAULT '0', `Enclosure` varchar(255) COLLATE utf8_czech_ci NOT NULL, `User` int(11) DEFAULT NULL, `Link` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `category` (`Category`), KEY `date` (`Date`), KEY `Title` (`Title`), KEY `Link` (`Link`), KEY `User` (`User`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=973387 ; -- -- RELACE PRO TABULKU `News`: -- `Category` -- `NewsCategory` -> `Id` -- `User` -- `User` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `NewsCategory` -- CREATE TABLE IF NOT EXISTS `NewsCategory` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Caption` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Permission` int(11) NOT NULL DEFAULT '0', `Sequence` int(11) NOT NULL, `Group` int(11) NOT NULL DEFAULT '1', `RSS` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `Sequence` (`Sequence`), KEY `Group` (`Group`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=17 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Panel` -- CREATE TABLE IF NOT EXISTS `Panel` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Module` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Parameters` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Order` int(11) NOT NULL, `PanelColumn` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `PanelColumn` (`PanelColumn`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=14 ; -- -- RELACE PRO TABULKU `Panel`: -- `PanelColumn` -- `PanelColumn` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `PanelColumn` -- CREATE TABLE IF NOT EXISTS `PanelColumn` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Width` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; -- -------------------------------------------------------- -- -- Struktura tabulky `PermissionGroup` -- CREATE TABLE IF NOT EXISTS `PermissionGroup` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Description` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=6 ; -- -------------------------------------------------------- -- -- Struktura tabulky `PermissionGroupAssignment` -- CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Group` int(11) NOT NULL DEFAULT '0', `AssignedGroup` int(11) DEFAULT NULL, `AssignedOperation` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Group` (`Group`), KEY `AssignedGroup` (`AssignedGroup`), KEY `AssignedOperation` (`AssignedOperation`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=48 ; -- -- RELACE PRO TABULKU `PermissionGroupAssignment`: -- `Group` -- `PermissionGroup` -> `Id` -- `AssignedGroup` -- `PermissionGroup` -> `Id` -- `AssignedOperation` -- `PermissionOperation` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `PermissionOperation` -- CREATE TABLE IF NOT EXISTS `PermissionOperation` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Module` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `Operation` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `Item` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `ItemId` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`Id`), KEY `Module` (`Module`), KEY `Operation` (`Operation`), KEY `Item` (`Item`), KEY `ItemId` (`ItemId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=45 ; -- -------------------------------------------------------- -- -- Struktura tabulky `PermissionUserAssignment` -- CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `User` int(11) NOT NULL DEFAULT '0', `AssignedGroup` int(11) DEFAULT NULL, `AssignedOperation` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `User` (`User`), KEY `AssignedGroup` (`AssignedGroup`), KEY `AssignedOperation` (`AssignedOperation`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=227 ; -- -- RELACE PRO TABULKU `PermissionUserAssignment`: -- `User` -- `User` -> `Id` -- `AssignedGroup` -- `PermissionGroup` -> `Id` -- `AssignedOperation` -- `PermissionOperation` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `PhoneBook` -- CREATE TABLE IF NOT EXISTS `PhoneBook` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Number` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Address` varchar(255) COLLATE utf8_czech_ci NOT NULL, `LastUpdate` datetime NOT NULL, `Operator` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=53 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Product` -- CREATE TABLE IF NOT EXISTS `Product` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `SellPrice` float NOT NULL, `BuyPrice` float NOT NULL, `VAT` float DEFAULT NULL, `Consumption` int(11) DEFAULT NULL COMMENT 'In Watts', `Supplier` int(11) DEFAULT NULL COMMENT 'Subject', `Manufacturer` int(11) DEFAULT NULL, `Code` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `UnitOfMeasure` int(11) NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Code` (`Code`), KEY `Supplier` (`Supplier`), KEY `UnitOfMeasure` (`UnitOfMeasure`), KEY `Manufacturer` (`Manufacturer`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=181 ; -- -- RELACE PRO TABULKU `Product`: -- `Supplier` -- `Subject` -> `Id` -- `Manufacturer` -- `Subject` -> `Id` -- `UnitOfMeasure` -- `UnitOfMeasure` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `Service` -- CREATE TABLE IF NOT EXISTS `Service` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Category` int(11) NOT NULL, `Price` int(11) NOT NULL, `CustomerCount` int(11) NOT NULL, `ReplaceId` int(11) DEFAULT NULL, `Public` int(11) NOT NULL, `InternetSpeedMin` int(11) NOT NULL, `InternetSpeedMax` int(11) NOT NULL, `UploadAsymmetry` int(11) NOT NULL, `Memory` int(11) NOT NULL, `MemorySwap` int(11) NOT NULL, `Storage` int(11) NOT NULL, `CPUCount` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `Category` (`Category`), KEY `Public` (`Public`), KEY `ReplaceId` (`ReplaceId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=16 ; -- -- RELACE PRO TABULKU `Service`: -- `ReplaceId` -- `Service` -> `Id` -- `Category` -- `ServiceCategory` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `ServiceCategory` -- CREATE TABLE IF NOT EXISTS `ServiceCategory` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; -- -------------------------------------------------------- -- -- Struktura tabulky `ServiceCustomerRel` -- CREATE TABLE IF NOT EXISTS `ServiceCustomerRel` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Service` int(11) NOT NULL, `Customer` int(11) NOT NULL, `Period` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `Service` (`Service`), KEY `Customer` (`Customer`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=511 ; -- -- RELACE PRO TABULKU `ServiceCustomerRel`: -- `Service` -- `Service` -> `Id` -- `Customer` -- `Member` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `Stock` -- CREATE TABLE IF NOT EXISTS `Stock` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Location` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Location` (`Location`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; -- -- RELACE PRO TABULKU `Stock`: -- `Location` -- `Member` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `StockItem` -- CREATE TABLE IF NOT EXISTS `StockItem` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Stock` int(11) NOT NULL, `Product` int(11) NOT NULL, `TimeEnlistment` date NOT NULL, `TimeElimination` date DEFAULT NULL, `BuyPrice` decimal(10,0) NOT NULL, `SellPrice` decimal(10,0) NOT NULL, `Amount` float NOT NULL, `SerialNumber` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `RegNumber` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL, `Location` int(11) DEFAULT NULL COMMENT 'Member', `Segment` int(11) DEFAULT NULL, `Info` text COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `SerialNumber` (`SerialNumber`), UNIQUE KEY `RegNumber` (`RegNumber`), KEY `Product` (`Product`), KEY `Stock` (`Stock`), KEY `Segment` (`Segment`), KEY `Location` (`Location`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=186 ; -- -- RELACE PRO TABULKU `StockItem`: -- `Stock` -- `Stock` -> `Id` -- `Location` -- `Member` -> `Id` -- `Product` -- `Product` -> `Id` -- `Segment` -- `NetworkSegment` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `Subject` -- CREATE TABLE IF NOT EXISTS `Subject` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `AddressStreet` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `AddressTown` varchar(64) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `AddressPSC` int(11) NOT NULL DEFAULT '0', `AddressCountry` int(11) NOT NULL, `IC` varchar(32) COLLATE utf8_czech_ci NOT NULL, `DIC` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `PayVAT` int(11) NOT NULL, `MapPosition` int(11) DEFAULT NULL, `WWW` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Note` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `AddressCountry` (`AddressCountry`), KEY `MapPosition` (`MapPosition`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=233 ; -- -- RELACE PRO TABULKU `Subject`: -- `MapPosition` -- `MapPosition` -> `Id` -- `AddressCountry` -- `Country` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `SubjectOpenTime` -- CREATE TABLE IF NOT EXISTS `SubjectOpenTime` ( `Subject` int(11) NOT NULL DEFAULT '0', `UpdateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Notice` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `Photo` int(11) NOT NULL, KEY `Subject` (`Subject`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; -- -- RELACE PRO TABULKU `SubjectOpenTime`: -- `Subject` -- `Subject` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `SubjectOpenTimeDay` -- CREATE TABLE IF NOT EXISTS `SubjectOpenTimeDay` ( `Subject` int(11) NOT NULL, `Day` int(11) NOT NULL, `Open1` int(11) NOT NULL, `Close1` int(11) NOT NULL, `Open2` int(11) NOT NULL, `Close2` int(11) NOT NULL, KEY `Subject` (`Subject`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; -- -- RELACE PRO TABULKU `SubjectOpenTimeDay`: -- `Subject` -- `Subject` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `SystemVersion` -- CREATE TABLE IF NOT EXISTS `SystemVersion` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Revision` int(11) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Task` -- CREATE TABLE IF NOT EXISTS `Task` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Description` text COLLATE utf8_czech_ci NOT NULL, `TimeCreate` date NOT NULL, `TimeDue` date DEFAULT NULL, `TimeClose` date DEFAULT NULL, `Priority` int(11) NOT NULL, `Conclusion` text COLLATE utf8_czech_ci NOT NULL, `Public` int(11) NOT NULL, `Progress` int(11) NOT NULL, `Group` int(11) DEFAULT NULL, `AssignedTo` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Group` (`Group`), KEY `AssignedTo` (`AssignedTo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ; -- -- RELACE PRO TABULKU `Task`: -- `Group` -- `TaskGroup` -> `Id` -- `AssignedTo` -- `User` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `TaskGroup` -- CREATE TABLE IF NOT EXISTS `TaskGroup` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Description` text COLLATE utf8_czech_ci NOT NULL, `Parent` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Parent` (`Parent`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ; -- -- RELACE PRO TABULKU `TaskGroup`: -- `Parent` -- `TaskGroup` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `TV` -- CREATE TABLE IF NOT EXISTS `TV` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL, `Frequency` int(11) NOT NULL DEFAULT '0', `Norm` varchar(8) COLLATE utf8_czech_ci NOT NULL, `Homepage` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Language` int(11) DEFAULT NULL, `ShortName` varchar(16) COLLATE utf8_czech_ci NOT NULL, `Stream` varchar(255) COLLATE utf8_czech_ci NOT NULL, `StreamWeb` varchar(255) COLLATE utf8_czech_ci NOT NULL, `SourceType` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Category` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `ShortName` (`ShortName`), KEY `Language` (`Language`), KEY `Category` (`Category`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=46 ; -- -- RELACE PRO TABULKU `TV`: -- `Language` -- `Language` -> `Id` -- `Category` -- `TVGroup` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `TVGroup` -- CREATE TABLE IF NOT EXISTS `TVGroup` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=7 ; -- -------------------------------------------------------- -- -- Struktura tabulky `UnitOfMeasure` -- CREATE TABLE IF NOT EXISTS `UnitOfMeasure` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Unit` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ; -- -------------------------------------------------------- -- -- Struktura tabulky `User` -- CREATE TABLE IF NOT EXISTS `User` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Login` varchar(64) COLLATE utf8_czech_ci NOT NULL, `Name` varchar(128) COLLATE utf8_czech_ci NOT NULL, `Password` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Salt` varchar(255) COLLATE utf8_czech_ci NOT NULL, `Email` varchar(128) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `LastIpAddress` varchar(16) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `LastLoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `RegistrationTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Locked` tinyint(1) NOT NULL DEFAULT '0', `ICQ` int(11) NOT NULL DEFAULT '0', `PhoneNumber` varchar(32) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `InitPassword` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `Name` (`Login`), UNIQUE KEY `Nick` (`Name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=253 ; -- -------------------------------------------------------- -- -- Struktura tabulky `UserCustomerRel` -- CREATE TABLE IF NOT EXISTS `UserCustomerRel` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Customer` int(11) NOT NULL, `User` int(11) NOT NULL, PRIMARY KEY (`Id`), KEY `Customer` (`Customer`), KEY `User` (`User`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=521 ; -- -- RELACE PRO TABULKU `UserCustomerRel`: -- `Customer` -- `Member` -> `Id` -- `User` -- `User` -> `Id` -- -- -------------------------------------------------------- -- -- Struktura tabulky `UserOnline` -- CREATE TABLE IF NOT EXISTS `UserOnline` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `User` int(11) DEFAULT NULL COMMENT 'User.Id', `ActivityTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `LoginTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SessionId` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `IpAddress` varchar(16) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `HostName` varchar(255) COLLATE utf8_czech_ci NOT NULL DEFAULT '', `ScriptName` varchar(255) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`Id`), KEY `User` (`User`) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2430 ; -- -------------------------------------------------------- -- -- Struktura tabulky `Work` -- CREATE TABLE IF NOT EXISTS `Work` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, `Description` text, `TimeStart` datetime NOT NULL, `Duration` float NOT NULL, `User` int(11) DEFAULT NULL, `Task` int(11) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `User` (`User`), KEY `Task` (`Task`), KEY `TimeStart` (`TimeStart`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- RELACE PRO TABULKU `Work`: -- `User` -- `User` -> `Id` -- `Task` -- `Task` -> `Id` -- -- -- Omezení pro exportované tabulky -- -- -- Omezení pro tabulku `DocumentLineSequence` -- ALTER TABLE `DocumentLineSequence` ADD CONSTRAINT `DocumentLineSequence_ibfk_1` FOREIGN KEY (`DocumentLine`) REFERENCES `DocumentLine` (`Id`), ADD CONSTRAINT `DocumentLineSequence_ibfk_2` FOREIGN KEY (`FinanceYear`) REFERENCES `FinanceYear` (`Id`); -- -- Omezení pro tabulku `File` -- ALTER TABLE `File` ADD CONSTRAINT `File_ibfk_1` FOREIGN KEY (`Directory`) REFERENCES `FileDirectory` (`Id`); -- -- Omezení pro tabulku `FileDirectory` -- ALTER TABLE `FileDirectory` ADD CONSTRAINT `FileDirectory_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `FileDirectory` (`Id`); -- -- Omezení pro tabulku `FinanceBankAccount` -- ALTER TABLE `FinanceBankAccount` ADD CONSTRAINT `FinanceBankAccount_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); -- -- Omezení pro tabulku `FinanceBillsItemsOld` -- ALTER TABLE `FinanceBillsItemsOld` ADD CONSTRAINT `FinanceBillsItemsOld_ibfk_1` FOREIGN KEY (`Bill`) REFERENCES `FinanceBillsOld` (`Id`); -- -- Omezení pro tabulku `FinanceBillsOld` -- ALTER TABLE `FinanceBillsOld` ADD CONSTRAINT `FinanceBillsOld_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); -- -- Omezení pro tabulku `FinanceInvoice` -- ALTER TABLE `FinanceInvoice` ADD CONSTRAINT `FinanceInvoice_ibfk_2` FOREIGN KEY (`File`) REFERENCES `File` (`Id`), ADD CONSTRAINT `FinanceInvoice_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); -- -- Omezení pro tabulku `FinanceInvoiceItem` -- ALTER TABLE `FinanceInvoiceItem` ADD CONSTRAINT `FinanceInvoiceItem_ibfk_1` FOREIGN KEY (`FinanceInvoice`) REFERENCES `FinanceInvoice` (`Id`); -- -- Omezení pro tabulku `FinanceOperation` -- ALTER TABLE `FinanceOperation` ADD CONSTRAINT `FinanceOperation_ibfk_5` FOREIGN KEY (`File`) REFERENCES `File` (`Id`), ADD CONSTRAINT `FinanceOperation_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`), ADD CONSTRAINT `FinanceOperation_ibfk_3` FOREIGN KEY (`BankAccount`) REFERENCES `FinanceBankAccount` (`Id`), ADD CONSTRAINT `FinanceOperation_ibfk_4` FOREIGN KEY (`Treasury`) REFERENCES `FinanceTreasury` (`Id`); -- -- Omezení pro tabulku `Hyperlink` -- ALTER TABLE `Hyperlink` ADD CONSTRAINT `Hyperlink_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `HyperlinkGroup` (`Id`); -- -- Omezení pro tabulku `ISMenuItem` -- ALTER TABLE `ISMenuItem` ADD CONSTRAINT `ISMenuItem_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `ISMenuItem` (`Id`); -- -- Omezení pro tabulku `Log` -- ALTER TABLE `Log` ADD CONSTRAINT `Log_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`); -- -- Omezení pro tabulku `Member` -- ALTER TABLE `Member` ADD CONSTRAINT `Member_ibfk_23` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`), ADD CONSTRAINT `Member_ibfk_24` FOREIGN KEY (`ResponsibleUser`) REFERENCES `User` (`Id`), ADD CONSTRAINT `Member_ibfk_27` FOREIGN KEY (`BillingPeriod`) REFERENCES `FinanceBillingPeriod` (`Id`), ADD CONSTRAINT `Member_ibfk_28` FOREIGN KEY (`BillingPeriodNext`) REFERENCES `FinanceBillingPeriod` (`Id`); -- -- Omezení pro tabulku `MemberPayment` -- ALTER TABLE `MemberPayment` ADD CONSTRAINT `MemberPayment_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`); -- -- Omezení pro tabulku `MeteoStationMeasure` -- ALTER TABLE `MeteoStationMeasure` ADD CONSTRAINT `MeteoStationMeasure_ibfk_1` FOREIGN KEY (`MeteoStation`) REFERENCES `MeteoStation` (`Id`); -- -- Omezení pro tabulku `NetworkAP` -- ALTER TABLE `NetworkAP` ADD CONSTRAINT `NetworkAP_ibfk_1` FOREIGN KEY (`NetworkDevice`) REFERENCES `NetworkDevice` (`Id`); -- -- Omezení pro tabulku `NetworkDevice` -- ALTER TABLE `NetworkDevice` ADD CONSTRAINT `NetworkDevice_ibfk_4` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`), ADD CONSTRAINT `NetworkDevice_ibfk_5` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`), ADD CONSTRAINT `NetworkDevice_ibfk_6` FOREIGN KEY (`Type`) REFERENCES `NetworkDeviceType` (`Id`), ADD CONSTRAINT `NetworkDevice_ibfk_7` FOREIGN KEY (`MapPosition`) REFERENCES `MapPosition` (`Id`); -- -- Omezení pro tabulku `NetworkDeviceConfig` -- ALTER TABLE `NetworkDeviceConfig` ADD CONSTRAINT `NetworkDeviceConfig_ibfk_1` FOREIGN KEY (`Device`) REFERENCES `NetworkDevice` (`Id`); -- -- Omezení pro tabulku `NetworkFirewall` -- ALTER TABLE `NetworkFirewall` ADD CONSTRAINT `NetworkFirewall_ibfk_1` FOREIGN KEY (`NetworkDevice`) REFERENCES `NetworkDevice` (`Id`); -- -- Omezení pro tabulku `NetworkInterface` -- ALTER TABLE `NetworkInterface` ADD CONSTRAINT `NetworkInterface_ibfk_1` FOREIGN KEY (`Type`) REFERENCES `NetworkInterfaceType` (`Id`), ADD CONSTRAINT `NetworkInterface_ibfk_2` FOREIGN KEY (`Device`) REFERENCES `NetworkDevice` (`Id`); -- -- Omezení pro tabulku `NetworkLink` -- ALTER TABLE `NetworkLink` ADD CONSTRAINT `NetworkLink_ibfk_2` FOREIGN KEY (`Interface2`) REFERENCES `NetworkInterface` (`Id`), ADD CONSTRAINT `NetworkLink_ibfk_1` FOREIGN KEY (`Interface1`) REFERENCES `NetworkInterface` (`Id`); -- -- Omezení pro tabulku `NetworkSegment` -- ALTER TABLE `NetworkSegment` ADD CONSTRAINT `NetworkSegment_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `NetworkSegment` (`Id`); -- -- Omezení pro tabulku `NetworkSubnet` -- ALTER TABLE `NetworkSubnet` ADD CONSTRAINT `NetworkSubnet_ibfk_1` FOREIGN KEY (`Member`) REFERENCES `Member` (`Id`); -- -- Omezení pro tabulku `News` -- ALTER TABLE `News` ADD CONSTRAINT `News_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `NewsCategory` (`Id`), ADD CONSTRAINT `News_ibfk_2` FOREIGN KEY (`User`) REFERENCES `User` (`Id`); -- -- Omezení pro tabulku `Panel` -- ALTER TABLE `Panel` ADD CONSTRAINT `Panel_ibfk_1` FOREIGN KEY (`PanelColumn`) REFERENCES `PanelColumn` (`Id`); -- -- Omezení pro tabulku `PermissionGroupAssignment` -- ALTER TABLE `PermissionGroupAssignment` ADD CONSTRAINT `PermissionGroupAssignment_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `PermissionGroup` (`Id`), ADD CONSTRAINT `PermissionGroupAssignment_ibfk_2` FOREIGN KEY (`AssignedGroup`) REFERENCES `PermissionGroup` (`Id`), ADD CONSTRAINT `PermissionGroupAssignment_ibfk_3` FOREIGN KEY (`AssignedOperation`) REFERENCES `PermissionOperation` (`Id`); -- -- Omezení pro tabulku `PermissionUserAssignment` -- ALTER TABLE `PermissionUserAssignment` ADD CONSTRAINT `PermissionUserAssignment_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`), ADD CONSTRAINT `PermissionUserAssignment_ibfk_2` FOREIGN KEY (`AssignedGroup`) REFERENCES `PermissionGroup` (`Id`), ADD CONSTRAINT `PermissionUserAssignment_ibfk_3` FOREIGN KEY (`AssignedOperation`) REFERENCES `PermissionOperation` (`Id`); -- -- Omezení pro tabulku `Product` -- ALTER TABLE `Product` ADD CONSTRAINT `Product_ibfk_1` FOREIGN KEY (`Supplier`) REFERENCES `Subject` (`Id`), ADD CONSTRAINT `Product_ibfk_2` FOREIGN KEY (`Manufacturer`) REFERENCES `Subject` (`Id`), ADD CONSTRAINT `Product_ibfk_3` FOREIGN KEY (`UnitOfMeasure`) REFERENCES `UnitOfMeasure` (`Id`); -- -- Omezení pro tabulku `Service` -- ALTER TABLE `Service` ADD CONSTRAINT `Service_ibfk_2` FOREIGN KEY (`ReplaceId`) REFERENCES `Service` (`Id`), ADD CONSTRAINT `Service_ibfk_1` FOREIGN KEY (`Category`) REFERENCES `ServiceCategory` (`Id`); -- -- Omezení pro tabulku `ServiceCustomerRel` -- ALTER TABLE `ServiceCustomerRel` ADD CONSTRAINT `ServiceCustomerRel_ibfk_3` FOREIGN KEY (`Service`) REFERENCES `Service` (`Id`), ADD CONSTRAINT `ServiceCustomerRel_ibfk_2` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`); -- -- Omezení pro tabulku `Stock` -- ALTER TABLE `Stock` ADD CONSTRAINT `Stock_ibfk_1` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`); -- -- Omezení pro tabulku `StockItem` -- ALTER TABLE `StockItem` ADD CONSTRAINT `StockItem_ibfk_1` FOREIGN KEY (`Stock`) REFERENCES `Stock` (`Id`), ADD CONSTRAINT `StockItem_ibfk_3` FOREIGN KEY (`Location`) REFERENCES `Member` (`Id`), ADD CONSTRAINT `StockItem_ibfk_5` FOREIGN KEY (`Product`) REFERENCES `Product` (`Id`), ADD CONSTRAINT `StockItem_ibfk_6` FOREIGN KEY (`Segment`) REFERENCES `NetworkSegment` (`Id`); -- -- Omezení pro tabulku `Subject` -- ALTER TABLE `Subject` ADD CONSTRAINT `Subject_ibfk_2` FOREIGN KEY (`MapPosition`) REFERENCES `MapPosition` (`Id`), ADD CONSTRAINT `Subject_ibfk_1` FOREIGN KEY (`AddressCountry`) REFERENCES `Country` (`Id`); -- -- Omezení pro tabulku `SubjectOpenTime` -- ALTER TABLE `SubjectOpenTime` ADD CONSTRAINT `SubjectOpenTime_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); -- -- Omezení pro tabulku `SubjectOpenTimeDay` -- ALTER TABLE `SubjectOpenTimeDay` ADD CONSTRAINT `SubjectOpenTimeDay_ibfk_1` FOREIGN KEY (`Subject`) REFERENCES `Subject` (`Id`); -- -- Omezení pro tabulku `Task` -- ALTER TABLE `Task` ADD CONSTRAINT `Task_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `TaskGroup` (`Id`), ADD CONSTRAINT `Task_ibfk_2` FOREIGN KEY (`AssignedTo`) REFERENCES `User` (`Id`); -- -- Omezení pro tabulku `TaskGroup` -- ALTER TABLE `TaskGroup` ADD CONSTRAINT `TaskGroup_ibfk_1` FOREIGN KEY (`Parent`) REFERENCES `TaskGroup` (`Id`); -- -- Omezení pro tabulku `TV` -- ALTER TABLE `TV` ADD CONSTRAINT `TV_ibfk_1` FOREIGN KEY (`Language`) REFERENCES `Language` (`Id`), ADD CONSTRAINT `TV_ibfk_2` FOREIGN KEY (`Category`) REFERENCES `TVGroup` (`Id`); -- -- Omezení pro tabulku `UserCustomerRel` -- ALTER TABLE `UserCustomerRel` ADD CONSTRAINT `usercustomerrel_ibfk_1` FOREIGN KEY (`Customer`) REFERENCES `Member` (`Id`), ADD CONSTRAINT `usercustomerrel_ibfk_2` FOREIGN KEY (`User`) REFERENCES `User` (`Id`); -- -- Omezení pro tabulku `Work` -- ALTER TABLE `Work` ADD CONSTRAINT `Work_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`), ADD CONSTRAINT `Work_ibfk_2` FOREIGN KEY (`Task`) REFERENCES `Task` (`Id`); "); $Manager->Execute("INSERT INTO `SystemVersion` (`Id`, `Revision`) VALUES (1, 495);"); } function InsertSampleData($Manager) { $Manager->Execute("INSERT INTO `Country` (`Id`, `Name`) VALUES (1, 'Česká Republika'), (2, 'Slovenská Republika'), (3, 'Litva'), (4, 'Rakousko'), (5, 'Německo'), (6, 'Polsko'), (7, 'Francie'), (8, 'Itálie');"); $Manager->Execute("INSERT INTO `User` (`Id`, `Login`, `Name`, `Password`, `Salt`, `Email`, `LastIpAddress`, `LastLoginTime`, `RegistrationTime`, `Locked`, `ICQ`, `PhoneNumber`, `InitPassword`) VALUES (1, 'admin', 'Správce', '05d97409afcce47d028c0d2a04cf359998cbaaf1', 'b295d117135a9763da282e7dae73a5ca7d3e5b11', 'admin@localhost', '', '0000-00-00 00:00:00', '2013-03-01 19:40:22', 0, 0, '+420123456789', '');"); $Manager->Execute("INSERT INTO `MapPosition` (`Id`, `Name`, `Latitude`, `Longitude`) VALUES (1, 'Franta Vopršálek', 47.555, 11.082)"); $Manager->Execute("INSERT INTO `Subject` (`Id`, `Name`, `AddressStreet`, `AddressTown`, `AddressPSC`, `AddressCountry`, `IC`, `DIC`, `PayVAT`, `MapPosition`, `WWW`, `Note`) VALUES (1, 'Franta Vopršálek', 'Na hradě 1001', 'Bouzov', 12345, 1, '12345667', 'CZ1234567890', 0, 1, '', '');"); $Manager->Execute("INSERT INTO `UnitOfMeasure` (`Id`, `Unit`, `Name`) VALUES (1, 'ks', 'kus'), (2, 'l', 'litr'), (3, 'g', 'gram'), (4, 'Kg', 'Kilogram'), (5, 'm', 'metr'), (6, 'km', 'kilometr'), (7, 'mm', 'milimetr'), (8, 'cm', 'centimetr'), (9, 'Mbit/s', 'megabity za sekundu'), (10, 'bit/s', 'bity za sekundu');"); $Manager->Execute("INSERT INTO `TVGroup` (`Id`, `Name`) VALUES (1, 'Sportovní'), (2, 'Zábavný'), (3, 'Hudební'), (4, 'Zpravodajský'), (5, 'Regionální'), (6, 'Filmový');"); $Manager->Execute("INSERT INTO `HyperlinkGroup` (`Id`, `Name`) VALUES (1, 'Síť'), (2, 'Místní organizace'), (3, 'Stránky občanů'), (4, 'Vyhledávání'), (5, 'Užitečné'), (6, 'Zábava'), (7, 'Hostované stránky'), (8, 'Prodej počítačů'), (9, 'Různé');"); $Manager->Execute("INSERT INTO `Language` (`Id`, `Name`) VALUES (1, 'Česky'), (2, 'Slovensky'), (3, 'Anglicky'), (4, 'Německy'), (6, 'Polsky');"); $Manager->Execute("INSERT INTO `Hyperlink` (`Id`, `Name`, `URL`, `Group`, `IconFile`, `PermissionModule`, `PermissionOperation`, `Enable`) VALUES (1, 'Finance', '/finance/', 1, 'money.png', '', '', 1), (2, 'Statistika', 'http://stat.zdechov.net/centrala/', 1, 'chart.png', '', '', 1), (3, 'Seznam uživatelů', '/userlist.php', 1, 'comp.png', '', '', 1), (4, 'Seznam počítačů', '/hostlist.php', 1, 'comp.png', '', '', 1), (5, 'Sdílení souborů', 'http://wiki.zdechov.net/index.php/DC_hub', 1, 'prohledavac_sdileni.png', '', '', 0), (6, 'Historie chatu', '/chat/history.php', 9, 'sunrisechat.png', 'Chat', 'Display', 0), (7, 'Webový chat', 'http://embed.mibbit.com/?server=game.zdechov.net%3A6667&channel=%23zdechov&forcePrompt=true&charset=utf-8', 9, 'sunrisechat.png', '', '', 1), (8, 'Fotogalerie', '/galerie/', 9, 'gallery.png', '', '', 1), (9, 'Diskusní fórum', 'http://forum.zdechov.net/', 9, 'discus.png', '', '', 1), (10, 'WebMail', 'https://mail.zdechov.net/', 9, 'openwebmail.png', '', '', 1), (11, 'Jídelníček', '/jidelna/', 9, 'apple.png', '', '', 1), (12, 'Mapa sítě', '/map/', 1, 'map.png', '', '', 1), (13, 'Otvírací doby', '/otevreno.php', 9, 'otv_doby.png', '', '', 1), (14, 'Wiki', 'http://wiki.zdechov.net/', 9, 'clear.png', '', '', 1), (15, 'Topologie sítě', '/is/topologie.php', 1, 'topologie.png', '', '', 1), (16, 'Technické informace', '/network.php', 1, 'tech.png', '', '', 1), (17, 'Webkamery', 'http://www.zdechov.net/kamery/', 9, 'camera.png', '', '', 1), (18, 'ZděchovNET', 'http://www.zdechov.net/', 1, '', '', '', 1), (21, 'Obecní úřad', 'http://www.zdechov.cz/', 2, 'obec_zdechov.png', '', '', 1), (22, 'Motokrosová grapa', 'http://zdechovskagrapa.sweb.cz/', 2, '', '', '', 1), (23, 'Skiareál', 'http://skiareal.zdechov.net/', 2, 'www_snbzdechov_com.png', '', '', 1), (24, 'Sbor dobrovolných hasičů', 'http://sdh.zdechov.net/', 2, '', '', '', 1), (25, 'TJ Sokol', 'http://fotbal.zdechov.net/', 2, 'socer.png', '', '', 1), (26, 'Farnost', 'http://farnost.zdechov.net/', 2, 'cfix.png', '', '', 1), (27, 'Staněk Tatra team', 'http://www.stanek-tatra.cz/', 3, 'www_stanek-tatra_cz.png', '', '', 1), (28, 'Zděchov.eu', 'http://www.zdechov.eu/', 3, 'obec_zdechov.png', '', '', 1), (29, 'Google', 'http://www.google.cz/', 4, 'www_google_cz.png', '', '', 1), (30, 'Morfeo', 'http://morfeo.centrum.cz/', 4, 'morfeo.png', '', '', 0), (31, 'Centrum', 'http://www.centrum.cz/', 4, 'www_centrum_cz.png', '', '', 1), (32, 'Seznam', 'http://www.seznam.cz/', 4, 'www_seznam_cz.png', '', '', 1), (33, 'Atlas', 'http://www.atlas.cz/', 4, 'www_atlas_cz.png', '', '', 1), (34, 'Tiscali', 'http://www.tiscali.cz/', 4, 'www_tiscali_cz.png', '', '', 1), (35, 'Mapa ČR', 'http://www.mapy.cz/', 5, 'www_mapy_cz.png', '', '', 1), (36, 'Online TV', 'http://www.tvinfo.cz/live/televize/evropa/cz', 5, 'www_tvinfo_cz.png', '', '', 1), (37, 'Jízdní řády', 'http://jizdnirady.idnes.cz/', 5, 'www_idos_cz.png', '', '', 1), (38, 'TV programy', 'http://tv.atlas.cz/', 5, 'www_atlas_cz.png', '', '', 1), (39, 'ICQ', 'http://www.icq.com/download/icq2go/', 5, 'www_icq_com.png', '', '', 1), (40, 'Slovníky', 'http://www.slovnik.cz/', 5, 'www_slovnik_cz.png', '', '', 1), (41, 'Počasí', 'http://www.meteopress.cz/', 5, 'pocasi.png', '', '', 1), (42, 'T-Mobile SMS', 'http://www.tzones.cz/', 5, 'www_tzones_cz.png', '', '', 1), (43, 'Knihovna Vsetín', 'http://www.mvk.cz/', 5, 'www_mvk_cz.png', '', '', 1), (44, 'Youtube', 'http://www.youtube.com/', 6, 'www_youtube_com.png', '', '', 1), (45, 'Stream.cz', 'http://www.stream.cz/', 6, 'www_stream_cz.png', '', '', 1), (46, 'Last.fm', 'http://www.last.fm/', 6, 'www_last_fm.png', '', '', 1), (47, 'Ulož.to', 'http://uloz.to/', 6, 'uloz_to.png', '', '', 1), (48, 'SOFTCOM', 'http://www.softcom.cz', 8, 'www_computershop_cz.png', '', '', 1), (49, 'Alfacomp', 'http://www.alfacomp.cz/php/zbozi.php?akc=2', 8, 'www_alfacomp_cz.png', '', '', 1), (50, 'Petracomp', 'http://www.petracomp.cz/', 8, 'www_petracomp_cz.png', '', '', 0), (51, 'TS Bohemia', 'http://interlink.tsbohemia.cz/', 8, 'www_tsbohemia_cz.png', '', '', 1), (58, 'Volný', 'http://web.volny.cz/', 4, 'volny.png', '', '', 1), (61, 'Test rychlost', 'http://rychlost.cz/', 5, 'rychlost_cz.png', '', '', 1), (62, 'Zděchov na Facebooku', 'http://www.facebook.com/group.php?gid=180682342445', 3, 'facebook.png', '', '', 1), (63, 'Pizzerie Zádilský', 'http://pizzerie.huslenky.cz/', 5, '', '', '', 1), (64, 'Televize', '/tv/', 1, 'tv.png', '', '', 1), (65, 'Telefonní seznam', 'http://wiki.zdechov.net/wiki/Telefonní_seznam', 9, 'tel.png', '', '', 1), (66, 'JT Servis', 'http://jtservis.cz/', 3, '', '', '', 1), (67, 'Speedtest mini', '/speedtestnet/', 1, 'speedtestnet.png', '', '', 1), (68, 'Zděchovská 30', 'http://tricitka.zdechov.net', 2, '', '', '', 1), (69, 'ZŠ a MŠ Zděchov', 'http://zsams.zdechov.net', 2, '', '', '', 1);"); $Manager->Execute("INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (1, 'DNS server (named)', '/usr/bin/php dns.php|/etc/init.d/named reload', 0, '2013-02-04 00:36:38', 0, 1, 60, ''), (2, 'Firewall rules (iptables)', '/usr/bin/php iptables.php', 0, '2008-12-06 17:36:26', 0, 0, 60, ''), (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, ''), (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, ''), (5, 'VPN server (pptpd)', '/usr/bin/php vpn.php|/a/bin/vpn.sh', 0, '2008-04-26 08:33:50', 0, 0, 60, ''); INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (7, 'DHCP server (/ip dhcp-server lease)', '/usr/bin/php dhcp.php', 0, '2013-01-01 16:00:44', 48, 1, 60, ''); INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (8, 'Netwatch (/tool netwatch)', '/usr/bin/php netwatch.php', 0, '2012-12-01 15:18:53', 39, 1, 60, ''); INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (9, 'Queue (/queue tree)', '/usr/bin/php queue.php', 0, '2013-02-04 00:07:06', 4, 1, 60, ''); INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (10, 'Network translation (/ip firewall nat)', '/usr/bin/php firewall_nat.php', 0, '2013-01-27 17:25:33', 3, 1, 60, ''); INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (11, 'Traffic marking (/ip firewall mangle)', '/usr/bin/php firewall_mangle.php', 0, '2013-02-04 00:05:31', 4, 1, 60, ''); INSERT INTO `NetworkConfiguration` (`Id`, `Caption`, `Execute`, `Changed`, `LastTime`, `ExecutionTime`, `Enabled`, `Period`, `Log`) VALUES (12, 'Firewall filter (/ip firewall filter)', '/usr/bin/php firewall_filter.php', 0, '2011-01-15 09:32:57', 0, 1, 60, ''), (13, 'DNS server (routerboard)', '/usr/bin/php dns_routerboard.php', 0, '0000-00-00 00:00:00', 0, 1, 60, '');"); $Manager->Execute("INSERT INTO `NetworkDeviceType` (`Id`, `Name`, `ShowOnline`, `IconName`) VALUES (1, 'Server', 0, 'device'), (2, 'Stolní počítač', 1, 'comp'), (3, 'Přenosný počítač', 1, 'comp'), (4, 'Směrovač', 0, 'device'), (5, 'Rozbočovač', 0, 'device'), (6, 'Tiskárna', 0, 'device'), (7, 'Telefón', 0, 'device'), (8, 'PDA/MDA', 1, 'comp'), (9, 'Kamera', 0, 'device'), (10, 'Meteostanice', 1, 'device');"); $Manager->Execute("INSERT INTO `NetworkInterfaceType` (`Id`, `Name`, `MaxSpeed`, `FullDuplex`, `Color`) VALUES (1, 'Fast Ethernet', 100, 1, 'ffffff'), (2, 'Gigabit Ethernet', 1000, 1, 'ffffff'), (3, 'Ethernet', 10, 1, 'ffffff'), (4, 'Wi-Fi 802.11b', 11, 0, 'ffffff'), (5, 'Wi-Fi 802.11b/g', 54, 0, 'ffffff'), (6, 'Wi-Fi 802.11a/b/g', 54, 0, 'ffffff'), (7, 'Wi-Fi 802.11n', 300, 0, 'ffffff');"); $Manager->Execute("INSERT INTO `NetworkSubnet` (`Id`, `Name`, `AddressRange`, `Mask`, `DHCP`, `Gateway`, `WINS`, `DNS`, `Domain`, `NTP`, `Member`, `ExtAddressRange`, `ExtMask`, `AddressRangeIPv6`, `Configure`) VALUES (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), (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);"); $Manager->Execute("INSERT INTO `PanelColumn` (`Id`, `Width`) VALUES (1, ''), (2, ''), (3, '70%');"); $Manager->Execute("INSERT INTO `Panel` (`Id`, `Module`, `Parameters`, `Order`, `PanelColumn`) VALUES (1, 'HyperlinkGroup', '1', 2, 1), (3, 'HyperlinkGroup', '4', 1, 2), (4, 'HyperlinkGroup', '5', 2, 2), (5, 'HyperlinkGroup', '6', 3, 2), (6, 'HyperlinkGroup', '2', 4, 2), (7, 'HyperlinkGroup', '3', 5, 2), (8, 'NewsGroupList', '', 2, 3), (9, 'Webcam', '', 3, 1), (11, 'UserOptions', '', 1, 3), (13, 'HyperlinkGroup', '9', 1, 1);"); $Manager->Execute("INSERT INTO `NewsCategory` (`Id`, `Caption`, `Permission`, `Sequence`, `Group`, `RSS`) VALUES (1, 'Různé informace', 1, 3, 2, ''), (2, 'Bazar', 1, 6, 2, ''), (3, 'Dění v obci', 1, 2, 2, ''), (4, 'Diskusní fórum', 0, 10, 1, ''), (5, 'Správa sítě - oznámení', 0, 1, 1, ''), (6, 'Správa sítě - výpadky', 0, 13, 1, ''), (8, 'Fotbal', 1, 4, 2, ''), (9, 'Správa sítě - změny zařízení', 0, 12, 1, ''), (10, 'Multimediální archív', 0, 11, 1, ''), (11, 'Obecní úřad - úřední deska', 0, 7, 2, ''), (12, 'Obecní úřad - aktuality', 0, 8, 2, ''), (13, 'TV Beskyd', 0, 9, 1, ''), (14, 'Hokej', 1, 5, 2, ''), (15, 'Kino Vatra', 0, 15, 1, 'http://www.dkvsetin.cz/rss/kino/8'), (16, 'Obec Hovězí', 0, 16, 1, 'http://www.obec-hovezi.cz/web/rss.xml');"); $Manager->Execute("INSERT INTO `FinanceBillingPeriod` (`Id`, `Name`, `MonthCount`) VALUES (1, 'Nikdy', 0), (2, 'Měsíčně', 1), (3, 'Čtvrtletně', 3), (4, 'Pololetně', 6), (5, 'Ročně', 12);"); $Manager->Execute("INSERT INTO `Member` (`Id`, `Name`, `Subject`, `ResponsibleUser`, `FamilyMemberCount`, `MembershipDate`, `MemberState`, `GPS`, `BillingPeriod`, `NetworkSegment`, `BillingPeriodNext`, `BillingPeriodLastDate`, `Hire`, `Blocked`, `PayDay`) VALUES (1, 'Franta Vopršálek', 1, 1, 5, '2004-07-31', 0, 0, 1, 5, 1, '2009-03-31', 0, 0, 1);"); $Manager->Execute("INSERT INTO `PermissionGroup` (`Id`, `Description`) VALUES (1, 'Ostatní'), (2, 'Registrovaní uživatelé'), (3, 'Zástupci za domácnost'), (4, 'Správci sítě'), (5, 'Systémoví administrátoři');"); $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (1, 'News', 'Display', 'Item', 0), (2, 'News', 'Insert', '', 0), (3, 'News', 'Display', 'Item', 0), (4, 'News', 'Insert', 'Group', 5), (5, 'News', 'Display', 'Group', 5), (6, 'News', 'Insert', 'Group', 1), (7, 'News', 'Display', 'Group', 1), (8, 'News', 'Insert', 'Group', 2), (9, 'News', 'Display', 'Group', 2), (10, 'News', 'Insert', 'Group', 3), (11, 'News', 'Display', 'Group', 3), (12, 'News', 'Insert', 'Group', 4), (13, 'News', 'Display', 'Group', 4), (14, 'News', 'Insert', 'Group', 6), (15, 'News', 'Display', 'Group', 6), (16, 'News', 'Insert', 'Group', 8), (17, 'News', 'Display', 'Group', 8), (18, 'News', 'Insert', 'Group', 9), (19, 'News', 'Display', 'Group', 9), (20, 'News', 'Insert', 'Group', 10), (21, 'News', 'Display', 'Group', 10), (22, 'News', 'Insert', 'Group', 11), (23, 'News', 'Display', 'Group', 11), (24, 'News', 'Insert', 'Group', 12), (25, 'News', 'Display', 'Group', 12), (26, 'Chat', 'Display', '', 0), (27, 'Share', 'Display', '', 0), (28, 'Finance', 'DisplaySubjectState', '', 0), (29, 'EatingPlace', 'Edit', '', 0), (30, 'Finance', 'Manage', '', 0), (31, 'Network', 'Edit', '', 0), (32, 'Finance', 'SubjectList', '', 0), (33, 'Network', 'Administration', '', 0), (34, 'Log', 'Show', '', 0), (35, 'Network', 'RegistredHostList', '', 0), (36, 'Finance', 'TradingStatus', '', 0), (37, 'Finance', 'MemberOptions', '', 0), (38, 'SubjectOpenTime', 'Edit', '', 0), (39, 'News', 'Display', 'Group', 13), (40, 'News', 'Insert', 'Group', 14), (41, 'News', 'Display', 'Group', 14), (42, 'News', 'Display', 'Group', 15), (43, 'News', 'Display', 'Group', 16), (44, 'IS', 'Manage', '', 0);"); $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (1, 2, 1, NULL), (2, 3, 2, NULL), (3, 4, 3, NULL), (4, 5, 4, NULL), (5, 1, NULL, 1), (6, 2, NULL, 2), (7, 1, NULL, 3), (8, 1, NULL, 5), (9, 4, NULL, 4), (10, 1, NULL, 7), (11, 2, NULL, 6), (12, 1, NULL, 9), (13, 2, NULL, 8), (14, 1, NULL, 11), (15, 2, NULL, 10), (16, 1, NULL, 13), (17, 4, NULL, 12), (18, 1, NULL, 15), (19, 4, NULL, 14), (20, 1, NULL, 17), (21, 2, NULL, 16), (22, 1, NULL, 19), (23, 4, NULL, 18), (24, 1, NULL, 21), (25, 4, NULL, 20), (26, 1, NULL, 23), (27, 4, NULL, 22), (28, 1, NULL, 25), (29, 4, NULL, 24), (30, 1, NULL, 26), (31, 2, NULL, 27), (32, 3, NULL, 28), (33, 4, NULL, 30), (34, 4, NULL, 31), (35, 4, NULL, 32), (36, 4, NULL, 33), (37, 4, NULL, 34), (38, 3, NULL, 35), (39, 5, NULL, 36), (40, 3, NULL, 37), (41, 4, NULL, 38), (42, 1, NULL, 39), (43, 2, NULL, 40), (44, 1, NULL, 41), (45, 1, NULL, 42), (46, 1, NULL, 43), (47, 4, NULL, 44);"); $Manager->Execute("INSERT INTO `PermissionUserAssignment` (`Id`, `User`, `AssignedGroup`, `AssignedOperation`) VALUES (1, 1, 5, NULL);"); $Manager->Execute("INSERT INTO `UserCustomerRel` (`Id`, `Customer`, `User`) VALUES (1, 1, 1);"); $Manager->Execute("INSERT INTO `ISMenuItem` (`Id`, `Name`, `Parent`, `Table`, `IconName`) VALUES (1, 'Síť', NULL, '', ''), (2, 'Finance', NULL, '', ''), (3, 'Zařízení', 1, 'NetworkDevice', ''), (4, 'Rozhraní', 1, 'NetworkInterface', ''), (5, 'Příjmy a výdaje', 2, 'FinanceOperation', ''), (6, 'Závazky a pohledávky', 2, 'FinanceClaimsLiabilities', ''), (7, 'Typ zařízení', 1, 'NetworkDeviceType', ''), (8, 'Typ rozhraní', 1, 'NetworkInterfaceType', ''), (9, 'Doménové aliasy', 1, 'NetworkDomainAlias', ''), (10, 'Bankovní účty', 2, 'FinanceBankAccount', ''), (11, 'Pokladny', 2, 'FinanceTreasury', ''), (12, 'Obecné', NULL, '', ''), (13, 'Uživatelé', 12, 'User', ''), (14, 'Subjekty', 12, 'Subject', ''), (15, 'Země', 12, 'Country', ''), (18, 'Platební období', 2, 'FinanceBillingPeriod', ''), (19, 'Služby', 2, 'Service', ''), (20, 'Zákazníci', 2, 'Member', ''), (22, 'Podsítě', 1, 'NetworkSubnet', ''), (23, 'Systém', NULL, '', ''), (24, 'Záznamy', 23, 'Log', ''), (25, 'Úkoly', 12, 'Task', ''), (26, 'Kategorie úkolů', 12, 'TaskGroup', ''), (27, 'Sklad', NULL, '', ''), (30, 'TV kanály', 12, 'TV', ''), (31, 'Jazyky', 12, 'Language', ''), (32, 'Kategorie TV kanálů', 12, 'TVGroup', ''), (33, 'Účetní roky', 2, 'FinanceYear', ''), (34, 'Dokladové řady', 2, 'DocumentLine', ''), (35, 'Čísleník dokladové řady', 2, 'DocumentLineSequence', ''), (36, 'Nastavení zařízení', 1, 'NetworkDeviceConfig', ''), (37, 'Práce', 12, 'Work', ''), (38, 'Skladové položky', 27, 'StockItem', ''), (39, 'Měrné jednotky', 27, 'UnitOfMeasure', ''), (40, 'Produkty', 27, 'Product', ''), (41, 'Sklady', 27, 'Stock', '');"); $Manager->Execute("INSERT INTO `ServiceCategory` (`Id`, `Name`) VALUES (1, 'Internet'), (2, 'VoIP'), (3, 'Spotřeba + nájem'), (4, 'IPTV'), (5, 'IP kamery'), (6, 'Meteostanice'), (7, 'Web hosting'), (8, 'VPS hosting');"); $Manager->Execute("INSERT INTO `Service` (`Id`, `Name`, `Category`, `Price`, `CustomerCount`, `ReplaceId`, `Public`, `InternetSpeedMin`, `InternetSpeedMax`, `UploadAsymmetry`, `Memory`, `MemorySwap`, `Storage`, `CPUCount`) VALUES (1, 'Internet 4M', 1, 190, 23, NULL, 1, 4096, 204, 1, 0, 0, 0, 0), (2, 'Internet 8M', 1, 260, 23, NULL, 1, 8192, 408, 1, 0, 0, 0, 0), (3, 'Internet 16M', 1, 360, 50, NULL, 1, 16384, 816, 1, 0, 0, 0, 0), (4, 'Internet 32M', 1, 520, 6, NULL, 1, 32768, 1638, 1, 0, 0, 0, 0), (5, 'Internet 64M', 1, 750, 0, NULL, 1, 65536, 8196, 1, 0, 0, 0, 0), (6, 'Internet Instituce', 2, 1000, 1, NULL, 1, 65536, 8192, 1, 0, 0, 0, 0), (7, 'Zdarma', 3, 0, 12, NULL, 1, 128, 128, 1, 0, 0, 0, 0), (8, 'Hosting 4GB', 2, 500, 2, NULL, 1, 64000, 4000, 1, 0, 0, 0, 0), (9, 'Hosting 2GB', 2, 300, 0, NULL, 1, 40000, 2000, 1, 0, 0, 0, 0), (10, 'Hosting 1GB', 2, 170, 1, NULL, 1, 30000, 2000, 1, 0, 0, 0, 0), (11, 'Hosting 512M', 2, 100, 0, NULL, 1, 20000, 1500, 1, 0, 0, 0, 0), (12, 'Hosting 8GB', 2, 900, 1, NULL, 1, 60000, 4000, 1, 0, 0, 0, 0), (13, 'Hosting 16G', 2, 1500, 0, NULL, 1, 60000, 4000, 1, 0, 0, 0, 0), (14, 'Hosting 6GB', 2, 700, 0, NULL, 1, 64000, 4000, 1, 0, 0, 0, 0);"); $Manager->Execute("INSERT INTO `ServiceCustomerRel` (`Id`, `Service`, `Customer`, `Period`) VALUES (1, 1, 1, 0), (2, 1, 1, 1);"); $Manager->Execute("INSERT INTO `File` (`Id` ,`Name` ,`Size` ,`Directory`) ". "VALUES (1 , 'invoice_1.pdf', '123', NULL);"); $Manager->Execute("INSERT INTO `FinanceInvoice` (`Id` ,`BillCode` ,`Subject` ,`TimeCreation` ,`TimeDue` ,`TimePayment` ,`Value` ,`File` ,`Text` ,`PeriodTo` ,`PeriodFrom`) ". "VALUES (1 , 'VF123/2013', '1', NOW( ) , '0000-00-00 00:00:00', NULL , '300', '1', 'Měsíční paušál', '2013-01-01', '2013-01-31');"); $Manager->Execute("INSERT INTO `FinanceInvoiceItem` (`Id` ,`FinanceInvoice` ,`Description` ,`Price` ,`VAT` ,`Quantity`) ". "VALUES (1 , '1', 'Internet 16M', '300', '21', '1');"); $Manager->Execute("INSERT INTO `FinanceYear` (`Id`, `Year`, `DateStart`, `DateEnd`) VALUES (1, 2007, '2007-12-01', '2007-12-31'), (2, 2008, '2008-01-01', '2008-12-31'), (3, 2009, '2009-01-01', '2009-12-31'), (4, 2010, '2010-01-01', '2010-12-31'), (6, 2011, '2011-01-01', '2011-12-31'), (7, 2012, '2012-01-01', '2012-12-31'), (8, 2013, '2013-01-01', '2013-12-31');"); $Manager->Execute("INSERT INTO `FinanceCharge` (`Period`, `Internet`, `InternetSpeed`, `InternetSpeedReserve`, `AdministrationPerUser`, `kWh`, `BaseSpeedElement`, `BaseTariffPrice`, `TopTariffPrice`) VALUES (1, 10000, 100000, 10000, 50, 6, 1024, 50, 138), (0, 10000, 100000, 10000, 50, 6, 1024, 50, 138);"); $Manager->Execute("INSERT INTO `DocumentLine` (`Id`, `Name`, `Shortcut`) VALUES (1, 'Příjmy do pokladny', 'PP'), (2, 'Výdeje z pokladny', 'VP'), (3, 'Příjem na účet', 'BV'), (4, 'Výdej z účtu', 'PR'), (5, 'Přijaté faktury', 'PF'), (6, 'Vydané faktury', 'VF'), (7, 'Výdej ze skladu', 'VS'), (8, 'Příjem na sklad', 'PS');"); }