bilhej/scripts/next-flyway-version.sh
Joakim Mörling 3532e4d486
All checks were successful
CI / Lint, type check, unit tests, coverage (pull_request) Successful in 2m9s
CI / E2E browser tests (pull_request) Successful in 1m55s
Add account settings dropdown and verified email change flow.
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>
2026-05-22 14:33:06 +02:00

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"