12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- use think\migration\Migrator;
- use think\migration\db\Column;
- class CreateAgentShareLogTable extends Migrator
- {
- /**
- * Change Method.
- *
- * Write your reversible migrations using this method.
- *
- * More information on writing migrations is available here:
- * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
- *
- * The following commands can be used in this method and Phinx will
- * automatically reverse them when rolling back:
- *
- * createTable
- * renameTable
- * addColumn
- * renameColumn
- * addIndex
- * addForeignKey
- *
- * Remember to call "create()" or "update()" and NOT "save()" when working
- * with the Table class.
- */
- public function change()
- {
- $this->table('agent_share_log')
- ->addColumn('root_id', 'integer', ['comment'=>'企业'])
- ->addColumn('employee_id', 'integer', ['comment'=>'员工'])
- ->addColumn('uid', 'integer', ['comment'=>'经纪人'])
- ->addColumn('article_id', 'integer', ['comment'=>'关联内容', 'default'=>0])
- ->addColumn('remarks', 'string', ['comment'=>'备注', 'default'=>''])
- ->addColumn('img', 'text', ['comment'=>'截图', 'null'=> true])
- ->addColumn('score', 'integer', ['comment'=>'获得积分', 'default'=>0])
- ->addColumn('status', 'integer', ['comment'=>'审核1通过2驳回', 'default'=>0])
- ->addColumn('addtime', 'integer', ['comment'=>'添加时间', 'default'=>0])
- ->addColumn('verify_time', 'integer', ['comment'=>'审核时间', 'default'=>0])
- ->addColumn('down_status', 'boolean', ['limit'=>2, 'comment'=>'图片的下载状态', 'default'=>0])
- ->addColumn('file_media_id', 'string', ['limit'=> 1000, 'comment'=> '上传腾讯的图片id数组', 'null'=> true])
- ->create();
- }
- }
|