addSql('ALTER TABLE users ADD employee_id INT DEFAULT NULL'); $this->addSql('CREATE UNIQUE INDEX UNIQ_USERS_EMPLOYEE ON users (employee_id)'); $this->addSql('ALTER TABLE users ADD CONSTRAINT FK_USERS_EMPLOYEE FOREIGN KEY (employee_id) REFERENCES employees (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); } public function down(Schema $schema): void { $this->addSql('ALTER TABLE users DROP CONSTRAINT FK_USERS_EMPLOYEE'); $this->addSql('DROP INDEX UNIQ_USERS_EMPLOYEE'); $this->addSql('ALTER TABLE users DROP COLUMN employee_id'); } }