This commit is contained in:
amazuecos
2024-12-15 16:07:54 +01:00
parent 71157bfda5
commit d5719b70a1
31 changed files with 970 additions and 502 deletions

View File

@ -8,6 +8,10 @@ use CodeIgniter\Database\RawSql;
class OrdenTrabajoDatesTable extends Migration
{
protected array $COLUMNS = [
"orden_trabajo_id" => [
"type" => "INT",
"unsigned" => true,
],
"fecha_entrada_at" => [
"type" => "DATETIME",
"null" => true,
@ -33,11 +37,11 @@ class OrdenTrabajoDatesTable extends Migration
"type" => "DATE",
"null" => true,
],
"fecha_encuardernado_at" => [
"fecha_encuadernado_at" => [
"type" => "DATE",
"null" => true,
],
"fecha_externo_at" => [
"fecha_entrega_externo" => [
"type" => "DATE",
"null" => true,
],
@ -161,6 +165,8 @@ class OrdenTrabajoDatesTable extends Migration
"null" => true,
],
]);
$this->forge->addPrimaryKey('orden_trabajo_id');
$this->forge->addForeignKey("orden_trabajo_id","ordenes_trabajo","id","CASCADE","CASCADE");
$this->forge->createTable("orden_trabajo_dates", true);
}