12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- use yii\db\Migration;
- /**
- * Class m241017_192914_Agregar_Fechas_en_Nomina
- */
- class m241017_192914_Agregar_Fechas_en_Nomina extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->addColumn('Nomina', 'fechaInicio', $this->timestamp()->append(" with time zone"),);
- $this->addColumn('Nomina', 'fechaFin', $this->timestamp()->append(" with time zone"),);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- $this->dropColumn('Nomina', 'fechaInicio');
- $this->dropColumn('Nomina', 'fechaFin');
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "m241017_192914_Agregar_Fechas_en_Nomina cannot be reverted.\n";
- return false;
- }
- */
- }
|