From 7b7dda7827861f069807a97e06812713acc2e66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 13 Oct 2022 14:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/migrations/20221013033419_system_config.php | 6 +++--- database/migrations/20221013045829_wechat_auto.php | 5 ++--- database/migrations/20221013045830_wechat_fans.php | 5 ++--- database/migrations/20221013045831_wechat_fans_tags.php | 5 ++--- database/migrations/20221013045832_wechat_keys.php | 5 ++--- database/migrations/20221013045833_wechat_media.php | 5 ++--- database/migrations/20221013045834_wechat_news.php | 5 ++--- database/migrations/20221013045835_wechat_news_article.php | 5 ++--- 8 files changed, 17 insertions(+), 24 deletions(-) diff --git a/database/migrations/20221013033419_system_config.php b/database/migrations/20221013033419_system_config.php index a3e80291e..f025dfe6e 100644 --- a/database/migrations/20221013033419_system_config.php +++ b/database/migrations/20221013033419_system_config.php @@ -12,10 +12,10 @@ class SystemConfig extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '系统-配置', - ]); - $table->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '配置分类']) + ]) + ->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '配置分类']) ->addColumn('name', 'string', ['limit' => 100, 'default' => '', 'comment' => '配置名称']) ->addColumn('value', 'string', ['limit' => 2048, 'default' => '', 'comment' => '配置内容']) ->addIndex('type', ['name' => 'idx_system_config_type']) diff --git a/database/migrations/20221013045829_wechat_auto.php b/database/migrations/20221013045829_wechat_auto.php index b85e4d051..b079d1f22 100644 --- a/database/migrations/20221013045829_wechat_auto.php +++ b/database/migrations/20221013045829_wechat_auto.php @@ -12,10 +12,9 @@ class WechatAuto extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-回复', - ]); - $table + ]) ->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '类型(text,image,news)']) ->addColumn('time', 'string', ['limit' => 50, 'default' => '', 'comment' => '延迟时间']) ->addColumn('code', 'string', ['limit' => 20, 'default' => '', 'comment' => '消息编号']) diff --git a/database/migrations/20221013045830_wechat_fans.php b/database/migrations/20221013045830_wechat_fans.php index ad2cc736c..6122853d0 100644 --- a/database/migrations/20221013045830_wechat_fans.php +++ b/database/migrations/20221013045830_wechat_fans.php @@ -12,10 +12,9 @@ class WechatFans extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-粉丝', - ]); - $table + ]) ->addColumn('appid', 'string', ['limit' => 50, 'default' => '', 'comment' => '公众号编号']) ->addColumn('unionid', 'string', ['limit' => 100, 'default' => '', 'comment' => 'UNIONID']) ->addColumn('openid', 'string', ['limit' => 100, 'default' => '', 'comment' => 'OPENID']) diff --git a/database/migrations/20221013045831_wechat_fans_tags.php b/database/migrations/20221013045831_wechat_fans_tags.php index 84923b4f0..623614dae 100644 --- a/database/migrations/20221013045831_wechat_fans_tags.php +++ b/database/migrations/20221013045831_wechat_fans_tags.php @@ -12,10 +12,9 @@ class WechatFansTags extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-标签', - ]); - $table + ]) ->addColumn('appid', 'string', ['limit' => 50, 'default' => '', 'comment' => '公众号编号']) ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '标签名称']) ->addColumn('openid', 'string', ['limit' => 100, 'default' => '', 'comment' => 'OPENID']) diff --git a/database/migrations/20221013045832_wechat_keys.php b/database/migrations/20221013045832_wechat_keys.php index 564d6aa96..242831835 100644 --- a/database/migrations/20221013045832_wechat_keys.php +++ b/database/migrations/20221013045832_wechat_keys.php @@ -12,10 +12,9 @@ class WechatKeys extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-规则', - ]); - $table + ]) ->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '类型(text,image,news)']) ->addColumn('keys', 'string', ['limit' => 100, 'default' => '', 'comment' => '关键字']) ->addColumn('appid', 'string', ['limit' => 50, 'default' => '', 'comment' => '公众号编号']) diff --git a/database/migrations/20221013045833_wechat_media.php b/database/migrations/20221013045833_wechat_media.php index c42c40d7d..b0f93d745 100644 --- a/database/migrations/20221013045833_wechat_media.php +++ b/database/migrations/20221013045833_wechat_media.php @@ -12,10 +12,9 @@ class WechatMedia extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-素材', - ]); - $table + ]) ->addColumn('md5', 'string', ['limit' => 32, 'default' => '', 'comment' => '文件哈希']) ->addColumn('type', 'string', ['limit' => 20, 'default' => '', 'comment' => '媒体类型']) ->addColumn('appid', 'string', ['limit' => 50, 'default' => '', 'comment' => '公众号编号']) diff --git a/database/migrations/20221013045834_wechat_news.php b/database/migrations/20221013045834_wechat_news.php index 9181782b3..6af99dab8 100644 --- a/database/migrations/20221013045834_wechat_news.php +++ b/database/migrations/20221013045834_wechat_news.php @@ -12,10 +12,9 @@ class WechatNews extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-图文', - ]); - $table + ]) ->addColumn('media_id', 'string', ['limit' => 100, 'default' => '', 'comment' => '永久素材编号']) ->addColumn('local_url', 'string', ['limit' => 500, 'default' => '', 'comment' => '本地文件链接']) ->addColumn('article_id', 'string', ['limit' => 100, 'default' => '', 'comment' => '关联文章编号(用英文逗号做分割)']) diff --git a/database/migrations/20221013045835_wechat_news_article.php b/database/migrations/20221013045835_wechat_news_article.php index d269ac742..feef67984 100644 --- a/database/migrations/20221013045835_wechat_news_article.php +++ b/database/migrations/20221013045835_wechat_news_article.php @@ -12,10 +12,9 @@ class WechatNewsArticle extends Migrator public function change() { // 创建数据表 - $table = $this->table($this->name, [ + $this->table($this->name, [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '微信-文章', - ]); - $table + ]) ->addColumn('title', 'string', ['limit' => 100, 'default' => '', 'comment' => '素材标题']) ->addColumn('local_url', 'string', ['limit' => 500, 'default' => '', 'comment' => '素材链接']) ->addColumn('show_cover_pic', 'integer', ['limit' => 1, 'default' => 0, 'comment' => '显示封面(0隐藏,1显示)'])