Merge branch 'refactor/messages-view' into feat/ordenes-trabajo

This commit is contained in:
amazuecos
2024-11-30 17:10:26 +01:00
156 changed files with 6538 additions and 2643 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CheckWebClientesPapeles extends Migration
{
public function up()
{
$fields = [
'show_in_client' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_impresion', $fields);
}
public function down()
{
$this->forge->dropColumn('lg_papel_impresion', 'show_in_client');
}
}

View File

@ -0,0 +1,37 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class ModifyNullableComercialSoporte extends Migration
{
public function up()
{
$this->forge->modifyColumn('clientes', [
'comercial_id' => [
'type' => 'int(10) unsigned',
'null' => true, // Permitir valores NULL
],
'soporte_id' => [
'type' => 'int(10) unsigned',
'null' => true, // Permitir valores NULL
],
]);
}
public function down()
{
$this->forge->modifyColumn('clientes', [
'comercial_id' => [
'type' => 'int(10) unsigned',
'null' => false,
],
'soporte_id' => [
'type' => 'int(10) unsigned',
'null' => false,
],
]);
}
}

View File

@ -0,0 +1,40 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class TicksPapeles extends Migration
{
public function up()
{
$fields = [
'show_in_client_special' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_generico', $fields);
$fields = [
'show_in_client_special' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_impresion', $fields);
}
public function down()
{
$this->forge->dropColumn('lg_papel_generico', 'show_in_client_special');
$this->forge->dropColumn('lg_papel_impresion', 'show_in_client_special');
}
}

View File

@ -0,0 +1,46 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CambiarTicksPapelImpresion extends Migration
{
public function up()
{
$fields = [
'use_in_client' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_impresion', $fields);
$this->forge->dropColumn('lg_papel_impresion', 'show_in_client');
$this->forge->dropColumn('lg_papel_impresion', 'show_in_client_special');
}
public function down()
{
$fields = [
'show_in_client_special' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
'show_in_client' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_impresion', $fields);
$this->forge->dropColumn('lg_papel_impresion', 'use_in_client');
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddTickInteriorPapelImpresion extends Migration
{
public function up()
{
$fields = [
'interior' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_impresion', $fields);
}
public function down()
{
$this->forge->dropColumn('lg_papel_impresion', 'interior');
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddTickTapaDuraPapelImp extends Migration
{
public function up()
{
$fields = [
'use_for_tapa_dura' => [
'type' => 'TINYINT',
'constraint' => 1,
'null' => false,
'default' => 0,
],
];
$this->forge->addColumn('lg_papel_impresion', $fields);
}
public function down()
{
$this->forge->dropColumn('lg_papel_impresion', 'use_for_tapa_dura');
}
}