init: 项目初始代码

This commit is contained in:
2026-10-14 14:00:29 +08:00
commit cc434cf89f
464 changed files with 66984 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
use Phinx\Db\Adapter\MysqlAdapter;
use think\migration\Migrator;
use think\migration\db\Column;
class ArticleAddFieldCreate 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('article');
$table
->addColumn('article_type_id','integer',['limit'=>10,'signed'=>false,'after'=>'site_id','default'=>0,'null'=>false,'comment'=>'文章分类ID'])
->addColumn('status','integer',['limit'=>MysqlAdapter::INT_TINY,'default'=>1,'after'=>'sort','null'=>false,'comment'=>'状态,0=启动,1=禁用'])
->changeColumn('detail','text',['comment'=>'文件详情'])
->update();
}
}