mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
change migration
This commit is contained in:
@ -5,7 +5,7 @@ namespace App\Database\Migrations;
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class TareasServicioTable extends Migration
|
||||
class ServicioClienteTareas extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
"id" => [
|
||||
@ -13,13 +13,21 @@ class TareasServicioTable extends Migration
|
||||
"unsigned" => true,
|
||||
"autoincrement" => true
|
||||
],
|
||||
"servicio_cliente_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"comment" => "Servicio cliente asociado"
|
||||
],
|
||||
"tarifa_acabado_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"comment" => "Tarifa de acabado asociada a servicio"
|
||||
],
|
||||
"tarifa_manipulado_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"comment" => "Tarifa de manipulado asociada a servicio"
|
||||
|
||||
]
|
||||
];
|
||||
public function up()
|
||||
@ -43,11 +51,14 @@ class TareasServicioTable extends Migration
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->createTable("tareas_servicio", true);
|
||||
$this->forge->addForeignKey('tarifa_acabado_id','lg_tarifa_acabado','id');
|
||||
$this->forge->addForeignKey('tarifa_manipulado_id','lg_tarifa_manipulado','id');
|
||||
|
||||
$this->forge->createTable("servicio_cliente_tareas", true);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("tareas_servicio");
|
||||
$this->forge->dropTable("servicio_cliente_tareas");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user