mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
35 lines
870 B
PHP
Executable File
35 lines
870 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Database\Migrations;
|
|
|
|
use CodeIgniter\Database\Migration;
|
|
|
|
class AddColumnIsPedidoEsperaOrdenTrabajoTable extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$field = [
|
|
'is_pedido_espera' => [
|
|
'type' => 'BOOLEAN',
|
|
'default' => false,
|
|
'comment' => 'Marca que el pedido está en espera.'
|
|
],
|
|
'pedido_espera_by' => [
|
|
'type' => 'int',
|
|
'unsigned' => true,
|
|
'constraint' => 11,
|
|
'null' => true,
|
|
'comment' => 'Foreign a usuario que ha marcado is_pedido_espera'
|
|
|
|
]
|
|
];
|
|
$this->forge->addColumn('ordenes_trabajo',$field);
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->forge->dropColumn('ordenes_trabajo',['is_pedido_espera','pedido_espera_by']);
|
|
|
|
}
|
|
}
|