feat : relation Bovine -> BovineType, support du bâtiment direct et feed étendu
- Bovine.breedCode (string) remplacé par bovineType (FK BovineType) - Migration : ajout des races manquantes (Aubrac, Croisé, Blonde d'aquitaine), backfill, drop breed_code - Sync EDNOTIF : auto-création d'un BovineType placeholder pour code inconnu - Bovine.building (FK Building, nullable) en plus de buildingCase - Getter effectiveBuilding (case prime sinon building direct) - Feed XLSX : colonne E optionnelle (code bâtiment), set uniquement si pas de buildingCase - Front : DTO + colonnes en variant inventory/case via composable, race et bâtiment ajustés - Excel export utilise bovineType.label Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
migrations/Version20260428061801.php
Normal file
35
migrations/Version20260428061801.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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 Version20260428061801 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->addSql('ALTER TABLE bovine ADD building_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE bovine ADD CONSTRAINT FK_2068337F4D2A7E12 FOREIGN KEY (building_id) REFERENCES building (id)');
|
||||
$this->addSql('CREATE INDEX IDX_2068337F4D2A7E12 ON bovine (building_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE bovine DROP CONSTRAINT FK_2068337F4D2A7E12');
|
||||
$this->addSql('DROP INDEX IDX_2068337F4D2A7E12');
|
||||
$this->addSql('ALTER TABLE bovine DROP building_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user