Migrations and seeds

This commit is contained in:
Juan Pablo Vial
2024-12-18 19:48:00 -03:00
parent 70710b24c5
commit d6b735f2aa
214 changed files with 1387167 additions and 4747 deletions

View File

@ -0,0 +1,78 @@
<?php
use Phinx\Seed\AbstractSeed;
class SubsidioSeeder extends AbstractSeed
{
public function run(): void
{
$data = [
[
'id' => 1,
'pago' => 6778,
'subsidio' => 7107,
],
[
'id' => 2,
'pago' => 6789,
'subsidio' => 7108,
],
[
'id' => 3,
'pago' => 6790,
'subsidio' => 7109,
],
[
'id' => 4,
'pago' => 6791,
'subsidio' => 7101,
],
[
'id' => 5,
'pago' => 6819,
'subsidio' => 7105,
],
[
'id' => 6,
'pago' => 6861,
'subsidio' => 7103,
],
[
'id' => 7,
'pago' => 6868,
'subsidio' => 7104,
],
[
'id' => 8,
'pago' => 6879,
'subsidio' => 7110,
],
[
'id' => 9,
'pago' => 7077,
'subsidio' => 7106,
],
[
'id' => 10,
'pago' => 7401,
'subsidio' => 7402,
],
[
'id' => 11,
'pago' => 8119,
'subsidio' => 8120,
],
[
'id' => 12,
'pago' => 8201,
'subsidio' => 8202,
],
];
$this->execute('SET unique_checks=0; SET foreign_key_checks=0;');
$this->table('subsidio')
->insert($data)
->saveData();
$this->execute('SET unique_checks=1; SET foreign_key_checks=1;');
}
}