From 07e70a39a357e303f6c972a8b430417e7ea811de Mon Sep 17 00:00:00 2001 From: Terry <2358269014@qq.com> Date: Wed, 4 Sep 2019 21:45:27 +0800 Subject: [PATCH] migrate sql update --- .../mysqldb/m190904_025251_fecshop_tables.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/migrations/mysqldb/m190904_025251_fecshop_tables.php b/migrations/mysqldb/m190904_025251_fecshop_tables.php index 144d81bf..2fd873b0 100644 --- a/migrations/mysqldb/m190904_025251_fecshop_tables.php +++ b/migrations/mysqldb/m190904_025251_fecshop_tables.php @@ -7,18 +7,11 @@ use yii\db\Migration; */ class m190904_025251_fecshop_tables extends Migration { + /** * {@inheritdoc} */ public function safeUp() - { - - } - - /** - * {@inheritdoc} - */ - public function safeDown() { $sql = " CREATE TABLE IF NOT EXISTS `extensions` ( @@ -142,6 +135,16 @@ class m190904_025251_fecshop_tables extends Migration $this->execute("INSERT INTO `admin_role_url_key` (`role_id`, `url_key_id`, `created_at`, `updated_at`) VALUES (4, " . $lastInsertId . ", 1567162984, 1567162984)"); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + echo "m190904_025251_fecshop_tables cannot be reverted.\n"; + + return false; } -- GitLab