12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- use think\migration\Migrator;
- use think\migration\db\Column;
- class CreateNewStatisticsTable 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()
- {
- $table = $this->table('data_statistics')->setComment('manage应用首页统计记录表');
- $table->addColumn('root_id', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '店面id'])
- ->addColumn('emp_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '员工数量'])
- ->addColumn('emp_manage_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '员工管理员数量'])
- ->addColumn('org_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '部门数量'])
- ->addColumn('motion_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '运营数量'])
- ->addColumn('manage_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '运营管理员数量'])
- ->addColumn('root_date', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '店面开通日期'])
- ->addColumn('case_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '案例数量'])
- ->addColumn('course_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '课程数量'])
- ->addColumn('building_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '楼盘数量'])
- ->addColumn('talkskill_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '话术数量'])
- ->addColumn('group_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> 'Vr作品数量'])
- ->addColumn('use_count', 'integer', ['limit'=> 11, 'default'=> 0, 'comment'=> '存储空间已经使用量'])
- ->create();
-
- $table = $this->table('permission');
- $table->addColumn('manage_logo', 'string', ['limit' => 255, 'comment'=> 'manage应用logo','default'=>''])
- ->update();
-
- }
- }
|