12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- use think\migration\Migrator;
- use think\migration\db\Column;
- class AddfIeldRetreveTime 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('crm_import_retrieve_log', ['comment'=>'资源库分配回收记录表'])
- ->addColumn('employee_id', 'integer', ['comment' => '员工id','default'=>0])
- ->addColumn('root_id', 'integer', ['comment' => '企业ID','default'=>0])
- ->addColumn('crm_res_id', 'integer', ['comment' => '资源库ID','default'=>0])
- ->addColumn('type', 'integer', ['comment' => '0分配,1回收','default'=>1])
- ->addColumn('source_type', 'integer', ['comment' => '操作位置 0志远装饰后台,1网销端后台,2小程序,3app','default'=>0])
- ->addColumn('count', 'integer', ['comment' => '分配/回收数量','default'=>0])
- ->addColumn('customer_ids', 'text', ['comment' => '操作客户id'])
- ->addColumn('addtime', 'integer', ['comment' => '操作时间','default'=>0])
- ->addColumn('operator_employee_id', 'integer', ['comment' => '操作人id','default'=>0])
- ->create();
- }
- }
|