API updadte

This commit is contained in:
2025-11-08 23:21:26 +01:00
parent c0c346a9ed
commit 81374cc659
12 changed files with 477 additions and 37 deletions

View File

@@ -0,0 +1,33 @@
<?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 Version20251108215623 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 users ADD api_key VARCHAR(64) NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1483A5E9C912ED9D ON users (api_key)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP INDEX UNIQ_1483A5E9C912ED9D ON users');
$this->addSql('ALTER TABLE users DROP api_key');
}
}

View File

@@ -0,0 +1,22 @@
-- Bundesländer mit Grunderwerbsteuer-Sätzen (Stand 2025)
-- Dieses Script wird nach der Migration automatisch ausgeführt
INSERT INTO bundeslaender (name, grunderwerbsteuer) VALUES
('Baden-Württemberg', 5.00),
('Bayern', 3.50),
('Berlin', 6.00),
('Brandenburg', 6.50),
('Bremen', 5.00),
('Hamburg', 5.50),
('Hessen', 6.00),
('Mecklenburg-Vorpommern', 6.00),
('Niedersachsen', 5.00),
('Nordrhein-Westfalen', 6.50),
('Rheinland-Pfalz', 5.00),
('Saarland', 6.50),
('Sachsen', 5.50),
('Sachsen-Anhalt', 5.00),
('Schleswig-Holstein', 6.50),
('Thüringen', 5.00)
ON DUPLICATE KEY UPDATE
grunderwerbsteuer = VALUES(grunderwerbsteuer);