m241111_213919_Quitar_notnull_empleado_descripcion.php 780 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use yii\db\Migration;
  3. /**
  4. * Class m241111_213919_Quitar_notnull_empleado_descripcion
  5. */
  6. class m241111_213919_Quitar_notnull_empleado_descripcion extends Migration
  7. {
  8. /**
  9. * {@inheritdoc}
  10. */
  11. public function safeUp()
  12. {
  13. $this->alterColumn('Empleado', 'descripcion', $this->string(400)->null());
  14. }
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public function safeDown()
  19. {
  20. $this->alterColumn('Empleado', 'descripcion', $this->string(400)->notNull());
  21. }
  22. /*
  23. // Use up()/down() to run migration code without a transaction.
  24. public function up()
  25. {
  26. }
  27. public function down()
  28. {
  29. echo "m241111_213919_Quitar_notnull_empleado_descripcion cannot be reverted.\n";
  30. return false;
  31. }
  32. */
  33. }