mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
49 lines
1.1 KiB
PHP
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));
|
|
|
|
}
|
|
}
|