123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- use yii\db\Migration;
- /**
- * Class m240926_211958_Ajuste_campos_partida_unidad_de_medida
- */
- class m240926_211958_Ajuste_campos_partida_unidad_de_medida extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->alterColumn('UnidadMedida', 'nombre', $this->string(100)->null());
- $this->alterColumn('UnidadMedida', 'descripcion', $this->string(100)->null());
- $this->alterColumn('Partida', 'nombre', $this->string(100)->null());
- $this->alterColumn('Partida', 'descripcion', $this->string(100)->null());
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->alterColumn('UnidadMedida', 'nombre', $this->string(100)->notNull());
- $this->alterColumn('UnidadMedida', 'descripcion', $this->string(100)->notNull());
- $this->alterColumn('Partida', 'nombre', $this->string(100)->notNull());
- $this->alterColumn('Partida', 'descripcion', $this->string(100)->notNull());
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "m240926_211958_Ajuste_campos_partida_unidad_de_medida cannot be reverted.\n";
- return false;
- }
- */
- }
|