<?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 Version20220702185930 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('ALTER TABLE parameter_time_clock ADD clock_attached_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE parameter_time_clock ADD CONSTRAINT FK_DE9FD9E3CBB52E96 FOREIGN KEY (clock_attached_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_DE9FD9E3CBB52E96 ON parameter_time_clock (clock_attached_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE parameter_time_clock DROP FOREIGN KEY FK_DE9FD9E3CBB52E96');
$this->addSql('DROP INDEX IDX_DE9FD9E3CBB52E96 ON parameter_time_clock');
$this->addSql('ALTER TABLE parameter_time_clock DROP clock_attached_id');
}
}