Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1575

Přidáno uživatelem Ondřej Fibich před více než 12 roky(ů)

Vydani:

freenetis - 1.0.0~beta6
freenetis-monitoring - 0.9.0

Novinky:

- balik freenetis-monitoring (#205)

Upravy:

- podpora baliku monitoringu na strane freenetisu

Zobrazit rozdíly:

freenetis/branches/testing/db_upgrades/upgrade_1.0.0~beta6.php
<?php defined('SYSPATH') or die('No direct script access.');
/*
* This file is part of open source system FreenetIS
* and it is released under GPLv3 licence.
*
* More info about licence can be found:
* http://www.gnu.org/licenses/gpl-3.0.html
*
* More info about project can be found:
* http://www.freenetis.org/
*
*/
/**
* This upgrade is equal to one in 1.0.0~beta5 version
*
* @author Ondřej Fibich <ondrej.fibich@gmail.com>
*/
$upgrade_equal_to['1.0.0~beta6'] = '1.0.0~beta5';
/**
* This DB upgrade unifies all previous updates to a single one update.
* If previous upgrades are already made the uprage is ignored.
* Thisis made by the upgrade_equal_to variable located also in this file.
*
* @author Ondřej Fibich <ondrej.fibich@gmail.com>
*/
$upgrade_sql['1.0.0~beta6'] = array
(
"SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO';",
"SET time_zone='+00:00';",
"/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;",
"/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;",
"/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;",
"/*!40101 SET NAMES utf8 */;",
"CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) DEFAULT NULL,
`name` varchar(100) COLLATE utf8_czech_ci DEFAULT NULL,
`account_attribute_id` int(11) NOT NULL,
`balance` double DEFAULT '0' COMMENT 'Account balance, value is updated with respect to transfers of account',
`comment` varchar(254) COLLATE utf8_czech_ci DEFAULT NULL,
`comments_thread_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `is_owned_by` (`member_id`),
KEY `comments_thread_id` (`comments_thread_id`),
KEY `account_attribute_id` (`account_attribute_id`),
KEY `balance` (`balance`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `accounts_bank_accounts` (
`account_id` int(11) NOT NULL,
`bank_account_id` int(11) NOT NULL,
PRIMARY KEY (`account_id`,`bank_account_id`),
KEY `bank_account_id` (`bank_account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"CREATE TABLE IF NOT EXISTS `account_attributes` (
`id` int(11) NOT NULL DEFAULT '0',
`name` varchar(230) COLLATE utf8_czech_ci DEFAULT NULL,
`type` tinyint(4) DEFAULT NULL COMMENT 'aktivní, pasivní, daňový, nedaňový',
`kind` tinyint(4) DEFAULT NULL COMMENT 'rozvahový, výsledovkový, závěrkový, podrozvahový',
`activity` tinyint(4) DEFAULT NULL COMMENT 'hlavní/hospodářská činnost',
`track_balance` tinyint(4) DEFAULT NULL COMMENT 'true, false',
`line` tinyint(4) DEFAULT NULL COMMENT 'řádek plné výsledovky',
`line_short` tinyint(4) DEFAULT NULL COMMENT 'řádek zkrácené výsledovky',
`line_credits` tinyint(4) DEFAULT NULL COMMENT 'řádek pasiv',
`line_credits_short` tinyint(4) DEFAULT NULL COMMENT 'řádek zkrácených pasiv ',
`comment` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `account_attributes` (`id`, `name`, `type`, `kind`, `activity`, `track_balance`, `line`, `line_short`, `line_credits`, `line_credits_short`, `comment`) VALUES
(12000, 'Nehmotné výsledky výzkumu a vývoje', 42, 45, 0, 0, 2, 2, 0, 0, NULL),
(13000, 'Software', 42, 45, 0, 0, 3, 2, 0, 0, NULL),
(14000, 'Ocenitelná práva', 42, 45, 0, 0, 4, 2, 0, 0, NULL),
(18000, 'Drobný dlouhodobý nehmotný majetek', 42, 45, 0, 0, 5, 2, 0, 0, NULL),
(19000, 'Ostatní dlouhodobý nehmotný majetek', 42, 45, 0, 0, 6, 2, 0, 0, NULL),
(21000, 'Stavby', 42, 45, 0, 0, 12, 3, 0, 0, NULL),
(22000, 'Samostatné movité věci a soubory movitých věcí', 42, 45, 0, 0, 13, 3, 0, 0, NULL),
(25000, 'Pěstitelské celky trvalých porostů', 42, 45, 0, 0, 14, 3, 0, 0, NULL),
(26000, 'Základní stádo a tažná zvířata', 42, 45, 0, 0, 15, 3, 0, 0, NULL),
(28000, 'Drobný dlouhodobý hmotný majetek', 42, 45, 0, 0, 16, 3, 0, 0, NULL),
(29000, 'Ostatní dlouhodobý hmotný majetek', 42, 45, 0, 0, 17, 3, 0, 0, NULL),
(31000, 'Pozemky', 42, 45, 0, 0, 10, 3, 0, 0, NULL),
(32000, 'Umělecká díla, předměty a sbírky', 42, 45, 0, 0, 11, 3, 0, 0, NULL),
(41000, 'Nedokončený dlouhodobý nehmotný majetek', 42, 45, 0, 0, 7, 2, 0, 0, NULL),
(42000, 'Nedokončený dlouhodobý hmotný majetek', 42, 45, 0, 0, 18, 3, 0, 0, NULL),
(43000, 'Pořizovaný dlouhodobý finanční majetek', 42, 45, 0, 0, 27, 4, 0, 0, NULL),
(51000, 'Poskytnuté zálohy na dlouhodobý nehmotný majetek', 42, 45, 0, 0, 8, 2, 0, 0, NULL),
(52000, 'Poskytnuté zálohy na dlouhodobý hmotný majetek', 42, 45, 0, 0, 19, 3, 0, 0, NULL),
(61000, 'Podíly v ovládaných a řízených osobách', 42, 45, 0, 0, 21, 4, 0, 0, NULL),
(62000, 'Podíly v osobách pod podstatným vlivem', 42, 45, 0, 0, 22, 4, 0, 0, NULL),
(63000, 'Dluhové cenné papíry držené do splatnosti', 42, 45, 0, 0, 23, 4, 0, 0, NULL),
(66000, 'Půjčky organizačnm složkám', 42, 45, 0, 0, 24, 4, 0, 0, NULL),
(67000, 'Ostatní dlouhodobé půjčky', 42, 45, 0, 0, 25, 4, 0, 0, NULL),
(69000, 'Ostatní dlouhodobý finanční majetek', 42, 45, 0, 0, 26, 4, 0, 0, NULL),
(72000, 'Oprávky k nehmotným výsledkům výzkumu a vývoje', 42, 45, 0, 0, 29, 5, 0, 0, NULL),
(73000, 'Oprávky k softwaru', 42, 45, 0, 0, 30, 5, 0, 0, NULL),
(74000, 'Oprávky k ocenitelným právům', 42, 45, 0, 0, 31, 5, 0, 0, NULL),
(78000, 'Oprávky k drobnému dlouhodobému nehmotnému majetku', 42, 45, 0, 0, 32, 5, 0, 0, NULL),
(79000, 'Oprávky k ostatnímu dlouhodobému nehmotnému majetku', 42, 45, 0, 0, 33, 5, 0, 0, NULL),
(81000, 'Oprávky ke stavbám', 42, 45, 0, 0, 34, 5, 0, 0, NULL),
(82000, 'Oprávky k samost. movitým věcem a souborům movitých věcí', 42, 45, 0, 0, 35, 5, 0, 0, NULL),
(85000, 'Oprávky k pěstitelským celkům trvalých porostů', 42, 45, 0, 0, 36, 5, 0, 0, NULL),
(86000, 'Oprávky k základnímu stádu a tažným zvířatům', 42, 45, 0, 0, 37, 5, 0, 0, NULL),
(88000, 'Oprávky k drobnému dlouhodobému hmotnému majetku', 42, 45, 0, 0, 38, 5, 0, 0, NULL),
(89000, 'Oprávky k ostatnímu dlouhodobému hmotnému majetku', 42, 45, 0, 0, 39, 5, 0, 0, NULL),
(111000, 'Pořizovaný materiál', 42, 45, 0, 0, 0, 0, 0, 0, NULL),
(112000, 'Materiál na skladě', 42, 45, 0, 0, 42, 7, 0, 0, NULL),
(119000, 'Materiál na cestě', 42, 45, 0, 0, 43, 7, 0, 0, NULL),
(121000, 'Nedokončená výroba', 42, 45, 0, 0, 44, 7, 0, 0, NULL),
(122000, 'Polotovary vlastní výroby', 42, 45, 0, 0, 45, 7, 0, 0, NULL),
(123000, 'Výrobky', 42, 45, 0, 0, 46, 7, 0, 0, NULL),
(124000, 'Zvířata', 42, 45, 0, 0, 47, 7, 0, 0, NULL),
(131000, 'Pořizované zboží', 42, 45, 0, 0, 0, 0, 0, 0, NULL),
(132000, 'Zboží na skladě a v prodejnách', 42, 45, 0, 0, 48, 7, 0, 0, NULL),
(139000, 'Zboží na cestě', 42, 45, 0, 0, 49, 7, 0, 0, NULL),
(211000, 'Pokladna', 42, 45, 0, 0, 72, 9, 0, 0, NULL),
(213000, 'Ceniny', 42, 45, 0, 0, 73, 9, 0, 0, NULL),
(221000, 'Účty v bankách', 42, 45, 0, 0, 74, 9, 0, 0, NULL),
(221100, 'Účet kreditu', 42, 45, 0, 0, 74, 9, 0, 0, NULL),
(221101, 'Provozní účet', 42, 45, 0, 0, 74, 9, 0, 0, NULL),
(221102, 'Účet infrastruktury', 42, 45, 0, 0, 74, 9, 0, 0, NULL),
(221103, 'Projektový účet', 42, 45, 0, 0, 74, 9, 0, 0, NULL),
(231000, 'Krátkodobé bankovní úvěry', 28, 45, 0, 0, 123, 18, 0, 0, NULL),
(232000, 'Eskontní úvěry', 28, 45, 0, 0, 124, 18, 0, 0, NULL),
(241000, 'Emitované krátkodobé dluhopisy', 28, 45, 0, 0, 125, 18, 0, 0, NULL),
(249000, 'Ostatní krátkodobé finanční výpomoci', 28, 45, 0, 0, 127, 18, 0, 0, NULL),
(251000, 'Majetkové cenné papíry k obchodování', 42, 45, 0, 0, 75, 9, 0, 0, NULL),
(253000, 'Dluhové cenné papíry k obchodování', 42, 45, 0, 0, 76, 9, 0, 0, NULL),
(255000, 'Vlastní dluhopisy', 28, 45, 0, 0, 126, 18, 0, 0, NULL),
(256000, 'Ostatní cenné papíry ', 42, 45, 0, 0, 77, 9, 0, 0, NULL),
(259000, 'Pořizovaný krátkodobý finanční majetek', 42, 45, 0, 0, 78, 9, 0, 0, NULL),
(261000, 'Peníze na cestě', 42, 45, 0, 0, 79, 9, 0, 0, NULL),
(311000, 'Odběratelé', 42, 45, 0, 1, 52, 8, 0, 0, NULL),
(312000, 'Směnky k inkasu', 42, 45, 0, 0, 53, 8, 0, 0, NULL),
(313000, 'Pohledávky za eskontované cenné papíry', 42, 45, 0, 0, 54, 8, 0, 0, NULL),
(314000, 'Poskytnuté provozní zálohy a zálohy na zásoby', 42, 45, 0, 0, 50, 7, 0, 0, NULL),
(315000, 'Ostatní pohledávky', 42, 45, 0, 0, 56, 8, 0, 0, NULL),
(321000, 'Dodavatelé', 28, 45, 0, 1, 106, 18, 0, 0, NULL),
(322000, 'Směnky k úhradě', 28, 45, 0, 0, 107, 18, 0, 0, NULL),
(324000, 'Přijaté zálohy', 28, 45, 0, 0, 108, 18, 0, 0, NULL),
(325000, 'Ostatní závazky', 28, 45, 0, 0, 109, 18, 0, 0, NULL),
(331000, 'Zaměstnanci', 28, 45, 0, 0, 110, 18, 0, 0, NULL),
(333000, 'Ostatní závazky vůči zaměstnancům', 28, 45, 0, 0, 111, 18, 0, 0, NULL),
(335000, 'Pohledávky za zaměstnanci', 42, 45, 0, 0, 57, 8, 0, 0, NULL),
(336000, 'Zúčtování s institucemi sociál. zabezpečení a zdravot. pojištění', 28, 45, 0, 0, 58, 8, 112, 18, NULL),
(336001, 'Sociální pojištění', 28, 45, 0, 0, 58, 8, 112, 18, NULL),
(336002, 'Zdrav. pojištění VZP', 28, 45, 0, 0, 58, 8, 112, 18, NULL),
(336003, 'Zdrav. pojištění HUZP', 28, 45, 0, 0, 58, 8, 112, 18, NULL),
(341000, 'Daň z příjmů', 28, 45, 0, 0, 59, 8, 113, 18, NULL),
(342000, 'Ostatní přímé daně', 28, 45, 0, 0, 60, 8, 114, 18, NULL),
(342001, 'Daň z příjmů zaměstnanců zálohová', 28, 45, 0, 0, 60, 8, 114, 18, NULL),
(342002, 'Daň z příjmů zaměstnanců srážková', 28, 45, 0, 0, 60, 8, 114, 18, NULL),
(343000, 'Daň z přidané hodnoty', 28, 45, 0, 0, 61, 8, 115, 18, NULL),
(345000, 'Ostatní daně a poplatky', 28, 45, 0, 0, 62, 8, 116, 18, NULL),
(346000, 'Nároky na dotace a ost. zúčt. se státním rozpočtem', 28, 45, 0, 0, 63, 8, 117, 18, NULL),
(348000, 'Nároky na dotace a ost. zúčt. s rozpočtem územních celků', 28, 45, 0, 0, 64, 8, 118, 18, NULL),
(349000, 'Vyrovnávací účet pro DPH', 42, 45, 0, 0, 0, 0, 0, 0, NULL),
(358000, 'Pohledávky za účastníky sdružení', 42, 45, 0, 0, 65, 8, 0, 0, NULL),
(367000, 'Závazky z upsaných nesplacených cenných papírů a vkladů', 28, 45, 0, 0, 119, 18, 0, 0, NULL),
(368000, 'Závazky k účastníkům sdružení', 28, 45, 0, 0, 120, 18, 0, 0, NULL),
(373000, 'Pohledávky a závazky z pevných termínových operací', 28, 45, 0, 0, 66, 8, 121, 18, NULL),
(375000, 'Pohledávky z emitovaných dluhopisů', 42, 45, 0, 0, 67, 8, 0, 0, NULL),
(378000, 'Jiné pohledávky', 42, 45, 0, 0, 68, 8, 0, 0, NULL),
(379000, 'Jiné závazky', 28, 45, 0, 0, 122, 18, 0, 0, NULL),
(381000, 'Náklady příštích období', 42, 45, 0, 0, 81, 10, 0, 0, NULL),
(383000, 'Výdaje příštích období', 28, 45, 0, 0, 127, 19, 0, 0, NULL),
(384000, 'Výnosy příštích období', 28, 45, 0, 0, 127, 19, 0, 0, NULL),
(385000, 'Příjmy příštích období', 42, 45, 0, 0, 82, 10, 0, 0, NULL),
(386000, 'Kursové rozdíly aktivní', 42, 45, 0, 0, 83, 10, 0, 0, NULL),
(387000, 'Kursové rozdíly pasivní', 28, 45, 0, 0, 127, 19, 0, 0, NULL),
(388000, 'Dohadné účty aktivní', 42, 45, 0, 0, 69, 8, 0, 0, NULL),
(389000, 'Dohadné účty pasivní', 28, 45, 0, 0, 103, 17, 0, 0, NULL),
(391000, 'Opravná položka k pohledávkám', 42, 45, 0, 0, 70, 8, 0, 0, NULL),
(395000, 'Vnitřní zúčtování', 42, 45, 0, 0, 0, 0, 0, 0, NULL),
(396000, 'Spojovací účet při sdružení', 42, 45, 0, 0, 0, 0, 0, 0, NULL),
(501000, 'Spotřeba materiálu', 43, 48, 1, 0, 3, 2, 0, 0, NULL),
(501001, 'Spotřeba materiálu - SÍŤ', 43, 48, 1, 0, 3, 2, 0, 0, NULL),
(502000, 'Spotřeba energie', 43, 48, 1, 0, 4, 2, 0, 0, NULL),
(503000, 'Spotřeba ostatních neskladovatelných dodávek', 43, 48, 1, 0, 5, 2, 0, 0, NULL),
(504000, 'Prodané zboží', 43, 48, 1, 0, 6, 2, 0, 0, NULL),
(511000, 'Opravy a udržování', 43, 48, 1, 0, 8, 3, 0, 0, NULL),
(512000, 'Cestovné', 43, 48, 1, 0, 9, 3, 0, 0, NULL),
(513000, 'Náklady na reprezentaci', 44, 48, 1, 0, 10, 3, 0, 0, NULL),
(518000, 'Ostatní služby', 43, 48, 1, 0, 11, 3, 0, 0, NULL),
(521000, 'Mzdové náklady', 43, 48, 1, 0, 13, 4, 0, 0, NULL),
(521001, 'Mzdové náklady - HPP', 43, 48, 1, 0, 13, 4, 0, 0, NULL),
(521002, 'Mzdové náklady - dohody', 43, 48, 1, 0, 13, 4, 0, 0, NULL),
(524000, 'Zákonné sociální pojištění', 43, 48, 1, 0, 14, 4, 0, 0, NULL),
(524001, 'Sociální pojištění', 43, 48, 1, 0, 14, 4, 0, 0, NULL),
(524002, 'Zdravotní pojištění VZP', 43, 48, 1, 0, 14, 4, 0, 0, NULL),
(524003, 'Zdravotní pojištění HUZP', 43, 48, 1, 0, 14, 4, 0, 0, NULL),
(525000, 'Ostatní sociální pojištění', 44, 48, 1, 0, 15, 4, 0, 0, NULL),
(527000, 'Zákonné sociální náklady', 43, 48, 1, 0, 16, 4, 0, 0, NULL),
(528000, 'Ostatní sociální náklady', 44, 48, 1, 0, 17, 4, 0, 0, NULL),
(531000, 'Daň silniční', 43, 48, 1, 0, 19, 5, 0, 0, NULL),
(532000, 'Daň z nemovitostí', 43, 48, 1, 0, 20, 5, 0, 0, NULL),
(538000, 'Ostatní daně a poplatky', 43, 48, 1, 0, 21, 5, 0, 0, NULL),
(541000, 'Smluvní pokuty a úroky z prodlení', 43, 48, 1, 0, 23, 6, 0, 0, NULL),
(542000, 'Ostatní pokuty a penále', 44, 48, 1, 0, 24, 6, 0, 0, NULL),
(543000, 'Odpis nedobytné pohledávky', 44, 48, 1, 0, 25, 6, 0, 0, NULL),
(544000, 'Úroky', 43, 48, 1, 0, 26, 6, 0, 0, NULL),
(545000, 'Kursové ztráty', 43, 48, 1, 0, 27, 6, 0, 0, NULL),
(546000, 'Dary', 44, 48, 1, 0, 28, 6, 0, 0, NULL),
(548000, 'Manka a škody', 44, 48, 1, 0, 29, 6, 0, 0, NULL),
(549000, 'Jiné ostatní náklady', 43, 48, 1, 0, 30, 6, 0, 0, NULL),
(549001, 'Bankovní poplatky', 43, 48, 1, 0, 30, 6, 0, 0, NULL),
(549002, 'Jiné ostatní náklady (pojistné apod.)', 43, 48, 1, 0, 30, 6, 0, 0, NULL),
(549999, 'Jiné ostatní náklady - přeplatky', 44, 48, 1, 0, 30, 6, 0, 0, NULL),
(551000, 'Odpisy dlouhodobého nehmotného a hmotného majetku', 43, 48, 1, 0, 32, 7, 0, 0, NULL),
(551001, 'Odpisy dlouhodobého nehmotného a hmotného majetku', 43, 48, 1, 0, 32, 7, 0, 0, NULL),
(551002, 'Odpisy dlouhodobého nehmotného a hmotného majetku', 44, 48, 1, 0, 32, 7, 0, 0, NULL),
(552000, 'Zůstatková cena prodaného dlouh. nehmotného a hmotného majetku', 43, 48, 1, 0, 33, 7, 0, 0, NULL),
(553000, 'Prodané cenné papíry a podíly', 43, 48, 1, 0, 34, 7, 0, 0, NULL),
(554000, 'Prodaný materiál', 43, 48, 1, 0, 35, 7, 0, 0, NULL),
(556000, 'Tvorba rezerv', 44, 48, 1, 0, 36, 7, 0, 0, NULL),
(559000, 'Tvorba opravných položek', 44, 48, 1, 0, 37, 7, 0, 0, NULL),
(581000, 'Poskytnuté příspěvky zúčtované mezi organizačními složkami', 43, 48, 1, 0, 39, 8, 0, 0, NULL),
(582000, 'Poskytnuté členské příspěvky', 43, 48, 1, 0, 40, 8, 0, 0, NULL),
(591000, 'Daň z příjmů', 44, 48, 1, 0, 83, 127, 0, 0, NULL),
(595000, 'Dodatečné odvody daně z příjmů', 44, 48, 1, 0, 42, 9, 0, 0, NULL),
(601000, 'Tržby za vlastní výrobky', 43, 48, 1, 0, 46, 12, 0, 0, NULL),
(602001, 'Tržby z prodeje služeb KULTURA', 43, 48, 1, 0, 47, 12, 0, 0, NULL),
(602002, 'Tržby z prodeje služeb SÍŤ', 43, 48, 1, 0, 47, 12, 0, 0, NULL),
(604000, 'Tržby za prodané zboží', 43, 48, 1, 0, 48, 12, 0, 0, NULL),
(611000, 'Změna stavu zásob nedokončené výroby', 43, 48, 1, 0, 50, 13, 0, 0, NULL),
(612000, 'Změna stavu zásob polotovarů', 43, 48, 1, 0, 51, 13, 0, 0, NULL),
(613000, 'Změna stavu zásob výrobků', 43, 48, 1, 0, 52, 13, 0, 0, NULL),
(614000, 'Změna stavu zvířat', 43, 48, 1, 0, 53, 13, 0, 0, NULL),
(621000, 'Aktivace materiálu a zboží', 43, 48, 1, 0, 55, 14, 0, 0, NULL),
(622000, 'Aktivace vnitroorganizačních služeb', 43, 48, 1, 0, 56, 14, 0, 0, NULL),
(623000, 'Aktivace dlouhodobého nehmotného majetku', 43, 48, 1, 0, 57, 14, 0, 0, NULL),
(624000, 'Aktivace dlouhodobého hmotného majetku', 43, 48, 1, 0, 58, 14, 0, 0, NULL),
(641000, 'Smluvní pokuty a úroky z prodlení', 43, 48, 1, 0, 60, 15, 0, 0, NULL),
(642000, 'Ostatní pokuty a penále', 43, 48, 1, 0, 61, 15, 0, 0, NULL),
(643000, 'Platby za odepsané pohledávky', 43, 48, 1, 0, 62, 15, 0, 0, NULL),
(644000, 'Úroky', 43, 48, 1, 0, 63, 15, 0, 0, NULL),
(645000, 'Kursové zisky', 43, 48, 1, 0, 64, 15, 0, 0, NULL),
(648000, 'Zúčtování fondů', 43, 48, 1, 0, 65, 15, 0, 0, NULL),
(649000, 'Jiné ostatní výnosy', 43, 48, 1, 0, 66, 15, 0, 0, NULL),
(652000, 'Tržby z prodeje dlouhodobého nehmotného a hmotného majetku', 43, 48, 1, 0, 68, 16, 0, 0, NULL),
(653000, 'Tržby z prodeje cenných papírů a podílů', 43, 48, 1, 0, 69, 16, 0, 0, NULL),
(654000, 'Tržby z prodeje materiálu', 43, 48, 1, 0, 70, 16, 0, 0, NULL),
(655000, 'Výnosy z krátkodobého finančního majetku', 43, 48, 1, 0, 71, 16, 0, 0, NULL),
(656000, 'Zúčtování rezerv', 43, 48, 1, 0, 72, 16, 0, 0, NULL),
(657000, 'Výnosy z dlouhodobého finančního majetku', 43, 48, 1, 0, 73, 16, 0, 0, NULL),
(659000, 'Zúčtování opravných položek', 43, 48, 1, 0, 74, 16, 0, 0, NULL),
(681000, 'Přijaté příspěvky zúčtované mezi organizačními složkami', 43, 48, 1, 0, 76, 17, 0, 0, NULL),
(682000, 'Přijaté příspěvky (dary)', 43, 48, 1, 0, 77, 17, 0, 0, NULL),
(684000, 'Přijaté členské příspěvky', 43, 48, 1, 0, 78, 17, 0, 0, NULL),
(691000, 'Provozní dotace', 44, 48, 1, 0, 80, 18, 0, 0, NULL),
(901000, 'Vlastní jmění', 28, 45, 0, 0, 87, 13, 0, 0, NULL),
(911000, 'Fondy', 28, 45, 0, 0, 88, 13, 0, 0, NULL),
(921000, 'Oceňovací rozdíly z přecenění majetku a závazků', 28, 45, 0, 0, 89, 13, 0, 0, NULL),
(931000, 'Výsledek hospodaření ve schvalovacím řízení', 28, 45, 0, 0, 92, 127, 0, 0, NULL),
(932000, 'Nerozdělený zisk, neuhrazená ztráta minulých let', 28, 45, 0, 0, 93, 127, 0, 0, NULL),
(941000, 'Rezervy', 28, 45, 0, 0, 96, 16, 0, 0, NULL),
(951000, 'Dlouhodobé bankovní úvěry', 28, 45, 0, 0, 98, 17, 0, 0, NULL),
(953000, 'Emitované dluhopisy', 28, 45, 0, 0, 99, 17, 0, 0, NULL),
(954000, 'Závazky z pronájmu', 28, 45, 0, 0, 100, 17, 0, 0, NULL),
(955000, 'Přijaté dlouhodobé zálohy', 28, 45, 0, 0, 101, 17, 0, 0, NULL),
(958000, 'Dlouhodobé směnky k úhradě', 28, 45, 0, 0, 102, 17, 0, 0, NULL),
(959000, 'Ostatní dlouhodobé závazky', 28, 45, 0, 0, 104, 17, 0, 0, NULL),
(961000, 'Počáteční účet rozvažný', 0, 47, 0, 0, 0, 0, 0, 0, NULL),
(962000, 'Konečný účet rozvažný', 0, 47, 0, 0, 0, 0, 0, 0, NULL),
(963000, 'Účet výsledku hospodaření', 0, 47, 0, 0, 0, 0, 0, 0, NULL);",
"CREATE TABLE IF NOT EXISTS `acl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`note` text COLLATE utf8_czech_ci,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=80 ;",
"INSERT INTO `acl` (`id`, `note`) VALUES
(38, 'Adminstratori mohou spravovat vsechny cleny a uzivatele, presmerovani a zalohovani.'),
(40, 'Radni clenove vidi svoje ucty (accounts) a transakce na nich, ale nemohou je editovat. Mohou ale tvorit nove transakce pro casti sveho kreditu na ucty jinych clenu.'),
(42, 'Regular members can see unidentified transfers.'),
(43, 'Radni clen vidi svuj ucet'),
(44, 'All users can edit their usernames and passwords.'),
(47, 'Necertifikovani technici mohou editovat a pridavat vlastni zarizeni.'),
(49, 'Certifikovani technici mohou editovat a pridavat vsechna zarizeni, spravovat presmerovani a zalohovani.'),
(51, 'Spravni rada muze spravovat vse u clenu a uzivatelu.'),
(52, 'Spravni rada ma pravo videt zarizeni, ale nema prave je editovat.'),
(54, 'Predseda a jednatel schvaluji prace.'),
(56, 'Revizni komise vidi vse, editovat vsak muze velke prd :-)'),
(57, 'Administratori systemu mohou spravovat zneni prekladu a veskere nastaveni.'),
(58, 'Certifikovani technici mohou prohlizet, pridavat a editovat jen nektere polozky u clenu a uzivatelu'),
(59, 'Certifikovani technici maji pravo videt a pridavat datum vstupu, login, telefon a heslo.'),
(60, 'Revizni komise muze editovat pouze informace o sobe, nikoliv vsak zarizeni.'),
(61, 'Administratori mohou posilat e-maily z freenetisu'),
(62, 'Vsichni clenove sdruzeni nemohou potvrzovat sve vlastni prace.'),
(63, 'Administratori a spravni rada smi potvrzovat prace.'),
(64, 'Radni clenove si mohou vytvaret, editovat a mazat sve prace.'),
(65, 'Vsicchni clenove vidi jen sve vlastni aplikacni heslo.'),
(66, 'Administratori mohou editovat aplikacni heslo vsem, nesmi je ale videt'),
(67, 'Voip admins are allowed to administrate Voips.'),
(68, 'First-degree certified engineers can only view admins of devices; they cannot edit them.'),
(69, 'Fourth-degree certified engineers can edit admins od devices.'),
(70, 'Fifth-degress certified engineers can view logins and passwords of devices.'),
(71, 'Sixth-degrees certified engineers can add and edit logins and passwords of devices.'),
(72, 'Owners of company telephones can see their phone invoices, and edit their phone invoices dumps'),
(73, 'Owners of company telephones can see their private phone contacts, edit and remove them'),
(74, 'Regulars members can add, update and delete their contacts'),
(75, 'Engineers can view tariffs of members, but they cannot edit them.'),
(76, 'Engineers can view all comments, they can add/edit/delete own comments.'),
(77, 'All members can only edit their allowed subnets.'),
(78, 'Tenth-degree certified engineers and admins can manage clouds.'),
(79, 'Administrators can administer variable symbols');",
"CREATE TABLE IF NOT EXISTS `aco` (
`id` int(11) NOT NULL DEFAULT '0',
`value` varchar(240) COLLATE utf8_czech_ci NOT NULL,
`name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `section_value_value_aco` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `aco` (`id`, `value`, `name`) VALUES
(14, 'view_all', 'Viewing of all records'),
(15, 'edit_all', 'Editing of all records'),
(16, 'new_all', 'Creating of all records'),
(17, 'view_own', 'Viewing of own records'),
(18, 'edit_own', 'Editing of own records'),
(19, 'new_own', 'Creating of own records'),
(20, 'delete_all', 'Deleting of all records'),
(21, 'delete_own', 'Deleting of own records'),
(33, 'write_email', 'Send email'),
(34, 'confirm_all', 'Confirming of all records'),
(35, 'confirm_own', 'Confirming of own records');",
"CREATE TABLE IF NOT EXISTS `aco_map` (
`acl_id` int(11) NOT NULL DEFAULT '0',
`value` varchar(230) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`acl_id`,`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `aco_map` (`acl_id`, `value`) VALUES
(38, 'delete_all'),
(38, 'edit_all'),
(38, 'new_all'),
(38, 'view_all'),
(40, 'new_own'),
(40, 'view_own'),
(42, 'view_all'),
(43, 'view_own'),
(44, 'edit_own'),
(47, 'delete_own'),
(47, 'edit_own'),
(47, 'new_own'),
(47, 'view_own'),
(49, 'delete_all'),
(49, 'edit_all'),
(49, 'new_all'),
(49, 'view_all'),
(51, 'delete_all'),
(51, 'edit_all'),
(51, 'new_all'),
(51, 'view_all'),
(52, 'view_all'),
(54, 'delete_all'),
(54, 'edit_all'),
(54, 'new_all'),
(54, 'view_all'),
(56, 'view_all'),
(57, 'delete_all'),
(57, 'edit_all'),
(57, 'new_all'),
(57, 'view_all'),
(58, 'edit_all'),
(58, 'new_all'),
(58, 'view_all'),
(59, 'new_all'),
(59, 'view_all'),
(60, 'delete_own'),
(60, 'edit_own'),
(60, 'new_own'),
(60, 'view_own'),
(61, 'write_email'),
(62, 'confirm_own'),
(63, 'delete_own'),
(63, 'edit_own'),
(63, 'new_own'),
(63, 'view_all'),
(63, 'view_own'),
(64, 'delete_own'),
(64, 'edit_own'),
(64, 'new_own'),
(64, 'view_own'),
(65, 'view_own'),
(66, 'edit_all'),
(67, 'delete_all'),
(67, 'edit_all'),
(67, 'new_all'),
(67, 'view_all'),
(68, 'view_all'),
(69, 'delete_all'),
(69, 'edit_all'),
(69, 'new_all'),
(69, 'view_all'),
(70, 'view_all'),
(71, 'delete_all'),
(71, 'edit_all'),
(71, 'new_all'),
(71, 'view_all'),
(72, 'edit_own'),
(72, 'view_own'),
(73, 'delete_own'),
(73, 'edit_own'),
(73, 'new_own'),
(73, 'view_own'),
(74, 'delete_own'),
(74, 'edit_own'),
(74, 'new_own'),
(75, 'view_all'),
(76, 'delete_own'),
(76, 'edit_own'),
(76, 'new_all'),
(76, 'view_all'),
(77, 'edit_own'),
(78, 'delete_all'),
(78, 'edit_all'),
(78, 'new_all'),
(78, 'view_all'),
(79, 'delete_all'),
(79, 'edit_all'),
(79, 'new_all'),
(79, 'view_all');",
"CREATE TABLE IF NOT EXISTS `address_points` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
`country_id` smallint(6) NOT NULL,
`town_id` int(11) NOT NULL,
`street_id` int(11) DEFAULT NULL,
`street_number` varchar(50) COLLATE utf8_czech_ci DEFAULT NULL,
`gps` point DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `street_id` (`street_id`),
KEY `town_id` (`town_id`),
KEY `country_id` (`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `allowed_subnets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL,
`subnet_id` int(11) NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '1',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `member_id` (`member_id`),
KEY `subnet_id` (`subnet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `allowed_subnets_counts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL,
`count` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `member_id` (`member_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `approval_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_czech_ci NOT NULL,
`comment` mediumtext COLLATE utf8_czech_ci NOT NULL,
`state` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=2 ;",
"INSERT INTO `approval_templates` (`id`, `name`, `comment`, `state`) VALUES
(1, 'Default', 'Výchozí hlasovací šablona podle směrnic o.s. UnArt', 1);",
"CREATE TABLE IF NOT EXISTS `approval_template_items` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`approval_template_id` int(11) DEFAULT NULL,
`approval_type_id` int(11) NOT NULL,
`priority` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `approval_template_id` (`approval_template_id`),
KEY `approval_type_id` (`approval_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ;",
"INSERT INTO `approval_template_items` (`id`, `approval_template_id`, `approval_type_id`, `priority`) VALUES
(1, 1, 1, 0),
(2, 1, 2, 1);",
"CREATE TABLE IF NOT EXISTS `approval_types` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_czech_ci NOT NULL,
`comment` mediumtext COLLATE utf8_czech_ci NOT NULL,
`type` int(11) NOT NULL,
`majority_percent` int(11) NOT NULL,
`aro_group_id` int(11) NOT NULL,
`interval` datetime NOT NULL,
`default_vote` tinyint(1) DEFAULT NULL,
`min_suggest_amount` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=3 ;",
"INSERT INTO `approval_types` (`id`, `name`, `comment`, `type`, `majority_percent`, `aro_group_id`, `interval`, `default_vote`, `min_suggest_amount`) VALUES
(1, 'Správní rada', 'Výchozí hlasovací typ pro hlasování Správní rady', 1, 51, 25, '0000-00-00 00:00:00', NULL, 0),
(2, 'Revizní komise', 'Výchozí hlasovací typ pro hlasování Revizní komise.', 1, 51, 24, '0000-00-01 00:00:00', NULL, 5000);",
"CREATE TABLE IF NOT EXISTS `aro_groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_id` int(11) NOT NULL DEFAULT '0',
`lft` int(11) NOT NULL DEFAULT '0',
`rgt` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`value` varchar(255) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`,`value`),
UNIQUE KEY `value_aro_groups` (`value`),
KEY `parent_id_aro_groups` (`parent_id`),
KEY `lft_rgt_aro_groups` (`lft`,`rgt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=45 ;",
"INSERT INTO `aro_groups` (`id`, `parent_id`, `lft`, `rgt`, `name`, `value`) VALUES
(21, 0, 1, 40, 'All', 'all'),
(22, 21, 2, 37, 'Regular members', 'regular_members'),
(23, 21, 38, 39, 'Registered applicants', 'registered_applicants'),
(24, 22, 4, 4, 'Auditing comittee', 'auditing_comittee'),
(25, 22, 5, 8, 'Executive counsil', 'executive_counsil'),
(26, 22, 9, 32, 'Engineers', 'engineers'),
(28, 25, 6, 7, 'Chairman and agent', 'chairman_and_agent'),
(29, 26, 10, 31, 'First-degree certified engineers', 'first_degree_certified_engineers'),
(32, 22, 33, 34, 'System administrators', 'admins'),
(33, 22, 35, 35, 'Users of regular members', 'users'),
(34, 29, 29, 30, 'VoIP admins', 'voip_admins'),
(35, 29, 11, 28, 'Second-degree certified engineers', 'second_degree_certified_engineers'),
(36, 35, 12, 27, 'Third-degree certified engineers', 'third_degree_certified_engineers'),
(37, 36, 13, 26, 'Fourth-degree certified engineers', 'fourth_degree_certified_engineers'),
(38, 37, 14, 25, 'Fifth-degree certified engineers', 'fifth_degree_certified_engineers'),
(39, 38, 15, 24, 'Sixth-degree certified engineers', 'sixth_degree_certified_engineers'),
(40, 39, 16, 23, 'Seventh-degree certified engineers', 'seventh_degree_certified_engineers'),
(41, 40, 17, 22, 'Eighth-degree certified engineers', 'eighth_degree_certified_engineers'),
(42, 41, 18, 21, 'Nineth-degree certified engineers', 'nineth_degree_certified_engineers'),
(43, 42, 19, 20, 'Tenth-degree certified engineers', 'tenth_degree_certified_engineers'),
(44, 22, 3, 36, 'Owners of company telephones', 'telephonists');",
"CREATE TABLE IF NOT EXISTS `aro_groups_map` (
`acl_id` int(11) NOT NULL DEFAULT '0',
`group_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`acl_id`,`group_id`),
KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `aro_groups_map` (`acl_id`, `group_id`) VALUES
(40, 22),
(42, 22),
(43, 22),
(44, 22),
(62, 22),
(64, 22),
(65, 22),
(73, 22),
(74, 22),
(77, 22),
(56, 24),
(60, 24),
(63, 24),
(51, 25),
(52, 25),
(63, 25),
(47, 26),
(54, 28),
(49, 29),
(58, 29),
(59, 29),
(68, 29),
(75, 29),
(76, 29),
(38, 32),
(57, 32),
(61, 32),
(66, 32),
(78, 32),
(79, 32),
(67, 34),
(69, 37),
(70, 38),
(71, 39),
(78, 43),
(72, 44);",
"CREATE TABLE IF NOT EXISTS `axo` (
`id` int(11) NOT NULL DEFAULT '0',
`section_value` varchar(240) COLLATE utf8_czech_ci NOT NULL DEFAULT '0',
`value` varchar(240) COLLATE utf8_czech_ci NOT NULL,
`name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `section_value_value_axo` (`section_value`,`value`),
KEY `value` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `axo` (`id`, `section_value`, `value`, `name`) VALUES
(15, 'Registration_Controller', 'name', 'Name'),
(16, 'Registration_Controller', 'surname', 'Surname'),
(17, 'Registration_Controller', 'street', 'Street'),
(20, 'Members_Controller', 'comment', 'Comment'),
(21, 'Members_Controller', 'entrance_date', 'Entrance date'),
(22, 'Members_Controller', 'qos_ceil', 'QoS ceil'),
(23, 'Members_Controller', 'qos_rate', 'QoS rate'),
(55, 'Accounts_Controller', 'invoices', 'Invoices'),
(91, 'Members_Controller', 'members', 'Members'),
(92, 'Users_Controller', 'additional_contacts', 'Additional contacts'),
(93, 'Users_Controller', 'users', 'Users'),
(95, 'Accounts_Controller', 'transfers', 'Transfers'),
(96, 'Accounts_Controller', 'accounts', 'Accounts'),
(97, 'Users_Controller', 'login', 'Login'),
(98, 'Members_Controller', 'name', 'Name'),
(100, 'Members_Controller', 'type', 'Type'),
(101, 'Users_Controller', 'name', 'Name'),
(102, 'Users_Controller', 'surname', 'Surname'),
(103, 'Members_Controller', 'address', 'Address'),
(104, 'Users_Controller', 'phone', 'Phone'),
(105, 'Users_Controller', 'email', 'E-mail'),
(106, 'Members_Controller', 'currentcredit', 'Current credit'),
(107, 'Members_Controller', 'en_fee', 'Entrance fee'),
(108, 'Members_Controller', 'en_fee_left', 'Entrance fee left'),
(109, 'Members_Controller', 'debit', 'Debit'),
(111, 'Users_Controller', 'work', 'Work'),
(112, 'Users_Controller', 'comment', 'Comment'),
(113, 'Users_Controller', 'password', 'Password'),
(115, 'Devices_Controller', 'devices', 'Devices'),
(116, 'Devices_Controller', 'admin', 'Admin'),
(117, 'Devices_Controller', 'iface', 'Interface'),
(118, 'Devices_Controller', 'port', 'Port'),
(119, 'Devices_Controller', 'ip_address', 'IP address'),
(120, 'Devices_Controller', 'vlan_iface', 'VLAN interface'),
(121, 'Devices_Controller', 'segment', 'Segment'),
(122, 'Devices_Controller', 'vlan', 'VLAN'),
(123, 'Devices_Controller', 'subnet', 'Subnet'),
(124, 'Members_Controller', 'registration', 'Registration'),
(126, 'Translations_Controller', 'translation', 'Translation'),
(127, 'Settings_Controller', 'system', 'System'),
(128, 'Users_Controller', 'member', 'Member'),
(129, 'Members_Controller', 'membership_interrupts', 'Membership interrupts'),
(130, 'Settings_Controller', 'fees', 'Fees'),
(131, 'Settings_Controller', 'enum_types', 'Enum types'),
(132, 'Members_Controller', 'organization_id', 'Organization identifier'),
(133, 'Members_Controller', 'leaving_date', 'Leaving date'),
(134, 'Accounts_Controller', 'bank_transfers', 'Bank transfers'),
(135, 'Accounts_Controller', 'bank_accounts', 'Bank accounts'),
(136, 'Accounts_Controller', 'unidentified_transfers', 'Unidentified transfers'),
(137, 'Devices_Controller', 'wireless_setting', 'Wireless setting'),
(138, 'Devices_Controller', 'main_engineer', 'Main engineer'),
(139, 'Devices_Controller', 'engineer', 'Engineer'),
(140, 'Address_points_Controller', 'address_point', 'Address point'),
(141, 'Members_Controller', 'var_sym', 'Variable symbol'),
(142, 'Address_points_Controller', 'town', 'Town'),
(143, 'Address_points_Controller', 'street', 'Street'),
(144, 'Members_Controller', 'redirect', 'Redirection of member'),
(145, 'Devices_Controller', 'redirect', 'Redirection of subnet'),
(146, 'VoIP_Controller', 'voip', 'VoIP'),
(147, 'VoIP_Controller', 'voip_password', 'VoIP password'),
(148, 'Devices_Controller', 'tools', 'Tools'),
(149, 'Users_Controller', 'application_password', 'Application password'),
(150, 'Members_Controller', 'locked', 'Locked account'),
(151, 'Redirection_Controller', 'redirection', 'Redirection'),
(152, 'Backup_Controller', 'backup', 'Backup'),
(153, 'Members_Controller', 'user_id', 'User who added member to system'),
(154, 'Messages_Controller', 'message', 'Message used for redirection'),
(155, 'Messages_Controller', 'ip_address', 'Redirection of single IP address'),
(156, 'Messages_Controller', 'member', 'Redirection of IP addresses of member'),
(157, 'Messages_Controller', 'subnet', 'Redirection of IP addresses in subnet'),
(158, 'Messages_Controller', 'subnet_enabled', 'Flag for enabling redirection mechanism on subnet'),
(159, 'Votes_Controller', 'work', 'Approval of work'),
(160, 'approval', 'templates', 'Approval templates'),
(161, 'approval', 'template_items', 'Approval template items'),
(162, 'approval', 'types', 'Approval types'),
(163, 'Accounts_Controller', 'bank_statements', 'Bank statements'),
(164, 'Phone_invoices_Controller', 'invoices', 'Invoices'),
(165, 'Phone_invoices_Controller', 'lock', 'Lock'),
(166, 'Phone_invoices_Controller', 'pay', 'Pay'),
(167, 'Phone_invoices_Controller', 'details', 'Details'),
(168, 'Phone_invoices_Controller', 'dumps', 'Dumps'),
(169, 'Private_phone_contacts_Controller', 'contacts', 'contacts'),
(170, 'Phone_invoices_Controller', 'mail_warning', 'Mail warning'),
(171, 'Members_Controller', 'fees', 'Member''s fees'),
(172, 'Ulogd_Controller', 'ip_address', 'IP address'),
(173, 'Ulogd_Controller', 'member', 'Member'),
(174, 'Comments_Controller', 'works', ''),
(175, 'Devices_Controller', 'allowed_subnet', 'Allowed subnet'),
(176, 'Users_Controller', 'keys', 'Keys (SSH)'),
(177, 'Clouds_Controller', 'clouds', 'Clouds'),
(178, 'Variable_Symbols_Controller', 'variable_symbols', 'Variable symbols');",
"CREATE TABLE IF NOT EXISTS `axo_map` (
`acl_id` int(11) NOT NULL DEFAULT '0',
`section_value` varchar(230) COLLATE utf8_czech_ci NOT NULL DEFAULT '0',
`value` varchar(230) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`acl_id`,`section_value`,`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `axo_map` (`acl_id`, `section_value`, `value`) VALUES
(38, 'Accounts_Controller', 'accounts'),
(38, 'Accounts_Controller', 'bank_accounts'),
(38, 'Accounts_Controller', 'bank_statements'),
(38, 'Accounts_Controller', 'bank_transfers'),
(38, 'Accounts_Controller', 'invoices'),
(38, 'Accounts_Controller', 'transfers'),
(38, 'Accounts_Controller', 'unidentifed_transfers'),
(38, 'Accounts_Controller', 'unidentified_transfers'),
(38, 'Address_points_Controller', 'address_point'),
(38, 'Address_points_Controller', 'street'),
(38, 'Address_points_Controller', 'town'),
(38, 'approval', 'template_items'),
(38, 'approval', 'templates'),
(38, 'approval', 'types'),
(38, 'Backup_Controller', 'backup'),
(38, 'Comments_Controller', 'works'),
(38, 'Devices_Controller', 'admin'),
(38, 'Devices_Controller', 'allowed_subnet'),
(38, 'Devices_Controller', 'devices'),
(38, 'Devices_Controller', 'engineer'),
(38, 'Devices_Controller', 'iface'),
(38, 'Devices_Controller', 'ip_address'),
(38, 'Devices_Controller', 'login'),
(38, 'Devices_Controller', 'main_engineer'),
(38, 'Devices_Controller', 'password'),
(38, 'Devices_Controller', 'port'),
(38, 'Devices_Controller', 'redirect'),
(38, 'Devices_Controller', 'segment'),
(38, 'Devices_Controller', 'subnet'),
(38, 'Devices_Controller', 'tools'),
(38, 'Devices_Controller', 'vlan'),
(38, 'Devices_Controller', 'vlan_iface'),
(38, 'Devices_Controller', 'wireless_setting'),
(38, 'Members_Controller', 'address'),
(38, 'Members_Controller', 'comment'),
(38, 'Members_Controller', 'currentcredit'),
(38, 'Members_Controller', 'debit'),
(38, 'Members_Controller', 'en_fee'),
(38, 'Members_Controller', 'en_fee_left'),
(38, 'Members_Controller', 'entrance_date'),
(38, 'Members_Controller', 'fees'),
(38, 'Members_Controller', 'leaving_date'),
(38, 'Members_Controller', 'locked'),
(38, 'Members_Controller', 'members'),
(38, 'Members_Controller', 'membership_interrupts'),
(38, 'Members_Controller', 'name'),
(38, 'Members_Controller', 'organization_id'),
(38, 'Members_Controller', 'qos_ceil'),
(38, 'Members_Controller', 'qos_rate'),
(38, 'Members_Controller', 'redirect'),
(38, 'Members_Controller', 'registration'),
(38, 'Members_Controller', 'type'),
(38, 'Members_Controller', 'user_id'),
(38, 'Members_Controller', 'var_sym'),
(38, 'Messages_Controller', 'ip_address'),
(38, 'Messages_Controller', 'member'),
(38, 'Messages_Controller', 'message'),
(38, 'Messages_Controller', 'subnet'),
(38, 'Messages_Controller', 'subnet_enabled'),
(38, 'Phone_invoices_Controller', 'details'),
(38, 'Phone_invoices_Controller', 'dumps'),
(38, 'Phone_invoices_Controller', 'invoices'),
(38, 'Phone_invoices_Controller', 'lock'),
(38, 'Phone_invoices_Controller', 'mail_warning'),
(38, 'Phone_invoices_Controller', 'pay'),
(38, 'Redirection_Controller', 'redirection'),
(38, 'Ulogd_Controller', 'ip_address'),
(38, 'Ulogd_Controller', 'member'),
(38, 'Users_Controller', 'additional_contacts'),
(38, 'Users_Controller', 'comment'),
(38, 'Users_Controller', 'email'),
(38, 'Users_Controller', 'keys'),
(38, 'Users_Controller', 'login'),
(38, 'Users_Controller', 'member'),
(38, 'Users_Controller', 'name'),
(38, 'Users_Controller', 'password'),
(38, 'Users_Controller', 'phone'),
(38, 'Users_Controller', 'surname'),
(38, 'Users_Controller', 'users'),
(38, 'Users_Controller', 'work'),
(38, 'VoIP_Controller', 'voip'),
(38, 'VoIP_Controller', 'voip_password'),
(40, 'Accounts_Controller', 'accounts'),
(40, 'Accounts_Controller', 'transfers'),
(40, 'Users_Controller', 'login'),
(40, 'Users_Controller', 'users'),
(40, 'VoIP_Controller', 'voip'),
(42, 'Accounts_Controller', 'unidentified_transfers'),
(43, 'Devices_Controller', 'admin'),
(43, 'Devices_Controller', 'devices'),
(43, 'Devices_Controller', 'iface'),
(43, 'Devices_Controller', 'ip_address'),
(43, 'Devices_Controller', 'port'),
(43, 'Members_Controller', 'address'),
(43, 'Members_Controller', 'currentcredit'),
(43, 'Members_Controller', 'debit'),
(43, 'Members_Controller', 'en_fee'),
(43, 'Members_Controller', 'en_fee_left'),
(43, 'Members_Controller', 'entrance_date'),
(43, 'Members_Controller', 'fees'),
(43, 'Members_Controller', 'members'),
(43, 'Members_Controller', 'name'),
(43, 'Users_Controller', 'additional_contacts'),
(43, 'Users_Controller', 'email'),
(43, 'Users_Controller', 'login'),
(43, 'Users_Controller', 'name'),
(43, 'Users_Controller', 'phone'),
(43, 'Users_Controller', 'surname'),
(43, 'Users_Controller', 'users'),
(43, 'Users_Controller', 'work'),
(44, 'Users_Controller', 'application_password'),
(44, 'Users_Controller', 'login'),
(44, 'Users_Controller', 'password'),
(44, 'Users_Controller', 'users'),
(44, 'VoIP_Controller', 'voip_password'),
(47, 'Devices_Controller', 'admin'),
(47, 'Devices_Controller', 'devices'),
(47, 'Devices_Controller', 'iface'),
(47, 'Devices_Controller', 'ip_address'),
(47, 'Devices_Controller', 'port'),
(47, 'Devices_Controller', 'segment'),
(47, 'Devices_Controller', 'subnet'),
(47, 'Devices_Controller', 'vlan'),
(47, 'Devices_Controller', 'vlan_iface'),
(47, 'Devices_Controller', 'wireless_setting'),
(49, 'Backup_Controller', 'backup'),
(49, 'Devices_Controller', 'devices'),
(49, 'Devices_Controller', 'engineer'),
(49, 'Devices_Controller', 'iface'),
(49, 'Devices_Controller', 'ip_address'),
(49, 'Devices_Controller', 'port'),
(49, 'Devices_Controller', 'segment'),
(49, 'Devices_Controller', 'subnet'),
(49, 'Devices_Controller', 'tools'),
(49, 'Devices_Controller', 'vlan'),
(49, 'Devices_Controller', 'vlan_iface'),
(49, 'Devices_Controller', 'wireless_setting'),
(49, 'Redirection_Controller', 'redirection'),
(49, 'Ulogd_Controller', 'ip_address'),
(49, 'Ulogd_Controller', 'member'),
(49, 'Users_Controller', 'work'),
(51, 'Accounts_Controller', 'accounts'),
(51, 'Accounts_Controller', 'bank_accounts'),
(51, 'Accounts_Controller', 'bank_statements'),
(51, 'Accounts_Controller', 'bank_transfers'),
(51, 'Accounts_Controller', 'invoices'),
(51, 'Accounts_Controller', 'transfers'),
(51, 'Accounts_Controller', 'unidentifed_transfers'),
(51, 'Accounts_Controller', 'unidentified_transfers'),
(51, 'Address_points_Controller', 'address_point'),
(51, 'Address_points_Controller', 'street'),
(51, 'Address_points_Controller', 'town'),
(51, 'Devices_Controller', 'admin'),
(51, 'Devices_Controller', 'engineer'),
(51, 'Devices_Controller', 'main_engineer'),
(51, 'Devices_Controller', 'redirect'),
(51, 'Members_Controller', 'address'),
(51, 'Members_Controller', 'comment'),
(51, 'Members_Controller', 'currentcredit'),
(51, 'Members_Controller', 'debit'),
(51, 'Members_Controller', 'en_fee'),
(51, 'Members_Controller', 'en_fee_left'),
(51, 'Members_Controller', 'entrance_date'),
(51, 'Members_Controller', 'fees'),
(51, 'Members_Controller', 'leaving_date'),
(51, 'Members_Controller', 'locked'),
(51, 'Members_Controller', 'members'),
(51, 'Members_Controller', 'membership_interrupts'),
(51, 'Members_Controller', 'name'),
(51, 'Members_Controller', 'organization_id'),
(51, 'Members_Controller', 'qos_ceil'),
(51, 'Members_Controller', 'qos_rate'),
(51, 'Members_Controller', 'redirect'),
(51, 'Members_Controller', 'registration'),
(51, 'Members_Controller', 'type'),
(51, 'Members_Controller', 'user_id'),
(51, 'Members_Controller', 'var_sym'),
(51, 'Messages_Controller', 'ip_address'),
(51, 'Messages_Controller', 'member'),
(51, 'Messages_Controller', 'message'),
(51, 'Messages_Controller', 'subnet'),
(51, 'Messages_Controller', 'subnet_enabled'),
(51, 'Users_Controller', 'additional_contacts'),
(51, 'Users_Controller', 'comment'),
(51, 'Users_Controller', 'email'),
(51, 'Users_Controller', 'login'),
(51, 'Users_Controller', 'name'),
(51, 'Users_Controller', 'password'),
(51, 'Users_Controller', 'phone'),
(51, 'Users_Controller', 'surname'),
(51, 'Users_Controller', 'users'),
(51, 'Users_Controller', 'work'),
(52, 'Accounts_Controller', 'bank_statements'),
(52, 'Devices_Controller', 'admin'),
(52, 'Devices_Controller', 'devices'),
(52, 'Devices_Controller', 'iface'),
(52, 'Devices_Controller', 'ip_address'),
(52, 'Devices_Controller', 'port'),
(52, 'Devices_Controller', 'segment'),
(52, 'Devices_Controller', 'subnet'),
(52, 'Devices_Controller', 'vlan'),
(52, 'Devices_Controller', 'vlan_iface'),
(52, 'Devices_Controller', 'wireless_setting'),
(52, 'Messages_Controller', 'ip_address'),
(52, 'Messages_Controller', 'member'),
(52, 'Messages_Controller', 'message'),
(52, 'Messages_Controller', 'subnet'),
(52, 'Messages_Controller', 'subnet_enabled'),
(54, 'Members_Controller', 'registration'),
(54, 'Users_Controller', 'work'),
(56, 'Accounts_Controller', 'accounts'),
(56, 'Accounts_Controller', 'bank_accounts'),
(56, 'Accounts_Controller', 'bank_transfers'),
(56, 'Accounts_Controller', 'invoices'),
(56, 'Accounts_Controller', 'transfers'),
(56, 'Accounts_Controller', 'unidentifed_transfers'),
(56, 'Accounts_Controller', 'unidentified_transfers'),
(56, 'Devices_Controller', 'admin'),
(56, 'Devices_Controller', 'devices'),
(56, 'Devices_Controller', 'iface'),
(56, 'Devices_Controller', 'ip_address'),
(56, 'Devices_Controller', 'port'),
(56, 'Devices_Controller', 'segment'),
(56, 'Devices_Controller', 'subnet'),
(56, 'Devices_Controller', 'vlan'),
(56, 'Devices_Controller', 'vlan_iface'),
(56, 'Devices_Controller', 'wireless_setting'),
(56, 'Members_Controller', 'address'),
(56, 'Members_Controller', 'comment'),
(56, 'Members_Controller', 'currentcredit'),
(56, 'Members_Controller', 'debit'),
(56, 'Members_Controller', 'en_fee'),
(56, 'Members_Controller', 'en_fee_left'),
(56, 'Members_Controller', 'entrance_date'),
(56, 'Members_Controller', 'fees'),
(56, 'Members_Controller', 'members'),
(56, 'Members_Controller', 'name'),
(56, 'Members_Controller', 'qos_ceil'),
(56, 'Members_Controller', 'qos_rate'),
(56, 'Members_Controller', 'type'),
(56, 'Users_Controller', 'additional_contacts'),
(56, 'Users_Controller', 'comment'),
(56, 'Users_Controller', 'email'),
(56, 'Users_Controller', 'login'),
(56, 'Users_Controller', 'name'),
(56, 'Users_Controller', 'password'),
(56, 'Users_Controller', 'phone'),
(56, 'Users_Controller', 'surname'),
(56, 'Users_Controller', 'users'),
(56, 'Users_Controller', 'work'),
(57, 'Settings_Controller', 'access_rights'),
(57, 'Settings_Controller', 'economy'),
(57, 'Settings_Controller', 'enum_types'),
(57, 'Settings_Controller', 'fees'),
(57, 'Settings_Controller', 'system'),
(57, 'Translations_Controller', 'translation'),
(58, 'Members_Controller', 'address'),
(58, 'Members_Controller', 'comment'),
(58, 'Members_Controller', 'members'),
(58, 'Members_Controller', 'name'),
(58, 'Members_Controller', 'organization_id'),
(58, 'Members_Controller', 'qos_ceil'),
(58, 'Members_Controller', 'qos_rate'),
(58, 'Members_Controller', 'type'),
(58, 'Users_Controller', 'additional_contacts'),
(58, 'Users_Controller', 'comment'),
(58, 'Users_Controller', 'email'),
(58, 'Users_Controller', 'login'),
(58, 'Users_Controller', 'name'),
(58, 'Users_Controller', 'surname'),
(58, 'Users_Controller', 'users'),
(59, 'Address_points_Controller', 'address_point'),
(59, 'Address_points_Controller', 'street'),
(59, 'Address_points_Controller', 'town'),
(59, 'Devices_Controller', 'main_engineer'),
(59, 'Members_Controller', 'entrance_date'),
(59, 'Users_Controller', 'additional_contacts'),
(59, 'Users_Controller', 'email'),
(59, 'Users_Controller', 'login'),
(59, 'Users_Controller', 'member'),
(59, 'Users_Controller', 'password'),
(59, 'Users_Controller', 'phone'),
(60, 'Members_Controller', 'address'),
(60, 'Members_Controller', 'comment'),
(60, 'Members_Controller', 'members'),
(60, 'Members_Controller', 'name'),
(60, 'Users_Controller', 'additional_contacts'),
(60, 'Users_Controller', 'comment'),
(60, 'Users_Controller', 'email'),
(60, 'Users_Controller', 'login'),
(60, 'Users_Controller', 'name'),
(60, 'Users_Controller', 'password'),
(60, 'Users_Controller', 'phone'),
(60, 'Users_Controller', 'surname'),
(60, 'Users_Controller', 'users'),
(60, 'Users_Controller', 'work'),
(62, 'Users_Controller', 'work'),
(63, 'Votes_Controller', 'work'),
(64, 'Users_Controller', 'keys'),
(64, 'Users_Controller', 'work'),
(65, 'Users_Controller', 'application_password'),
(66, 'Users_Controller', 'application_password'),
(67, 'Members_Controller', 'currentcredit'),
(67, 'Members_Controller', 'debit'),
(67, 'Members_Controller', 'en_fee'),
(67, 'Members_Controller', 'en_fee_left'),
(67, 'Members_Controller', 'leaving_date'),
(67, 'Members_Controller', 'membership_interrupts'),
(67, 'Members_Controller', 'registration'),
(67, 'Users_Controller', 'work'),
(67, 'VoIP_Controller', 'voip'),
(67, 'VoIP_Controller', 'voip_password'),
(68, 'Devices_Controller', 'admin'),
(69, 'Devices_Controller', 'admin'),
(70, 'Devices_Controller', 'login'),
(70, 'Devices_Controller', 'password'),
(71, 'Devices_Controller', 'login'),
(71, 'Devices_Controller', 'password'),
(72, 'Phone_invoices_Controller', 'dumps'),
(72, 'Phone_invoices_Controller', 'user_invoices'),
(73, 'Private_phone_contacts_Controller', 'contacts'),
(74, 'Users_Controller', 'additional_contacts'),
(75, 'Members_Controller', 'fees'),
(76, 'Comments_Controller', 'works'),
(77, 'Devices_Controller', 'allowed_subnet'),
(78, 'Clouds_Controller', 'clouds'),
(79, 'Variable_Symbols_Controller', 'variable_symbols');",
"CREATE TABLE IF NOT EXISTS `axo_sections` (
`id` int(11) NOT NULL DEFAULT '0',
`value` varchar(230) COLLATE utf8_czech_ci NOT NULL,
`name` varchar(230) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `value_axo_sections` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `axo_sections` (`id`, `value`, `name`) VALUES
(10, 'Registration_Controller', 'Self-registration of a new member'),
(13, 'Members_Controller', 'Regular members'),
(14, 'Users_Controller', 'Users of regular members'),
(16, 'Accounts_Controller', 'Accounts, transfers, bank accounts and bank transfers'),
(17, 'Devices_Controller', 'Devices and other dependent objects'),
(18, 'Translations_Controller', 'Translations'),
(19, 'Settings_Controller', 'Settings'),
(20, 'Address_points_Controller', 'Address points'),
(21, 'VoIP_Controller', 'Voip'),
(22, 'Messages_Controller', 'Controller used for handling messages for redirection including setting redirection for IP addresses, members and subnets.'),
(23, 'Votes_Controller', 'Approval'),
(24, 'Phone_invoices_Controller', 'Phone invoice managing'),
(25, 'Private_phone_contacts_Controller', 'Private phone contacts managing'),
(26, 'Ulogd_Controller', 'Network traffics of ip addresses and members'),
(27, 'Clouds_Controller', 'Clouds managing'),
(28, 'Variable_Symbols_Controller', 'Variable symbols managing');",
"CREATE TABLE IF NOT EXISTS `bank_accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(254) COLLATE utf8_czech_ci NOT NULL,
`member_id` int(11) DEFAULT NULL,
`account_nr` varchar(254) COLLATE utf8_czech_ci DEFAULT NULL,
`bank_nr` varchar(20) COLLATE utf8_czech_ci DEFAULT NULL,
`IBAN` varchar(254) COLLATE utf8_czech_ci DEFAULT NULL,
`SWIFT` varchar(254) COLLATE utf8_czech_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `member_id` (`member_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `bank_statements` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`bank_account_id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
`statement_number` int(11) DEFAULT NULL,
`type` varchar(40) COLLATE utf8_czech_ci DEFAULT NULL,
`from` datetime DEFAULT NULL,
`to` datetime DEFAULT NULL,
`opening_balance` double DEFAULT NULL,
`closing_balance` double DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `bank_account_id` (`bank_account_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `bank_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`template_name` varchar(50) COLLATE utf8_czech_ci NOT NULL,
`item_separator` varchar(1) COLLATE utf8_czech_ci NOT NULL,
`string_separator` varchar(1) COLLATE utf8_czech_ci NOT NULL,
`bank_code` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`account_name` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`account_number` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`constant_symbol` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`variable_symbol` varchar(30) COLLATE utf8_czech_ci NOT NULL,
`specific_symbol` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`counteraccount_name` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`counteraccount_number` varchar(30) COLLATE utf8_czech_ci NOT NULL,
`counteraccount_bank_code` varchar(30) COLLATE utf8_czech_ci NOT NULL,
`text` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`amount` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`expenditure_earning` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`value_for_earning` varchar(10) COLLATE utf8_czech_ci DEFAULT NULL,
`datetime` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `bank_transfers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`origin_id` int(11) DEFAULT NULL COMMENT 'id of the origin bank account in bank_accounts table',
`destination_id` int(11) DEFAULT NULL COMMENT 'id of the destination bank account in bank_accounts table',
`transfer_id` int(11) DEFAULT NULL,
`bank_statement_id` int(11) DEFAULT NULL,
`transaction_code` bigint(20) DEFAULT NULL,
`number` int(11) DEFAULT NULL COMMENT 'Line number or number of the bank listing item',
`variable_symbol` bigint(20) DEFAULT NULL,
`constant_symbol` bigint(20) DEFAULT NULL,
`specific_symbol` bigint(20) DEFAULT NULL,
`comment` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `origin_id` (`origin_id`),
KEY `destination_id` (`destination_id`),
KEY `transfer_id` (`transfer_id`),
KEY `number` (`number`,`variable_symbol`),
KEY `bank_statement_id` (`bank_statement_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `cash` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL,
`transfer_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `member_id` (`member_id`),
KEY `transfer_id` (`transfer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci COMMENT='implements cash deposits and withdrawals ' AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `clouds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `clouds_subnets` (
`cloud_id` int(11) NOT NULL,
`subnet_id` int(11) NOT NULL,
PRIMARY KEY (`cloud_id`,`subnet_id`),
KEY `subnet_id` (`subnet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci COMMENT='Join table between subnets and clouds.';",
"CREATE TABLE IF NOT EXISTS `clouds_users` (
`cloud_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`cloud_id`,`user_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci COMMENT='Join table between users and clouds.';",
"CREATE TABLE IF NOT EXISTS `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`comments_thread_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`text` text COLLATE utf8_czech_ci NOT NULL,
`datetime` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `comments_thread_id` (`comments_thread_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `comments_threads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(255) COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `config` (
`name` varchar(100) COLLATE utf8_czech_ci NOT NULL,
`value` text COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;",
"INSERT INTO `config` (`name`, `value`) VALUES
('default_request_approval_template', '1'),
('default_work_approval_template', '1'),
('default_work_report_approval_template', '1');",
"CREATE TABLE IF NOT EXISTS `contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` int(11) NOT NULL,
`value` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `type` (`type`),
KEY `value` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `contacts_countries` (
`contact_id` int(11) NOT NULL,
`country_id` smallint(6) NOT NULL,
PRIMARY KEY (`contact_id`,`country_id`),
KEY `country_id` (`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci COMMENT='Relation between phone number in contacts to countries.';",
"CREATE TABLE IF NOT EXISTS `countries` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`country_name` varchar(100) COLLATE utf8_czech_ci NOT NULL COMMENT 'Country name in english',
`country_iso` char(3) COLLATE utf8_czech_ci NOT NULL COMMENT 'ISO 3166-1 alpha-3',
`country_code` varchar(4) COLLATE utf8_czech_ci NOT NULL COMMENT 'Telefone prefix of country',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=235 ;",
"INSERT INTO `countries` (`id`, `country_name`, `country_iso`, `country_code`) VALUES
(1, 'Afghanistan', 'AFG', '93'),
(2, 'Albania', 'ALB', '355'),
(3, 'Algeria', 'DZA', '213'),
(4, 'American Samoa', 'ASM', '1684'),
(5, 'Andorra', 'AND', '376'),
(6, 'Angola', 'AGO', '244'),
(7, 'Anguilla', 'AIA', '1264'),
(8, 'Antarctica', 'ATA', '672'),
(9, 'Antigua and Barbuda', 'ATG', '1268'),
(10, 'Argentina', 'ARG', '54'),
(11, 'Armenia', 'ARM', '374'),
(12, 'Aruba', 'ABW', '297'),
(13, 'Australia', 'AUS', '61'),
(14, 'Austria', 'AUT', '43'),
(15, 'Azerbaijan', 'AZE', '994'),
(16, 'Bahamas', 'BHS', '1242'),
(17, 'Bahrain', 'BHR', '973'),
(18, 'Bangladesh', 'BGD', '880'),
(19, 'Barbados', 'BRB', '1246'),
(20, 'Belarus', 'BLR', '375'),
(21, 'Belgium', 'BEL', '32'),
(22, 'Belize', 'BLZ', '501'),
(23, 'Benin', 'BEN', '229'),
(24, 'Bermuda', 'BMU', '1441'),
(25, 'Bhutan', 'BTN', '975'),
(26, 'Bolivia', 'BOL', '591'),
(27, 'Bosnia and Herzegovina', 'BIH', '387'),
(28, 'Botswana', 'BWA', '267'),
(29, 'Brazil', 'BRA', '55'),
(30, 'British Indian Ocean Territory', 'IOT', ''),
(31, 'British Virgin Islands', 'VGB', '1284'),
(32, 'Brunei', 'BRN', '673'),
(33, 'Bulgaria', 'BGR', '359'),
(34, 'Burkina Faso', 'BFA', '226'),
(35, 'Burma (Myanmar)', 'MMR', '95'),
(36, 'Burundi', 'BDI', '257'),
(37, 'Cambodia', 'KHM', '855'),
(38, 'Cameroon', 'CMR', '237'),
(39, 'Canada', 'CAN', '1'),
(40, 'Cape Verde', 'CPV', '238'),
(41, 'Cayman Islands', 'CYM', '1345'),
(42, 'Central African Republic', 'CAF', '236'),
(43, 'Chad', 'TCD', '235'),
(44, 'Chile', 'CHL', '56'),
(45, 'China', 'CHN', '86'),
(46, 'Christmas Island', 'CXR', '61'),
(47, 'Cocos (Keeling) Islands', 'CCK', '61'),
(48, 'Colombia', 'COL', '57'),
(49, 'Comoros', 'COM', '269'),
(50, 'Cook Islands', 'COK', '682'),
(51, 'Costa Rica', 'CRC', '506'),
(52, 'Croatia', 'HRV', '385'),
(53, 'Cuba', 'CUB', '53'),
(54, 'Cyprus', 'CYP', '357'),
(55, 'Czech Republic', 'CZE', '420'),
(56, 'Democratic Republic of the Congo', 'COD', '243'),
(57, 'Denmark', 'DNK', '45'),
(58, 'Djibouti', 'DJI', '253'),
(59, 'Dominica', 'DMA', '1767'),
(60, 'Dominican Republic', 'DOM', '1809'),
(61, 'Ecuador', 'ECU', '593'),
(62, 'Egypt', 'EGY', '20'),
(63, 'El Salvador', 'SLV', '503'),
(64, 'Equatorial Guinea', 'GNQ', '240'),
(65, 'Eritrea', 'ERI', '291'),
(66, 'Estonia', 'EST', '372'),
(67, 'Ethiopia', 'ETH', '251'),
(68, 'Falkland Islands', 'FLK', '500'),
(69, 'Faroe Islands', 'FRO', '298'),
(70, 'Fiji', 'FJI', '679'),
(71, 'Finland', 'FIN', '358'),
(72, 'France', 'FRA', '33'),
(73, 'French Polynesia', 'PYF', '689'),
(74, 'Gabon', 'GAB', '241'),
(75, 'Gambia', 'GMB', '220'),
(76, 'Georgia', 'GEO', '995'),
(77, 'Germany', 'DEU', '49'),
(78, 'Ghana', 'GHA', '233'),
(79, 'Gibraltar', 'GIB', '350'),
(80, 'Greece', 'GRC', '30'),
(81, 'Greenland', 'GRL', '299'),
(82, 'Grenada', 'GRD', '1473'),
(83, 'Guam', 'GUM', '1671'),
(84, 'Guatemala', 'GTM', '502'),
(85, 'Guinea', 'GIN', '224'),
(86, 'Guinea-Bissau', 'GNB', '245'),
(87, 'Guyana', 'GUY', '592'),
(88, 'Haiti', 'HTI', '509'),
(89, 'Holy See (Vatican City)', 'VAT', '39'),
(90, 'Honduras', 'HND', '504'),
(91, 'Hong Kong', 'HKG', '852'),
(92, 'Hungary', 'HUN', '36'),
(93, 'Iceland', 'IS', '354'),
(94, 'India', 'IND', '91'),
(95, 'Indonesia', 'IDN', '62'),
(96, 'Iran', 'IRN', '98'),
(97, 'Iraq', 'IRQ', '964'),
(98, 'Ireland', 'IRL', '353'),
(99, 'Isle of Man', 'IMN', '44'),
(100, 'Israel', 'ISR', '972'),
(101, 'Italy', 'ITA', '39'),
(102, 'Ivory Coast', 'CIV', '225'),
(103, 'Jamaica', 'JAM', '1876'),
(104, 'Japan', 'JPN', '81'),
(105, 'Jersey', 'JEY', ''),
(106, 'Jordan', 'JOR', '962'),
(107, 'Kazakhstan', 'KAZ', '7'),
(108, 'Kenya', 'KEN', '254'),
(109, 'Kiribati', 'KIR', '686'),
(110, 'Kuwait', 'KWT', '965'),
(111, 'Kyrgyzstan', 'KGZ', '996'),
(112, 'Laos', 'LAO', '856'),
(113, 'Latvia', 'LVA', '371'),
(114, 'Lebanon', 'LBN', '961'),
(115, 'Lesotho', 'LSO', '266'),
(116, 'Liberia', 'LBR', '231'),
(117, 'Libya', 'LBY', '218'),
(118, 'Liechtenstein', 'LIE', '423'),
(119, 'Lithuania', 'LTU', '370'),
(120, 'Luxembourg', 'LUX', '352'),
(121, 'Macau', 'MAC', '853'),
(122, 'Macedonia', 'MKD', '389'),
(123, 'Madagascar', 'MDG', '261'),
(124, 'Malawi', 'MWI', '265'),
(125, 'Malaysia ', 'MYS', '60'),
(126, 'Maldives', 'MDV', '960'),
(127, 'Mali', 'MLI', '223'),
(128, 'Malta', 'MLT', '356'),
(129, 'Marshall Islands', 'MHL', '692'),
(130, 'Mauritania', 'MRT', '222'),
(131, 'Mauritius', 'MUS', '230'),
(132, 'Mayotte ', 'MYT', '262'),
(133, 'Mexico', 'MEX', '52'),
(134, 'Micronesia', 'FSM', '691'),
(135, 'Moldova', 'MDA', '373'),
(136, 'Monaco', 'MCO', '377'),
(137, 'Mongolia ', 'MNG', '976'),
(138, 'Montenegro ', 'MNE', '382'),
(139, 'Montserrat', 'MSR', '1664'),
(140, 'Morocco', 'MAR', '212'),
(141, 'Mozambique', 'MOZ', '258'),
(142, 'Namibia ', 'NAM', '264'),
(143, 'Nauru', 'NRU', '674'),
(144, 'Nepal', 'NPL', '977'),
(145, 'Netherlands', 'NLD', '31'),
(146, 'Netherlands Antilles', 'ANT', '599'),
(147, 'New Caledonia', 'NCL', '687'),
(148, 'New Zealand ', 'NZL', '64'),
(149, 'Nicaragua', 'NIC', '505'),
(150, 'Niger', 'NER', '227'),
(151, 'Nigeria', 'NGA', '234'),
(152, 'Niue', 'NIU', '683'),
(153, 'Norfolk Island', 'NFK', '672'),
(154, 'North Korea', 'PRK', '850'),
(155, 'Northern Mariana Islands', 'MNP', '1670'),
(156, 'Norway', 'NOR', '47'),
(157, 'Oman', 'OMN', '968'),
(158, 'Pakistan', 'PAK', '92'),
(159, 'Palau', 'PLW', '680'),
(160, 'Panama', 'PAN', '507'),
(161, 'Papua New Guinea', 'PNG', '675'),
(162, 'Paraguay', 'PRY', '595'),
(163, 'Peru ', 'PER', '51'),
(164, 'Philippines', 'PHL', '63'),
(165, 'Pitcairn Islands', 'PCN', '870'),
(166, 'Poland', 'POL', '48'),
(167, 'Portugal', 'PRT', '351'),
(168, 'Puerto Rico', 'PRI', '1'),
(169, 'Qatar', 'QAT', '974'),
(170, 'Republic of the Congo', 'COG', '242'),
(171, 'Romania', 'ROU', '40'),
(172, 'Russia', 'RUS', '7'),
(173, 'Rwanda', 'RWA', '250'),
(174, 'Saint Barthelemy', 'BLM', '590'),
(175, 'Saint Helena', 'SHN', '290'),
(176, 'Saint Kitts and Nevis ', 'KNA', '1869'),
(177, 'Saint Lucia', 'LCA', '1758'),
(178, 'Saint Martin', 'MAF', '1599'),
(179, 'Saint Pierre and Miquelon', 'SPM', '508'),
(180, 'Saint Vincent and the Grenadines', 'VCT', '1784'),
(181, 'Samoa', 'WSM', '685'),
(182, 'San Marino', 'SMR', '378'),
(183, 'Sao Tome and Principe', 'STP', '239'),
(184, 'Saudi Arabia', 'SAU', '966'),
(185, 'Senegal', 'SEN', '221'),
(186, 'Serbia', 'SRB', '381'),
(187, 'Seychelles', 'SYC', '248'),
(188, 'Sierra Leone', 'SLE', '232'),
(189, 'Singapore', 'SGP', '65'),
(190, 'Slovakia', 'SVK', '421'),
(191, 'Slovenia', 'SVN', '386'),
(192, 'Solomon Islands', 'SLB', '677'),
(193, 'Somalia', 'SOM', '252'),
(194, 'South Africa', 'ZAF', '27'),
(195, 'South Korea', 'KOR', '82'),
(196, 'Spain', 'ESP', '34'),
(197, 'Sri Lanka', 'LKA', '94'),
(198, 'Sudan', 'SDN', '249'),
(199, 'Suriname', 'SUR', '597'),
(200, 'Svalbard', 'SJM', ''),
(201, 'Swaziland', 'SWZ', '268'),
(202, 'Sweden', 'SWE', '46'),
(203, 'Switzerland', 'CHE', '41'),
(204, 'Syria', 'SYR', '963'),
(205, 'Taiwan', 'TWN', '886'),
(206, 'Tajikistan', 'TJK', '992'),
(207, 'Tanzania', 'TZA', '255'),
(208, 'Thailand', 'THA', '66'),
(209, 'Timor-Leste', 'TLS', '670'),
(210, 'Togo', 'TGO', '228'),
(211, 'Tokelau', 'TKL', '690'),
(212, 'Tonga', 'TON', '676'),
(213, 'Trinidad and Tobago', 'TTO', '1868'),
(214, 'Tunisia', 'TUN', '216'),
(215, 'Turkey', 'TUR', '90'),
(216, 'Turkmenistan', 'TKM', '993'),
(217, 'Turks and Caicos Islands', 'TCA', '1649'),
(218, 'Tuvalu', 'TUV', '688'),
(219, 'Uganda', 'UGA', '256'),
(220, 'Ukraine', 'UKR', '380'),
(221, 'United Arab Emirates', 'ARE', '971'),
(222, 'United Kingdom', 'GBR', '44'),
(223, 'United States', 'USA', '1'),
(224, 'Uruguay', 'URY', '598'),
(225, 'US Virgin Islands', 'VIR', '1340'),
(226, 'Uzbekistan', 'UZB', '998'),
(227, 'Vanuatu', 'VUT', '678'),
(228, 'Venezuela', 'VEN', '58'),
(229, 'Vietnam', 'VNM', '84'),
(230, 'Wallis and Futuna', 'WLF', '681'),
(231, 'Western Sahara', 'ESH', ''),
(232, 'Yemen', 'YEM', '967'),
(233, 'Zambia', 'ZMB', '260'),
(234, 'Zimbabwe', 'ZWE', '263');",
"CREATE TABLE IF NOT EXISTS `devices` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`address_point_id` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_czech_ci DEFAULT NULL,
`type` int(11) NOT NULL,
`trade_name` varchar(50) COLLATE utf8_czech_ci DEFAULT NULL,
`operating_system` tinyint(4) DEFAULT NULL,
`PPPoE_logging_in` tinyint(4) DEFAULT NULL,
`login` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`password` varchar(30) COLLATE utf8_czech_ci DEFAULT NULL,
`price` double DEFAULT NULL,
`payment_rate` double DEFAULT NULL,
`buy_date` date DEFAULT NULL,
`comment` varchar(254) COLLATE utf8_czech_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `address_point_id` (`address_point_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `device_admins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`device_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `device_id` (`device_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `device_engineers` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`device_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `device_id` (`device_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `device_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`enum_type_id` int(11) NOT NULL,
`name` varchar(80) COLLATE utf8_czech_ci NOT NULL,
`values` text COLLATE utf8_czech_ci NOT NULL,
`default` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `device_templates_category_id` (`enum_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS `email_queues` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`from` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`to` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`subject` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`body` text COLLATE utf8_czech_ci NOT NULL,
`state` tinyint(4) NOT NULL,
`access_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `from` (`from`,`to`)
... Rozdílový soubor je zkrácen, protože jeho délka přesahuje max. limit.

Také k dispozici: Unified diff