migrations/Version20210816145519.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20210816145519 extends AbstractMigration{public function getDescription() : string{return '';}public function up(Schema $schema) : void{$this->addSql('CREATE TABLE manager_notifications (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, resident_id INT NOT NULL, flat_id INT NOT NULL, type INT NOT NULL, content VARCHAR(1024) NOT NULL, status INT DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_97A98362A76ED395 (user_id), INDEX IDX_97A983628012C5B0 (resident_id), INDEX IDX_97A98362D3331C94 (flat_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');$this->addSql('ALTER TABLE manager_notifications ADD CONSTRAINT FK_97A98362A76ED395 FOREIGN KEY (user_id) REFERENCES fos_user (id)');$this->addSql('ALTER TABLE manager_notifications ADD CONSTRAINT FK_97A983628012C5B0 FOREIGN KEY (resident_id) REFERENCES residents (id)');$this->addSql('ALTER TABLE manager_notifications ADD CONSTRAINT FK_97A98362D3331C94 FOREIGN KEY (flat_id) REFERENCES flat (id)');}public function down(Schema $schema) : void{$this->addSql('DROP TABLE manager_notifications');}}