Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

806 B
Raw Blame
#!/bin/bash

# Make sure to install the dotnet ef tool first before running this script:
# dotnet tool install --global dotnet-ef

# Configurable settings
PROJECT="../AliasClientDb.csproj"
STARTUP_PROJECT="../AliasClientDb.csproj"   # Adjust if different from main project
CONTEXT="AliasClientDbContext"
OUTPUT_DIR="MigrationSql"
FULL_FILE="$OUTPUT_DIR/000_FullSchema.sql"

# Create output directory
mkdir -p "$OUTPUT_DIR"

# Regenerate the full schema script.
echo "Generating full schema script..."
if ! dotnet ef migrations script \
  --project "$PROJECT" \
  --startup-project "$STARTUP_PROJECT" \
  --context "$CONTEXT" \
  --output "$FULL_FILE"; then
    echo "Error: 'dotnet ef migrations script' failed; $FULL_FILE was not regenerated."
    exit 1
fi

echo "Done. Full schema written to $FULL_FILE"