Blame view

console/migrations/m180621_144704_alter_table_page.php 626 Bytes
8c8f7aeb   Anastasia   - blog view
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
27
28
29
30
31
  <?php
  
  use yii\db\Migration;
  
  /**
   * Class m180621_144704_alter_table_page
   */
  class m180621_144704_alter_table_page extends Migration
  {
      /**
       * {@inheritdoc}
       */
      public function safeUp()
      {
          $this->dropColumn('page', 'created_at');
          $this->dropColumn('page', 'updated_at');
          $this->addColumn('page', 'created_at', $this->integer());
          $this->addColumn('page', 'updated_at', $this->integer());
      }
  
      /**
       * {@inheritdoc}
       */
      public function safeDown()
      {
          echo "m180621_144704_alter_table_page cannot be reverted.\n";
  
          return false;
      }
      
  }