<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AlterFkOrdenTrabajoTareaProgressDates extends Migration
{


    public function up()
    {
        $this->forge->dropForeignKey('orden_trabajo_tarea_progress_dates','orden_trabajo_tarea_progress_dates_ot_tarea_id_foreign');
        $this->forge->addForeignKey("ot_tarea_id","orden_trabajo_tareas","id",'CASCADE','CASCADE');
        $this->forge->processIndexes('orden_trabajo_tarea_progress_dates');
    }

    public function down()
    {
        $this->forge->dropForeignKey('orden_trabajo_tarea_progress_dates','orden_trabajo_tarea_progress_dates_ot_tarea_id_foreign');
        $this->forge->addForeignKey("ot_tarea_id","orden_trabajo_tareas","id");
        $this->forge->processIndexes('orden_trabajo_tarea_progress_dates');
    }
}
