add doorlog version , improve DoorMoveForm.php required fields

This commit is contained in:
Schneider Roland
2022-09-18 12:48:16 +02:00
parent 8ab87f1f22
commit 7252f835a0
4 changed files with 46 additions and 2 deletions

View File

@@ -0,0 +1,42 @@
<?php
use yii\db\Migration;
/**
* Class m220803_190701_alter_table_door_log_add_version
*/
class m220803_190701_alter_table_door_log_add_version extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addColumn('door_log', 'version', $this->integer( )->notNull()->defaultValue(1) );
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m220803_190701_alter_table_door_log_add_version cannot be reverted.\n";
return false;
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m220803_190701_alter_table_door_log_add_version cannot be reverted.\n";
return false;
}
*/
}