From 13443886c1961c82ecc85767bed67a4cf5ffba03 Mon Sep 17 00:00:00 2001 From: Roland Schneider Date: Fri, 25 Mar 2016 07:27:12 +0100 Subject: [PATCH] add devlog table --- console/migrations/m160324_203543_devlog.php | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 console/migrations/m160324_203543_devlog.php diff --git a/console/migrations/m160324_203543_devlog.php b/console/migrations/m160324_203543_devlog.php new file mode 100644 index 0000000..7157639 --- /dev/null +++ b/console/migrations/m160324_203543_devlog.php @@ -0,0 +1,39 @@ +db->driverName === 'mysql') { + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; + } + + $this->createTable( '{{%devlog}}', [ + 'id_devlog' => $this->primaryKey(), + 'msg' => $this->string(), + ], $tableOptions ); + } + + public function down() + { + echo "m160324_203543_devlog cannot be reverted.\n"; + + return false; + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +}