feat: add the house manager questionnaire per travel and compact the questionnaire layout

This commit is contained in:
fromme committed 2026-11-11 11:16:37 +01:00
1 parent d760ed3cdf
commit bfef08b519
50 files changed
+2763 -180

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Written by hand from the diff, keeping only questionnaire_response: doctrine:migrations:diff
* also sweeps in the pre-existing drift of the dev database.
*/
final class Version20261111100000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Let a questionnaire response be about a travel, for the house manager questionnaire';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE questionnaire_response ADD destination_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE questionnaire_response ADD CONSTRAINT FK_A0400276816C6140 FOREIGN KEY (destination_id) REFERENCES destination (id) ON DELETE CASCADE');
$this->addSql('CREATE INDEX IDX_A0400276816C6140 ON questionnaire_response (destination_id)');
$this->addSql('CREATE UNIQUE INDEX questionnaire_destination ON questionnaire_response (questionnaire, destination_id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX questionnaire_destination ON questionnaire_response');
$this->addSql('ALTER TABLE questionnaire_response DROP FOREIGN KEY FK_A0400276816C6140');
$this->addSql('DROP INDEX IDX_A0400276816C6140 ON questionnaire_response');
$this->addSql('ALTER TABLE questionnaire_response DROP destination_id');
}
}