- Company.walletConfig (json, Migration mit MariaDB-sicherem Backfill).
- WalletService liest die Firmen-Config: Hintergrund-/Text-/Label-Farbe, Titel,
echtes Firmenlogo (aus Object-Storage, in pass.json-Bilder skaliert; Google via
öffentliche Logo-URL), frei wählbare Datenfelder mit Label je Apple-Slot
(primary/secondary/auxiliary/back) → Google-Header/Textmodule.
- WalletDesignController: GET/PUT Design, POST/DELETE Logo (S3); öffentliche
Logo-Route /w/logo/{companyId}.png. Beispieldaten (1. Mitarbeiter) für Vorschau.
- Verifiziert: pass.json übernimmt Farben/Titel/Felder, Signatur bleibt gültig.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?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 Version20260604165342 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'Company.walletConfig (Wallet-Pass-Design)';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
// MariaDB: NOT-NULL-JSON auf bestehende Zeilen bricht (json_valid-CHECK auf '').
|
|
// Daher nullable hinzufügen → mit '[]' backfillen → NOT NULL setzen.
|
|
$this->addSql('ALTER TABLE company ADD wallet_config JSON DEFAULT NULL');
|
|
$this->addSql("UPDATE company SET wallet_config = '[]' WHERE wallet_config IS NULL");
|
|
$this->addSql('ALTER TABLE company MODIFY wallet_config JSON NOT NULL');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
// this down() migration is auto-generated, please modify it to your needs
|
|
$this->addSql('ALTER TABLE company DROP wallet_config');
|
|
}
|
|
}
|