banki.test/migrations/m240819_084542_parameters.php

46 lines
815 B
PHP
Raw Normal View History

<?php
use yii\db\cubrid\Schema;
use yii\db\Migration;
/**
* Class m240819_084542_parameters
*/
class m240819_084542_parameters extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('parameters', [
'id' => Schema::TYPE_PK,
'title' => Schema::TYPE_STRING . ' NOT NULL',
'type' => 'TINYINT NOT NULL CHECK (type IN (1, 2))',
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('parameters');
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m240819_084542_parameters cannot be reverted.\n";
return false;
}
*/
}