Files
safekat/ci4/app/Database/Migrations/2025-04-11-180001_AddUserIdFechaEntregaPedido.php
2025-04-21 12:55:45 +02:00

62 lines
1.5 KiB
PHP
Executable File

<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class AddUserIDFechasEntregaPedido extends Migration
{
protected array $USER_COLUMNS = [
"inaplazable" => [
"type" => "INT",
"unsigned" => true,
"constraint" => 1,
"null" => true,
],
'fecha_entrega_real_change_user_id' => [
'type' => 'INT',
"constraint" => 10,
"unsigned" => true,
"null" => true,
],
"fecha_impresion_change_user_id" => [
"type" => "INT",
"constraint" => 10,
"unsigned" => true,
"null" => true,
],
"fecha_encuadernado_change_user_id" => [
"type" => "INT",
"unsigned" => true,
"constraint" => 10,
"null" => true,
],
"fecha_entrega_externo_change_user_id" => [
"type" => "INT",
"unsigned" => true,
"constraint" => 10,
"null" => true,
],
"inaplazable_change_user_id" => [
"type" => "INT",
"unsigned" => true,
"constraint" => 10,
"null" => true,
],
];
public function up()
{
$this->forge->addColumn("pedidos", $this->USER_COLUMNS);
}
public function down()
{
$this->forge->dropColumn("pedidos", array_keys($this->USER_COLUMNS));
}
}