You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
<?php
|
|
|
|
use yii\db\Migration;
|
|
|
|
/**
|
|
* Class m191111_100639_create_table_supplier
|
|
*/
|
|
class m191111_100639_create_table_supplier extends Migration
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function up()
|
|
{
|
|
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="供应商表"';
|
|
$this->createTable('ats_supplier', [
|
|
'id' => $this->primaryKey(),
|
|
'name'=>$this->string(50)->defaultValue(null)->comment('供应商名称'),
|
|
'full_name'=>$this->string(50)->defaultValue(null)->comment('供应商全称'),
|
|
'phone'=>$this->string(20)->defaultValue(null)->comment('手机号码'),
|
|
'address'=>$this->string(50)->defaultValue(null)->comment('地址'),
|
|
'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'),
|
|
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
|
|
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
|
|
],$tableOptions);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function down()
|
|
{
|
|
$this->dropTable('ats_supplier');
|
|
return true;
|
|
}
|
|
}
|