<?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 Version20230204105537 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 news_item_user (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, news_item_id INT NOT NULL, name VARCHAR(255) DEFAULT NULL, last_name VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, phone VARCHAR(255) DEFAULT NULL, INDEX IDX_5986CD73A76ED395 (user_id), INDEX IDX_5986CD73458B4EB8 (news_item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE news_item_user ADD CONSTRAINT FK_5986CD73A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE news_item_user ADD CONSTRAINT FK_5986CD73458B4EB8 FOREIGN KEY (news_item_id) REFERENCES news_item (id)');
$this->addSql('ALTER TABLE credits_acknowledgment_request CHANGE is_notification_sent is_notification_sent TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE equipment_issue CHANGE is_notification_sent is_notification_sent TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE new_student_enrollment CHANGE is_notification_sent is_notification_sent TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE payroll CHANGE is_notification_sent is_notification_sent TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE tic_issue CHANGE is_notification_sent is_notification_sent TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE news_item_user');
$this->addSql('ALTER TABLE credits_acknowledgment_request CHANGE is_notification_sent is_notification_sent TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE equipment_issue CHANGE is_notification_sent is_notification_sent TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE new_student_enrollment CHANGE is_notification_sent is_notification_sent TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE payroll CHANGE is_notification_sent is_notification_sent TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE tic_issue CHANGE is_notification_sent is_notification_sent TINYINT(1) DEFAULT 0 NOT NULL');
}
}