Migraciones

This commit is contained in:
Juan Pablo Vial
2024-11-28 11:37:26 -03:00
parent dafabdbbdb
commit 57fc6fa46e
11 changed files with 214 additions and 872 deletions

View File

@ -0,0 +1,21 @@
<?php
use Phinx\Migration\AbstractMigration;
class CreateAgente extends AbstractMigration
{
public function change(): void
{
$this->table('agente')
->addColumn('tipo', 'integer', ['null' => true, 'default' => null])
->addColumn('rut', 'integer', ['null' => true, 'default' => null])
->addColumn('descripcion', 'string', ['null' => true, 'default' => null, 'limit' => 100])
->addColumn('representante', 'string', ['null' => true, 'default' => null, 'limit' => 100])
->addColumn('telefono', 'integer', ['null' => true, 'default' => null])
->addColumn('correo', 'string', ['null' => true, 'default' => null, 'limit' => 100])
->addColumn('direccion', 'string', ['null' => true, 'default' => null, 'limit' => 100])
->addColumn('giro', 'text', ['null' => true, 'default' => null])
->addColumn('abreviacion', 'text', ['null' => true, 'default' => null, 'limit' => 20])
->create();
}
}