Files
Ferme/migrations/Version20260127000200.php
tristan 1ce6357c1d Finalisation réception marchandise, ajout de composant UI et ajout de fixtures (!7)
| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [x] Pas de régression
- [ ] TU/TI/TF rédigée
- [x] TU/TI/TF OK
- [x] CHANGELOG modifié

Reviewed-on: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/7
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
2026-01-30 14:10:40 +00:00

31 lines
962 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260127000200 extends AbstractMigration
{
public function getDescription(): string
{
return 'Link receptions to a responsible user';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE reception ADD user_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE reception ADD CONSTRAINT FK_83DC02E3A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_83DC02E3A76ED395 ON reception (user_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE reception DROP CONSTRAINT FK_83DC02E3A76ED395');
$this->addSql('DROP INDEX IDX_83DC02E3A76ED395');
$this->addSql('ALTER TABLE reception DROP user_id');
}
}