Blame view

console/migrations/m160405_101056_create_slider_images.php 1002 Bytes
8774e5a3   Administrator   31.03.16 finish 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <?php
  
  use yii\db\Migration;
  
  /**
   * Handles the creation for table `slider_images`.
   */
  class m160405_101056_create_slider_images extends Migration
  {
      /**
       * @inheritdoc
       */
      public function up()
      {
          $this->createTable('slider_image', [
              'slider_image_id' => $this->primaryKey(),
              'slider_id' => $this->integer(),
              'image' => $this->string(255),
              'alt' => $this->string(255),
              'title' => $this->string(255),
              'url' => $this->string(255),
              'status' => $this->smallInteger(1),
              'sort' => $this->integer(6),
7669648a   Administrator   06.04.16 finish ...
24
              'price' => $this->float(),
8774e5a3   Administrator   31.03.16 finish 1
25
26
27
28
29
30
31
32
33
34
35
36
37
          ]);
          $this->addForeignKey('slider_slider_image_fk', 'slider_image', 'slider_id', 'slider', 'slider_id', 'CASCADE', 'CASCADE');
      }
  
      /**
       * @inheritdoc
       */
      public function down()
      {
          $this->dropForeignKey('slider_slider_image_fk', '{{%slider_image}}');
          $this->dropTable('slider_image');
      }
  }