Replace the header "Byt lösenord" link with an Inställningar menu for changing email or password. Email changes are two-step: request with password, confirmation link to the new address, then password again on confirm so a wrong inbox cannot take over the account. - Backend: EmailChangeService, V10 email_change_tokens, confirm API - Frontend: ChangeEmailPage, ConfirmEmailChangePage, header dropdown - E2E: account-settings round-trips, Mailpit verification, wrong-password guard - Flyway: V9 restore for dev DBs, CI migration checks, V10 for email tokens Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
571 B
Bash
Executable file
22 lines
571 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Prints the next available Flyway version for db/migration/.
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
MIGRATION_DIR="$ROOT/backend/src/main/resources/db/migration"
|
|
|
|
max=0
|
|
for file in "$MIGRATION_DIR"/V*.sql; do
|
|
[[ -e "$file" ]] || continue
|
|
name="$(basename "$file")"
|
|
if [[ "$name" =~ ^V([0-9]+)__ ]]; then
|
|
version="${BASH_REMATCH[1]}"
|
|
version=$((10#$version))
|
|
if (( version > max )); then
|
|
max=$version
|
|
fi
|
|
fi
|
|
done
|
|
|
|
next=$((max + 1))
|
|
echo "Next migration: V${next}__your_description.sql"
|