1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-22 07:56:39 +08:00
course-tencent-cloud/db/migrations/20210610034658.php
koogua 1d2f1dd266 1.更改模块继承基类
2.升级layui到2.6.8
3.升级腾讯云播放器
4.点播增加外链支持
2021-06-12 12:34:40 +08:00

45 lines
1.0 KiB
PHP

<?php
use Phinx\Migration\AbstractMigration;
final class V20210610034658 extends AbstractMigration
{
public function up()
{
$this->modifyChapterVodTable();
$this->handleVodFileRemote();
}
public function down()
{
$this->table('kg_chapter_vod')
->removeColumn('file_remote')
->save();
}
protected function modifyChapterVodTable()
{
$this->table('kg_chapter_vod')
->addColumn('file_remote', 'string', [
'null' => false,
'default' => '',
'limit' => 1500,
'collation' => 'utf8mb4_general_ci',
'encoding' => 'utf8mb4',
'comment' => '远程文件',
'after' => 'file_transcode',
])->save();
}
protected function handleVodFileRemote()
{
$this->getQueryBuilder()
->update('kg_chapter_vod')
->set('file_remote', '[]')
->where(['file_remote' => ''])
->execute();
}
}