荣誉册数据表

This commit is contained in:
巴掌 committed 2018-12-18 16:29:38 +08:00
1 parent 29076fdfa9
commit fc780a33cc
4 files changed
+101 -4

No files matched your search

@@ -41,6 +41,6 @@ class SystemBase extends Migrator
->addColumn('thinks','string',['limit'=>80,'null'=>false,'comment'=>'网站感谢'])
->addColumn('danwei','string',['limit'=>20,'null'=>false,'comment'=>'使用单位'])
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
->create();
->update();
}
}
@@ -0,0 +1,47 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class Rongyuce 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('rongyuce');
// 添加当前表字段
$table
->addColumn('title','string',['limit'=>30,'null'=>false,'comment'=>'荣誉册名称'])
->addColumn('fazhengdw','integer',['limit'=>11,'null'=>false,'comment'=>'发证单位'])
->addColumn('fazhengsj','integer',['limit'=>11,'null'=>false,'comment'=>'发证时间'])
->addColumn('leixing','integer',['limit'=>15,'null'=>false,'comment'=>'类型'])
->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间'])
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'更新时间'])
->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常'])
->create();
}
}
@@ -0,0 +1,49 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class RongyuInfo 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('rongyu_info');
// 添加当前表字段
$table
->addColumn('title','string',['limit'=>30,'null'=>false,'comment'=>'获奖内容标题'])
->addColumn('rongyuce','integer',['limit'=>11,'null'=>false,'comment'=>'荣誉册'])
->addColumn('bianhao','string',['limit'=>15,'null'=>true,'comment'=>'证书编号'])
->addColumn('danwei','integer',['limit'=>11,'null'=>false,'comment'=>'证书所属单位'])
->addColumn('xueke','integer',['limit'=>11,'null'=>false,'comment'=>'所属学科'])
->addColumn('category','integer',['limit'=>11,'null'=>false,'comment'=>'荣誉类型'])
->addColumn('pic','string',['limit'=>40,'null'=>false,'comment'=>'证书图片'])
->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间'])
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'更新时间'])
->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常'])
->create();
}
}
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more