From f81af9e5bb4749ced28e0ab7196eb0a115773f84 Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Mon, 15 Feb 2016 07:42:33 +0100 Subject: [PATCH] =?UTF-8?q?add=20forg=C3=B3villa=20t=C3=A1bl=C3=A1k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.txt | 2 + common/config/params.php | 2 +- ...__table__terminal__and__terminal_tipus.php | 70 +++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 console/migrations/m160215_063205_create__table__terminal__and__terminal_tipus.php diff --git a/changelog.txt b/changelog.txt index 64a23b3..1540b83 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,5 @@ +-0.0.34 + - Forgóvilla táblák hozzáadása -0.0.33 - Az adminon kívül mindenki csak max 3 napot lát visszamenőleg mindenből -0.0.32 diff --git a/common/config/params.php b/common/config/params.php index 0cfed25..af80c6c 100644 --- a/common/config/params.php +++ b/common/config/params.php @@ -4,7 +4,7 @@ return [ 'supportEmail' => 'rocho02@gmail.com', 'infoEmail' => 'info@rocho-net.hu', 'user.passwordResetTokenExpire' => 3600, - 'version' => 'v0.0.33', + 'version' => 'v0.0.34', 'company' => 'movar',//gyor 'company_name' => "Freimann Kft.", 'product_visiblity' => 'account',// on reception which products to display. account or global diff --git a/console/migrations/m160215_063205_create__table__terminal__and__terminal_tipus.php b/console/migrations/m160215_063205_create__table__terminal__and__terminal_tipus.php new file mode 100644 index 0000000..96cdda9 --- /dev/null +++ b/console/migrations/m160215_063205_create__table__terminal__and__terminal_tipus.php @@ -0,0 +1,70 @@ +execute($sql); + + + $sql = "DELETE FROM `terminal`;"; + $this->execute($sql); + + $sql = "INSERT INTO `terminal` (`TerminalNumber`, `TerminalID`, `Type`, `WorkTime`, `Name`, `IP`, `LastConnection`, `LastEvent`, `LastEventTime`, `StatusTOCounter`, `DirectionInName`, `DirectionInZone`, `DirectionInColor`, `DirectionOutName`, `DirectionOutZone`, `DirectionOutColor`) VALUES + (1, '01', 'Forgóvilla', b'0', 'Bejárat', '', '', '', NULL, 0, 'Fitness', '1', 'vbGreen', 'Kint', '0', 'vbPink');"; + $this->execute($sql); + + + $sql = "CREATE TABLE IF NOT EXISTS `term_tipus` ( + `tipus` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; + $this->execute($sql); + + $sql = "DELETE FROM `term_tipus`;"; + $this->execute($sql); + + $sql = "INSERT INTO `term_tipus` (`tipus`) VALUES ('Forgóvilla');"; + $this->execute($sql); + + } + + public function down() + { + echo "m160215_063205_create__table__terminal__and__terminal_tipus cannot be reverted.\n"; + + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +}