123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- use think\migration\Migrator;
- use think\migration\db\Column;
- class CreateVrView 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('vr_view', ['comment' => 'vr作品场景'])
- ->addColumn('view_title', 'string', ['comment' => '标题', 'null' => true])
- ->addColumn('createtime', 'integer', ['comment' => '创建时间'])
- ->addColumn('updatetime', 'integer', ['comment' => '更新时间'])
- ->addColumn('pic_path', 'string', ['comment' => 'vr图片路径'])
- ->addColumn('emp_id', 'integer', ['comment' => '创建人', 'null' => true])
- ->addColumn('root_id', 'integer', ['comment' => '店面id','default'=>0])
- ->addColumn('org_path', 'string', ['comment' => '部门路径', 'null' => true])
- ->addColumn('size', 'integer', ['comment' => '封面大小'])
- ->addColumn('sort', 'integer', ['comment' => '排序', 'length'=>2])
- ->addColumn('vr_group_id', 'integer', ['comment' => 'vr图片路径'])
- ->addColumn('point', 'json', ['comment'=>'锚点', 'null' => true])
- ->addColumn('oriented', 'json', ['comment'=>'面向方向', 'null' => true])
- ->addColumn('vr_path', 'string', ['comment' => 'vr路径', 'null' => true,'default'=>''])
- ->addColumn('logo_path', 'string', ['comment' => '遮罩', 'null' => true,'default'=>''])
- ->addColumn('mask', 'string', ['comment' => '遮罩', 'null' => true,'default'=>''])
- ->addColumn('hlookat', 'string', ['comment' => '', 'null' => true,'default'=>''])
- ->addColumn('vlookat', 'string', ['comment' => '', 'null' => true,'default'=>''])
- ->addColumn('hotspot', 'string', ['comment' => '', 'null' => true,'default'=>''])
- ->addColumn('structure', 'string', ['comment' => '文件夹结构', 'null' => true,'default'=>''])
- ->addColumn('cut_img_time', 'integer', ['comment' => '切图开始时间', 'length'=>2,'default'=>0])
- ->addColumn('cut_img_status', 'integer', ['comment' => '切图状态0未开始1切图中2切图完成', 'length'=>2,'default'=>0])
- ->addColumn('cut_img_ing', 'integer', ['comment' => '切图等待中0未开始等待大于0开始等待', 'length'=>2,'default'=>0])
- ->addColumn('cut_img_size', 'integer', ['comment' => '切图成功后,8张切片的总大小', 'length'=>2,'default'=>0])
- ->create();
- }
- }
|