API updadte
This commit is contained in:
33
migrations/Version20251108215623.php
Normal file
33
migrations/Version20251108215623.php
Normal 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');
|
||||
}
|
||||
}
|
||||
22
migrations/bundeslaender_data.sql
Normal file
22
migrations/bundeslaender_data.sql
Normal 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);
|
||||
Reference in New Issue
Block a user