单位荣誉
This commit is contained in:
1 parent
44833b07a8
commit
c30a3a640c
7 files changed
+152
-15
No files matched your search
@@ -34,10 +34,11 @@ class DwRongyu extends Migrator
|
||||
// 添加当前表字段
|
||||
$table
|
||||
->addColumn('title','string',['limit'=>30,'null'=>false,'comment'=>'单位荣誉名称'])
|
||||
->addColumn('hjzhengdw','integer',['limit'=>11,'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('hjschool','integer',['limit'=>11,'null'=>false,'comment'=>'获奖单位'])
|
||||
->addColumn('fzschool','integer',['limit'=>11,'null'=>false,'comment'=>'发证单位'])
|
||||
->addColumn('fzshijian','integer',['limit'=>11,'null'=>false,'comment'=>'发证时间'])
|
||||
->addColumn('category','string',['limit'=>100,'null'=>false,'comment'=>'荣誉图片'])
|
||||
->addColumn('pic','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'=>'更新时间'])
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class DwRongyuCanyu 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('dw_rongyu_canyu');
|
||||
|
||||
// 添加当前表字段
|
||||
$table
|
||||
->addColumn('rongyuid','string',['limit'=>30,'null'=>false,'comment'=>'单位荣誉名称'])
|
||||
->addColumn('teacherid','integer',['limit'=>11,'null'=>false,'comment'=>'获奖单位'])
|
||||
->create();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user