db->schema->getTableSchema("qimall_user_withdraw_log",true); if(!$res->getColumn('sign')){ $sql = "ALTER TABLE `qimall_user_withdraw_log` ADD COLUMN `sign` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '提现标识';"; $this->execute($sql); } } /** * {@inheritdoc} */ public function safeDown() { echo "M241224065527AddSignToUserWithdrawLog cannot be reverted.\n"; return false; } /* // Use up()/down() to run migration code without a transaction. public function up() { } public function down() { echo "M241224065527AddSignToUserWithdrawLog cannot be reverted.\n"; return false; } */ }