| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace addons\Printer\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240726033257UpdateQimallPrintLogTable
- */
- class M240726033257UpdateQimallPrintLogTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_printer_log`
- MODIFY COLUMN `status` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '打印状态,0: 失败,1: 成功';
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- echo "Error modifying column in table qimall_addons_printer_log: " . $e->getMessage() . "\n";
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240726033257UpdateQimallPrintLogTable cannot be reverted.\n";
- return false;
- }
- }
|