<?php
require __DIR__."/vendor/autoload.php";
$pdo = new PDO("pgsql:host=127.0.0.1;port=5433;dbname=fahrschultermin", "fahrschultermin_api", "X9wL3pN7kRtHvMbZs4cGfYu2Dj6qAe8t");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$hash = password_hash('Tanja82', PASSWORD_BCRYPT, ['cost' => 12]);
echo "New hash: $hash\n";
$stmt = $pdo->prepare("UPDATE users SET password_hash = :hash WHERE email = :email");
$stmt->execute([':hash' => $hash, ':email' => 'admin@nordring.test']);
echo "Updated: " . $stmt->rowCount() . " rows\n";