Browse Source

feat:修改评论表中的星级字段

antshop
linyaostalker 5 years ago
parent
commit
c9f820f9cc
  1. 20
      backend/modules/shop/migrations/m191217_021455_update_column_star_in_table_ats_comment.php

20
backend/modules/shop/migrations/m191217_021455_update_column_star_in_table_ats_comment.php

@ -0,0 +1,20 @@
<?php
use yii\db\Migration;
/**
* Class m191217_021455_update_column_star_in_table_ats_comment
*/
class m191217_021455_update_column_star_in_table_ats_comment extends Migration
{
public function up()
{
$this->dropColumn('ats_comment', 'star');
$this->addColumn('ats_comment', 'star', $this->integer(11)->notNull()->defaultValue("0")->comment('星级'));
}
public function down()
{
return true;
}
}
Loading…
Cancel
Save