first commit
This commit is contained in:
29
console/migrations/m231023_142702_create_banner_table.php
Executable file
29
console/migrations/m231023_142702_create_banner_table.php
Executable file
@ -0,0 +1,29 @@
|
||||
<?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}}');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user