migrations/Common/Version20200301104756_PlaceOwner.php line 1
<?php
declare(strict_types=1);
namespace DoctrineMigrations\Common;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20200301104756_PlaceOwner extends AbstractMigration
{
public function getDescription(): string
{
return 'Link place\'s owner to company';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE public.place ADD CONSTRAINT place_owner_id_fkey FOREIGN KEY (owner_id) REFERENCES public.company (id) NOT DEFERRABLE INITIALLY IMMEDIATE");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE public.place DROP CONSTRAINT place_owner_id_fkey");
}
}