la_back/console/migrations/m231023_142702_create_banner_table.php

30 lines
528 B
PHP
Raw Permalink Normal View History

2023-11-21 19:51:44 +03:00
<?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%banner}}`.
*/
class m231023_142702_create_banner_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%banner}}', [
'id' => $this->primaryKey(),
'photo' => $this->string(),
'rating' => $this->integer(),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%banner}}');
}
}