Files
oficial/app/resources/database/migrations/20141101080026_create_estado_cobro.php

21 lines
672 B
PHP
Raw Normal View History

2024-12-18 19:48:00 -03:00
<?php
use Phinx\Db\Adapter\MysqlAdapter;
class CreateEstadoCobro extends Phinx\Migration\AbstractMigration
{
public function change(): void
{
$this->execute('SET unique_checks=0; SET foreign_key_checks=0;');
$this->execute("ALTER DATABASE CHARACTER SET 'utf8mb4';");
$this->execute("ALTER DATABASE COLLATE='utf8mb4_general_ci';");
$this->table('estado_cobro')
->addColumn('cobro', 'integer', ['length' => 10, 'null' => false, 'signed' => false])
->addColumn('fecha', 'date', ['null' => false])
->addColumn('estado', 'integer', ['length' => 11, 'null' => false])
->create();
$this->execute('SET unique_checks=1; SET foreign_key_checks=1;');
}
}