fix: video model category
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user