fix: video model category

This commit is contained in:
Default
2025-05-05 16:25:13 +08:00
parent 017572b170
commit cac9177838
15 changed files with 297 additions and 156 deletions

View File

@@ -1,20 +0,0 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class AddGgPaiXuColumOnGuangGaoTable extends Migrator
{
public function up()
{
// $Table = $this->table('guang_gao');
// $Table->addColumn('gg_sort', 'integer', ['after' => 'gg_tiao_zhuan_di_zhi'])->setComment("排序")->save();
}
public function down()
{
// $Table = $this->table('guang_gao');
// $Table->removeColumn('gg_sort')->save();
}
}

View File

@@ -0,0 +1,26 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class CredateCustomCrawlerTable extends Migrator
{
public function up()
{
$Table = $this->table('custom_crawler', ['id' => false]);
$Table
->addColumn(Column::integer('cc_id')->setUnsigned()->setIdentity(true)->setComment('自增主键'))
->addColumn(Column::string('cc_code', 50)->setNullable(false)->setComment('映射代码编码'))
->addColumn(Column::text('cc_data')->setNullable(true)->setComment('数据内容'))
->addColumn(Column::integer('cc_limit')->setDefault(0)->setComment('采集间隔(秒)'))
->addColumn(Column::timestamp('cc_last_exec')->setNullable(true)->setComment('最后执行时间'))
->addIndex(['cc_id'], ['type' => 'primary'])
->setComment('自定义爬虫表')
->create();
}
public function down()
{
$this->table('custom_crawler')->drop()->save();
}
}