From f1d3ee6b1e937ff89b72d4adfde6cdac4dd0c78b Mon Sep 17 00:00:00 2001 From: Simon Kuehn Date: Tue, 19 May 2026 15:47:19 +0000 Subject: [PATCH] feat: seed eBay platform row via migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit INSERT INTO app.platforms WHERE NOT EXISTS — idempotent, safe to run on existing installations. Fixes "eBay-Platform nicht konfiguriert" error when opening the eBay category config CRUD. Co-Authored-By: Claude Sonnet 4.6 --- migrations/Version20260520110000.php | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/Version20260520110000.php diff --git a/migrations/Version20260520110000.php b/migrations/Version20260520110000.php new file mode 100644 index 0000000..269af63 --- /dev/null +++ b/migrations/Version20260520110000.php @@ -0,0 +1,30 @@ +addSql(<<<'SQL' + INSERT INTO app.platforms (id, type, label, config) + SELECT gen_random_uuid(), 'ebay', 'eBay', '[]' + WHERE NOT EXISTS (SELECT 1 FROM app.platforms WHERE type = 'ebay') + SQL); + } + + public function down(Schema $schema): void + { + $this->addSql("DELETE FROM app.platforms WHERE type = 'ebay'"); + } +}