Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
716cf56cb2.url-de-test.ws
/
htdocs_old
/
src
/
Migrations
/
/srv/data/web/vhosts/716cf56cb2.url-de-test.ws/htdocs_old/src/Migrations/Version20190621140321.php
<?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 Version20190621140321 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE establishment (id INT AUTO_INCREMENT NOT NULL, region VARCHAR(255) NOT NULL, place LONGTEXT NOT NULL, summary LONGTEXT NOT NULL, address VARCHAR(255) NOT NULL, zipcode VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, is_active TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('ALTER TABLE disorder ADD establishment_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE disorder ADD CONSTRAINT FK_911063F48565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)'); $this->addSql('CREATE INDEX IDX_911063F48565851 ON disorder (establishment_id)'); $this->addSql('ALTER TABLE facility ADD establishment_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE facility ADD CONSTRAINT FK_105994B28565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)'); $this->addSql('CREATE INDEX IDX_105994B28565851 ON facility (establishment_id)'); $this->addSql('ALTER TABLE public_welcomed ADD establishment_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE public_welcomed ADD CONSTRAINT FK_EFB66F648565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)'); $this->addSql('CREATE INDEX IDX_EFB66F648565851 ON public_welcomed (establishment_id)'); } public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE disorder DROP FOREIGN KEY FK_911063F48565851'); $this->addSql('ALTER TABLE facility DROP FOREIGN KEY FK_105994B28565851'); $this->addSql('ALTER TABLE public_welcomed DROP FOREIGN KEY FK_EFB66F648565851'); $this->addSql('DROP TABLE establishment'); $this->addSql('DROP INDEX IDX_911063F48565851 ON disorder'); $this->addSql('ALTER TABLE disorder DROP establishment_id'); $this->addSql('DROP INDEX IDX_105994B28565851 ON facility'); $this->addSql('ALTER TABLE facility DROP establishment_id'); $this->addSql('DROP INDEX IDX_EFB66F648565851 ON public_welcomed'); $this->addSql('ALTER TABLE public_welcomed DROP establishment_id'); } }