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.
 
 
 

33 lines
938 B

<?php
use yii\db\Migration;
/**
* Class m191112_005545_create_table_collection
*/
class m191112_005545_create_table_collection extends Migration
{
/**
* {@inheritdoc}
*/
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="收藏表"';
$this->createTable('ats_collection', [
'id' => $this->primaryKey(),
'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
],$tableOptions);
}
/**
* {@inheritdoc}
*/
public function down()
{
$this->dropTable('ats_collection');
return true;
}
}