| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- class M250825182939InsertGlobalVarMap extends Migration
- {
- /**
- * 在qimall_global_var_map这个枚举表中,增加一条记录
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- INSERT INTO `qimall_global_var_map` (`name`, `title`, `type`, `is_addons`, `status`, `created_at`, `updated_at`) VALUES ('withdrawal_follow_decr', '提现', 'CapitalTypeMap', 0, 1, 1756172727, 1756172727);
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- // 处理异常
- var_dump($e->getMessage());
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250825182939InsertGlobalVarMap cannot be reverted.\n";
- return false;
- }
- }
|