109 lines
1.9 KiB
PHP
109 lines
1.9 KiB
PHP
<?php
|
|
|
|
use Phinx\Seed\AbstractSeed;
|
|
|
|
class EstadoProblemaSeeder extends AbstractSeed
|
|
{
|
|
public function run(): void
|
|
{
|
|
$data = [
|
|
[
|
|
'id' => 1,
|
|
'problema' => 1,
|
|
'fecha' => '2016-01-06',
|
|
'estado' => 'ingreso',
|
|
],
|
|
[
|
|
'id' => 2,
|
|
'problema' => 1,
|
|
'fecha' => '2016-01-12',
|
|
'estado' => 'revision',
|
|
],
|
|
[
|
|
'id' => 3,
|
|
'problema' => 1,
|
|
'fecha' => '2016-01-25',
|
|
'estado' => 'correccion',
|
|
],
|
|
[
|
|
'id' => 4,
|
|
'problema' => 2,
|
|
'fecha' => '2016-01-06',
|
|
'estado' => 'ingreso',
|
|
],
|
|
[
|
|
'id' => 5,
|
|
'problema' => 2,
|
|
'fecha' => '2016-03-06',
|
|
'estado' => 'revision',
|
|
],
|
|
[
|
|
'id' => 6,
|
|
'problema' => 3,
|
|
'fecha' => '2015-05-20',
|
|
'estado' => 'ingreso',
|
|
],
|
|
[
|
|
'id' => 7,
|
|
'problema' => 4,
|
|
'fecha' => '2015-12-20',
|
|
'estado' => 'ingreso',
|
|
],
|
|
[
|
|
'id' => 8,
|
|
'problema' => 3,
|
|
'fecha' => '2015-05-25',
|
|
'estado' => 'revision',
|
|
],
|
|
[
|
|
'id' => 9,
|
|
'problema' => 3,
|
|
'fecha' => '2016-02-15',
|
|
'estado' => 'correccion',
|
|
],
|
|
[
|
|
'id' => 10,
|
|
'problema' => 4,
|
|
'fecha' => '2015-12-21',
|
|
'estado' => 'revision',
|
|
],
|
|
[
|
|
'id' => 11,
|
|
'problema' => 5,
|
|
'fecha' => '2015-12-30',
|
|
'estado' => 'ingreso',
|
|
],
|
|
[
|
|
'id' => 12,
|
|
'problema' => 5,
|
|
'fecha' => '2016-01-06',
|
|
'estado' => 'revision',
|
|
],
|
|
[
|
|
'id' => 13,
|
|
'problema' => 5,
|
|
'fecha' => '2016-02-22',
|
|
'estado' => 'correccion',
|
|
],
|
|
[
|
|
'id' => 14,
|
|
'problema' => 6,
|
|
'fecha' => '2016-01-16',
|
|
'estado' => 'ingreso',
|
|
],
|
|
[
|
|
'id' => 15,
|
|
'problema' => 6,
|
|
'fecha' => '2016-01-21',
|
|
'estado' => 'revision',
|
|
],
|
|
];
|
|
|
|
$this->execute('SET unique_checks=0; SET foreign_key_checks=0;');
|
|
$this->table('estado_problema')
|
|
->insert($data)
|
|
->saveData();
|
|
$this->execute('SET unique_checks=1; SET foreign_key_checks=1;');
|
|
}
|
|
}
|