|
|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
|
+declare(strict_types=1);
|
|
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
-use think\migration\db\Column;
|
|
|
|
|
|
class ExtensionWechatUser extends AbstractMigration
|
|
|
{
|
|
|
@@ -30,13 +30,13 @@ class ExtensionWechatUser extends AbstractMigration
|
|
|
{
|
|
|
$table = $this->table('extension_wechat_user', ['engine' => 'InnoDB', 'comment' => '微信用户表']);
|
|
|
$table
|
|
|
- ->addColumn(Column::integer('user_id')->setSigned(false)->setComment('用户ID'))
|
|
|
- ->addColumn(Column::string('openid')->setComment('微信openid'))
|
|
|
- ->addColumn(Column::string('appid')->setComment('微信appid'))
|
|
|
- ->addColumn(Column::string('nickname')->setComment('昵称'))
|
|
|
- ->addColumn(Column::string('avatar')->setComment('头像'))
|
|
|
+ ->addColumn('user_id', 'integer', ['signed' => false, 'comment' => '用户ID'])
|
|
|
+ ->addColumn('openid', 'string', ['comment' => '微信openid'])
|
|
|
+ ->addColumn('appid', 'string', ['comment' => '微信appid'])
|
|
|
+ ->addColumn('nickname', 'string', ['comment' => '昵称'])
|
|
|
+ ->addColumn('avatar', 'string', ['comment' => '头像'])
|
|
|
->addTimestamps('create_time', 'update_time')
|
|
|
- ->addSoftDelete()
|
|
|
+ ->addColumn('delete_time', 'timestamp', ['null' => true, 'comment' => '删除时间'])
|
|
|
->create();
|
|
|
}
|
|
|
}
|