Blame view

console/migrations/m160311_151257_user_project_rating.php 451 Bytes
2fd40ee7   Yarik   test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  <?php
  
  use yii\db\Migration;
  
  class m160311_151257_user_project_rating extends Migration
  {
      public function up()
      {
          $this->addColumn('{{%user_info}}', 'rating', $this->float()->defaultValue(0));
          $this->addColumn('{{%project}}', 'rating', $this->float()->defaultValue(0));
      }
  
      public function down()
      {
          $this->dropColumn('{{%user_info}}', 'rating');
          $this->dropColumn('{{%project}}', 'rating');
      }
  
  }