Steuerkram/migrations/063_bank_direktverbindungen.sql
fds2610-bot 995b52fbd3 Feature: FinTS-Direktverbindung und vereinheitlichte Importquellen
- FinTS-Abruf für Comdirect/DKB/Sparkassen via nemiah/php-fints (4.1)
  inkl. photoTAN-Eingabe-Modal und Multi-Konto-Auswahl
- Neue Tabelle bank_sources (CSV/API/FinTS) ersetzt bank_import_formats
  und bank_connections, Backfill in Migration 068
- Symmetrische Verschlüsselung sensibler Felder (PayPal-Signature,
  FinTS-PIN) mit AES-256-GCM, APP_KEY in .env
- Routes /bank/fints* → /bank/direkt*; "+ Neue Bank…"-Dialog erlaubt
  freie API/FinTS-Anbieter
- Scripts/encrypt_bank_secrets.php als idempotenter Migrations-Helfer
- Neue Tests 36 (Crypto) und 37 (BankSource)
2026-05-22 07:17:00 +02:00

20 lines
957 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Unterstützte Banken/Provider (Stammdaten). Initial leer –
-- Anbieter werden über den "Neue Bank"-Dialog vom Nutzer selbst angelegt.
CREATE TABLE IF NOT EXISTS bank_providers (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
verbindungstyp ENUM('API','FinTS') NOT NULL DEFAULT 'FinTS',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Konfigurierte Bankverbindungen des Nutzers
CREATE TABLE IF NOT EXISTS bank_connections (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
provider_id INT UNSIGNED NOT NULL,
bezeichnung VARCHAR(150) NOT NULL,
app_name VARCHAR(150) NULL,
client_id VARCHAR(255) NULL,
secret VARCHAR(255) NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (provider_id) REFERENCES bank_providers(id) ON DELETE RESTRICT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;