Files
safekat/ci4/app/Database/Migrations/2025-04-22-100000_AddTableOrdenTrabajoTareaProgressDates.php
2025-04-22 10:07:03 +02:00

49 lines
1.1 KiB
PHP

<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddTableOrdenTrabajoTareaProgressDates extends Migration
{
protected array $COLUMNS = [
"id" => [
"type" => "INT",
"unsigned" => true,
"auto_increment" => true,
],
"init_at" => [
"type" => "INT",
"unsigned" => "INT",
"comment" => "Timestamp task init"
],
"end_at" => [
"type" => "INT",
"unsigned" => "INT",
"comment" => "Timestamp task finish"
],
"init_user_id" => [
"type" => "INT",
"unsigned" => true,
"constraint" => 11
],
"end_user_id" => [
"type" => "INT",
"unsigned" => true,
"constraint" => 11
],
];
public function up()
{
$this->forge->addField($this->COLUMNS);
$this->forge->addPrimaryKey('id');
}
public function down()
{
$this->forge->dropColumn("orden_trabajo_tareas",array_keys($this->COLUMNS));
}
}