Split API and frontend, migrate SQLite to PostgreSQL

- api.fahrschultermin.de: full API entry point with CORS + session auth
- fahrschultermin.de: frontend only, no more /api/v1 routing
- Database.php: PostgreSQL support (pgsql driver + lastval())
- All repositories: use Database::lastInsertId() for PG compatibility
- config/app.php: PostgreSQL connection settings + CORS config
- bootstrap.php: pass full $config to Database::configure()
- public/index.php: fetch-patch to redirect /api/v1 to api.fahrschultermin.de
- database/schema_pgsql.sql: full PostgreSQL schema (BIGSERIAL)
- database/import_pgsql.sql: 518 rows migrated from SQLite
This commit is contained in:
Hermes Agent
2026-05-18 23:49:42 +02:00
parent 33d61c2fc7
commit 2d6c0ad3aa
15 changed files with 930 additions and 89 deletions

View File

@@ -40,7 +40,7 @@ final class TenantRepository extends BaseRepository
'updated_at' => $timestamp,
]);
return $this->find((int) $this->db->lastInsertId());
return $this->find((int) $this->lastInsertId());
}
public function update(int $id, array $data): ?array