| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240607074153CreateMPWxPlugins
- */
- class M240607074153CreateMPWxPlugins extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_mpwx_plugins` (
- `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
- `addons_name` varchar(100) NOT NULL DEFAULT '' COMMENT '插件标识',
- `name` varchar(100) NOT NULL DEFAULT '' COMMENT '插件名称',
- `plugins` varchar(255) NOT NULL DEFAULT '' COMMENT '插件安装配置',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态【1启用 0禁用 -1删除】',
- `created_at` int(10) unsigned DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(10) unsigned DEFAULT '0' COMMENT '修改时间',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信小程序插件表';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240607074153CreateMPWxPlugins cannot be reverted.\n";
- return false;
- }
- */
- }
|