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.
|
|
<?php
use yii\db\Migration;
/** * Class m191119_025607_create_table_supplier */ class m191119_025607_create_table_supplier extends Migration { /** * {@inheritdoc} */ public function up() { $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="供应商表"'; $this->createTable('atg_supplier', [ 'id' => $this->primaryKey(), 'name'=>$this->string(50)->notNull()->comment('供应商名称'), 'full_name'=>$this->string(50)->notNull()->comment('供应商全称'), 'phone'=>$this->string(20)->notNull()->comment('手机号码'), 'address'=>$this->string(50)->notNull()->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('atg_supplier'); return true; } }
|