#!/usr/bin/env bash # Adds the missing base tables to the company databases (SPEC ยง14, ADR 0026). Rows already there are never changed. # scripts/seed.sh --base [--company CODE] # In the container (shipped as /app/scripts/seed.sh, same KHAEMHAT_* variables as the service): # docker compose run --rm --entrypoint /app/scripts/seed.sh khaemhat --base # On a development machine it runs the project with the variables already set in the shell (see scripts/run-dev.sh). # The demo data (--demo [--scale N]) arrive with parties and items. set -euo pipefail if [[ -f /app/Khaemhat.Web.dll ]]; then # The entrypoint prepares the user and waits for the database, then runs "dotnet Khaemhat.Web.dll seed ...". exec /app/entrypoint.sh seed "$@" fi root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" exec dotnet run --project "$root/src/Khaemhat.Web" -- seed "$@"