ArticleType gains ebayCategoryId (migration 20260520080000).
New admin action "Import eBay Aspects" on ArticleType list and detail:
- Fetches aspects via EbayTaxonomyService (cached 7d)
- Sorts: Required → Recommended → Optional
- Auto-matches by case-insensitive name to existing AttributeDefinitions
- Pre-selects "Create new" for required/recommended with no match
- Pre-selects "Skip" for optional with no match
- Already-assigned definitions highlighted green
- Per-row: override to Skip / Match existing / Create new
- Type auto-detected: Select (≤30 eBay values) or String (freetext)
- User can override type in create form
- Required checkbox pre-checked for eBay-required aspects
- "All → Create" / "All → Skip" bulk buttons
- On submit: creates new AttributeDefinitions, links all to ArticleType,
deduplicates, calls applyAttributeAssignments(), flushes
PHPStan level 9 clean throughout.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
661 B
PHP
26 lines
661 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20260520080000 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Add ebay_category_id to app.article_types for taxonomy aspect import';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE app.article_types ADD COLUMN ebay_category_id VARCHAR(50) DEFAULT NULL');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE app.article_types DROP COLUMN ebay_category_id');
|
|
}
|
|
}
|