mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
servicio cliente tareas
This commit is contained in:
@ -11,7 +11,7 @@ class ServicioClienteTareas extends Migration
|
||||
"id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"autoincrement" => true
|
||||
"auto_increment" => true
|
||||
],
|
||||
"servicio_cliente_id" => [
|
||||
"type" => "INT",
|
||||
@ -21,12 +21,14 @@ class ServicioClienteTareas extends Migration
|
||||
"tarifa_acabado_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"null" => true,
|
||||
"comment" => "Tarifa de acabado asociada a servicio"
|
||||
],
|
||||
"tarifa_manipulado_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"comment" => "Tarifa de manipulado asociada a servicio"
|
||||
"null" => true,
|
||||
"comment" => "Tarifa de manipulado asociada a servicio",
|
||||
|
||||
]
|
||||
];
|
||||
@ -51,6 +53,8 @@ class ServicioClienteTareas extends Migration
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey("id");
|
||||
$this->forge->addForeignKey('servicio_cliente_id','servicios_cliente','id');
|
||||
$this->forge->addForeignKey('tarifa_acabado_id','lg_tarifa_acabado','id');
|
||||
$this->forge->addForeignKey('tarifa_manipulado_id','lg_tarifa_manipulado','id');
|
||||
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AlterColumnServiciosCliente extends Migration
|
||||
{
|
||||
protected array $ALTER_COLUMNS = [
|
||||
"deleted_at" => [
|
||||
"name" => "deleted_at",
|
||||
"type" => "datetime",
|
||||
"default" => null,
|
||||
"null" => true,
|
||||
],
|
||||
"updated_at" => [
|
||||
"name" => "updated_at",
|
||||
"type" => "datetime",
|
||||
"default" => null,
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->modifyColumn("servicios_cliente", $this->ALTER_COLUMNS);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->addField([
|
||||
"is_deleted" => [
|
||||
"type" => "boolean",
|
||||
"default" => false,
|
||||
"null" => false,
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user