<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230625173728 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE employee_advance (id INT AUTO_INCREMENT NOT NULL, employee_id INT NOT NULL, year DOUBLE PRECISION NOT NULL, month DOUBLE PRECISION NOT NULL, amount DOUBLE PRECISION NULL, advance_one DOUBLE PRECISION NULL, advance_two DOUBLE PRECISION NULL, advance_three DOUBLE PRECISION NULL, INDEX IDX_67CD4DFC8C03F15C (employee_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE employee_advance ADD CONSTRAINT FK_67CD4DFC8C03F15C FOREIGN KEY (employee_id) REFERENCES employee (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE employee_advance');
}
}