mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
tarifa maquinas
This commit is contained in:
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class MaquinaTareasTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
'id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'auto_increment' => true,
|
||||
],
|
||||
'name' => [
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 255,
|
||||
],
|
||||
'description' => [
|
||||
'type' => 'LONGTEXT',
|
||||
'default' => null,
|
||||
'null' => true
|
||||
]
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
|
||||
],
|
||||
'updated_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
'deleted_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->createTable("maquina_tareas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("maquina_tareas");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class TarifaAcabadoMaquinaTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
'id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'auto_increment' => true,
|
||||
],
|
||||
'tarifa_acabado_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_tarea_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
]
|
||||
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
|
||||
],
|
||||
'updated_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
'deleted_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('tarifa_acabado_id','lg_tarifa_acabado','id');
|
||||
$this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id');
|
||||
$this->forge->createTable("tarifa_acabado_maquinas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("tarifa_acabado_maquinas");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class TarifaManipuladoMaquinaTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
'id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'auto_increment' => true,
|
||||
],
|
||||
'tarifa_manipulado_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_tarea_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
]
|
||||
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
|
||||
],
|
||||
'updated_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
'deleted_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('tarifa_manipulado_id','lg_tarifa_manipulado','id');
|
||||
$this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id');
|
||||
$this->forge->createTable("tarifa_manipulado_maquinas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("tarifa_manipulado_maquinas");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class TarifaPreimpresionMaquinaTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
|
||||
'id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'auto_increment' => true,
|
||||
],
|
||||
'tarifa_preimpresion_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_tarea_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
]
|
||||
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
|
||||
],
|
||||
'updated_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
'deleted_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('tarifa_preimpresion_id','lg_tarifa_preimpresion','id');
|
||||
$this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id');
|
||||
$this->forge->createTable("tarifa_preimpresion_maquinas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("tarifa_preimpresion_maquinas");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class TarifaEncuadernacionMaquinaTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
|
||||
'id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'auto_increment' => true,
|
||||
],
|
||||
'tarifa_encuadernacion_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_tarea_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
]
|
||||
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
|
||||
],
|
||||
'updated_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
'deleted_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('tarifa_encuadernacion_id','tarifa_encuadernacion','id');
|
||||
$this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id');
|
||||
$this->forge->createTable("tarifa_encuadernacion_maquinas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("tarifa_encuadernacion_maquinas");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class TarifaExtraMaquinaTable extends Migration
|
||||
{
|
||||
protected array $COLUMNS = [
|
||||
|
||||
'id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'auto_increment' => true,
|
||||
],
|
||||
'tarifa_extra_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'maquina_tarea_id' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'constraint' => 10,
|
||||
]
|
||||
|
||||
];
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
|
||||
],
|
||||
'updated_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
'deleted_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
|
||||
],
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('tarifa_extra_id','tarifa_extra','id');
|
||||
$this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id');
|
||||
$this->forge->createTable("tarifa_extra_maquinas");
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropTable("tarifa_extra_maquinas");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user