项目完成服务器信息和配置文件;

This commit is contained in:
augushong
2019-08-22 13:17:44 +08:00
parent eb3b3908c2
commit 8b7b9d5805
186 changed files with 16555 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class CreateTableUploadFiles 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('upload_files',['comment'=>'上传的文件']);
$table->addColumn('save_name','string',['limit'=>100,'comment'=>'文件存储地址']);
$table->addColumn('file_name','string',['limit'=>100,'comment'=>'文件原始名称']);
$table->addColumn('mime_type','string',['limit'=>30,'comment'=>'mime type 类型']);
$table->addColumn('file_size','integer',['limit'=>30,'comment'=>'文件大小']);
$table->addColumn('ext_name','string',['limit'=>10,'comment'=>'扩展名']);
$table->addColumn('file_md5','string',['limit'=>32,'comment'=>'文件md5值']);
$table->addColumn('file_sha1','string',['limit'=>40,'comment'=>'文件sha1值']);
$table->addColumn('create_time','integer',['limit'=>10,'comment'=>'上传时间']);
$table->addColumn('used_time','integer',['limit'=>10,'comment'=>'标记使用时间,如果为空,可能仅作为了预览图']);
$table->addColumn('delete_time','integer',['limit'=>10,'comment'=>'删除时间']);
$table->addColumn('clear_time','integer',['limit'=>10,'comment'=>'清空时间']);
$table->addColumn('type','integer',['limit'=>2,'default'=>1,'comment'=>'文件类型1系统logo;2:微信公众号授权二维码;3微信公众号授权头像;4:应用文章图片;5:应用封面']);
$table->addIndex('save_name');
$table->addIndex('create_time');
$table->addIndex('used_time');
$table->addIndex('delete_time');
$table->addIndex('clear_time');
$table->addIndex('type');
$table->create();
}
}