Varios cambios Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl> Reviewed-on: #25
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Seed\AbstractSeed;
|
|
|
|
class TipoSociedad extends AbstractSeed
|
|
{
|
|
/**
|
|
* Run Method.
|
|
*
|
|
* Write your database seeder using this method.
|
|
*
|
|
* More information on writing seeders is available here:
|
|
* https://book.cakephp.org/phinx/0/en/seeding.html
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$this->execute('SET unique_checks=0; SET foreign_key_checks=0;');
|
|
|
|
$table = $this->table('tipo_sociedad');
|
|
$table->truncate();
|
|
|
|
$data = [
|
|
[
|
|
'descripcion' => 'Limitada',
|
|
'abreviacion' => 'Ltda',
|
|
],
|
|
[
|
|
'descripcion' => 'Sociedad Anónima',
|
|
'abreviacion' => 'SA',
|
|
],
|
|
[
|
|
'descripcion' => 'Sociedad por Acciones',
|
|
'abreviacion' => 'SpA',
|
|
]
|
|
];
|
|
|
|
$table->insert($data)->saveData();
|
|
|
|
$this->execute('SET unique_checks=1; SET foreign_key_checks=1;');
|
|
}
|
|
}
|