mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add migration column is pedido espera
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
<?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']);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user