Blame view

console/migrations/m180828_092957_page_update_updatedAt_createdAt.php 518 Bytes
b2e6e4cc   alex   Добавил возможнос...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  <?php
  
  use yii\db\Migration;
  
  /**
   * Class m180828_092957_page_update_updatedAt_createdAt
   */
  class m180828_092957_page_update_updatedAt_createdAt extends Migration
  {
  
  
      // Use up()/down() to run migration code without a transaction.
      public function up()
      {
  		$this->dropColumn('page','created_at');
  		$this->dropColumn('page','updated_at');
  		$this->addColumn('page','created_at',$this->integer());
  		$this->addColumn('page','updated_at',$this->integer());
      }
  
      public function down()
      {
  
      }
  
  }