Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Remove sqlite migration scripts (#494)
Leendert de Borstaa99bbc11168
diff --git a/apps/server/Utilities/AliasVault.InstallCli/Program.cs b/apps/server/Utilities/AliasVault.InstallCli/Program.csindex 7c5332417..262fce9ba 100644--- a/apps/server/Utilities/AliasVault.InstallCli/Program.cs+++ b/apps/server/Utilities/AliasVault.InstallCli/Program.cs@@ -43,13 +43,6 @@ public static partial class Programreturn HashPassword(args[1]);- // The implementation for this command was removed in version 0.18.0 onwards. The command is still here for- // backwards compatibility, but it does nothing and returns an error to the user. This placeholder can be- // removed in a future version.- case "migrate-sqlite":- Console.WriteLine("SQLite migration has been removed from version 0.18.0 onwards. You'll need to update to a previous version (0.17.0 or lower) to run this script. Follow the official docs.");- return 1;-default:Console.WriteLine("Unknown command. Available commands:");Console.WriteLine(" hash-password <password>");diff --git a/apps/server/Utilities/AliasVault.Logging/AliasVault.Logging.csproj b/apps/server/Utilities/AliasVault.Logging/AliasVault.Logging.csprojindex fed0ae3a1..a6271cd35 100644--- a/apps/server/Utilities/AliasVault.Logging/AliasVault.Logging.csproj+++ b/apps/server/Utilities/AliasVault.Logging/AliasVault.Logging.csproj@@ -28,7 +28,6 @@<PackageReference Include="Serilog.Settings.Configuration" Version="9.0.0" /><PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" /><PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />- <PackageReference Include="Serilog.Sinks.SQLite" Version="6.0.0" /><PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556"><PrivateAssets>all</PrivateAssets><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>diff --git a/database/README.md b/database/README.mdindex b9289f295..6b02f5249 100644--- a/database/README.md+++ b/database/README.md@@ -1,5 +1,3 @@-This is the default location where the SQLite database is stored.+This is the default location where the Postgres database files are stored (configured via Docker filesystem mounts).-The database is created during the first run of the application.--For production use, it is recommended to switch to a more secure database, such as SQL Server or PostgreSQL.+The database is created during the first run of the application.\ No newline at end of filediff --git a/install.sh b/install.shindex e5abcb07d..ff7b8402c 100755--- a/install.sh+++ b/install.sh@@ -58,7 +58,6 @@ show_usage() {printf " db-import Import database from file\n"printf "\n"printf " configure-dev-db Enable/disable development database (for local development only)\n"- printf " migrate-db Migrate data from SQLite to PostgreSQL (only when upgrading from a version prior to 0.10.0)\n"printf "\n"printf "Options:\n"printf " --verbose Show detailed output\n"@@ -282,9 +281,6 @@ main() {"configure-dev-db")configure_dev_database;;- "migrate-db")- handle_migrate_db- ;;"db-export")handle_db_export;;@@ -1777,98 +1773,6 @@ print_dev_db_details() {printf "${MAGENTA}=========================================================${NC}\n"}-# Function to handle database migration. This is a one-time operation necessary when upgrading from <= 0.9.x to 0.10.0+ and only needs to be run once.-handle_migrate_db() {- printf "${YELLOW}+++ Database Migration Tool +++${NC}\n"- printf "\n"-- # Check for old SQLite database- SQLITE_DB="database/AliasServerDb.sqlite"- if [ ! -f "$SQLITE_DB" ]; then- printf "${RED}Error: SQLite database not found at ${SQLITE_DB}${NC}\n"- exit 1- fi-- # Get the absolute path of the SQLite database- SQLITE_DB_ABS=$(realpath "$SQLITE_DB")- SQLITE_DB_DIR=$(dirname "$SQLITE_DB_ABS")- SQLITE_DB_NAME=$(basename "$SQLITE_DB_ABS")-- # Get PostgreSQL password from .env file- POSTGRES_PASSWORD=$(grep "^POSTGRES_PASSWORD=" "$ENV_FILE" | cut -d= -f2-)- if [ -z "$POSTGRES_PASSWORD" ]; then- printf "${RED}Error: POSTGRES_PASSWORD not found in .env file${NC}\n"- exit 1- fi-- # Get network name in lowercase- NETWORK_NAME="$(pwd | xargs basename)_default"- NETWORK_NAME=$(echo "$NETWORK_NAME" | tr '[:upper:]' '[:lower:]')-- printf "\n${YELLOW}Warning: This will migrate data from your SQLite database to PostgreSQL.${NC}\n"- printf "\n"- printf "This is a one-time operation necessary when upgrading from <= 0.9.x to 0.10.0+ and only needs to be run once.\n"- printf "\n"- printf "Source database: ${CYAN}${SQLITE_DB_ABS}${NC}\n"- printf "Target: PostgreSQL database (using connection string from docker-compose.yml)\n"- printf "Make sure you have backed up your data before proceeding.\n"-- printf "\n${RED}WARNING: This operation will DELETE ALL EXISTING DATA in the PostgreSQL database.${NC}\n"- printf "${RED}Only proceed if you understand that any current PostgreSQL data will be permanently lost.${NC}\n"- printf "${RED}This operation will stop all services and restart them after the migration is complete.${NC}\n"- printf "\n"-- read -p "Continue with migration? [y/N]: " confirm- if [[ ! $confirm =~ ^[Yy]$ ]]; then- printf "${YELLOW}Migration cancelled.${NC}\n"- exit 0- fi-- printf "${CYAN}> Stopping services to ensure database is not in use...${NC}\n"- docker compose stop api admin task-runner smtp-- if ! docker pull ${GITHUB_CONTAINER_REGISTRY}-installcli:0.10.3 > /dev/null 2>&1; then- printf "${YELLOW}> Pre-built image not found, building locally...${NC}"- if [ "$VERBOSE" = true ]; then- docker build -t installcli -f apps/server/Utilities/AliasVault.InstallCli/Dockerfile .- else- (- docker build -t installcli -f apps/server/Utilities/AliasVault.InstallCli/Dockerfile . > install_build_output.log 2>&1 &- BUILD_PID=$!- while kill -0 $BUILD_PID 2>/dev/null; do- printf "."- sleep 1- done- printf "\n"- wait $BUILD_PID- BUILD_EXIT_CODE=$?- if [ $BUILD_EXIT_CODE -ne 0 ]; then- printf "\n${RED}> Error building Docker image. Check install_build_output.log for details.${NC}\n"- exit $BUILD_EXIT_CODE- fi- )- fi-- # Run migration with volume mount and connection string- docker run --rm \- --network="${NETWORK_NAME}" \- -v "${SQLITE_DB_DIR}:/sqlite" \- installcli migrate-sqlite "/sqlite/${SQLITE_DB_NAME}" "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"- else- # Run migration with volume mount using pre-built image- docker run --rm \- --network="${NETWORK_NAME}" \- -v "${SQLITE_DB_DIR}:/sqlite" \- ${GITHUB_CONTAINER_REGISTRY}-installcli:0.10.0 migrate-sqlite "/sqlite/${SQLITE_DB_NAME}" "Host=postgres;Database=aliasvault;Username=aliasvault;Password=${POSTGRES_PASSWORD}"- fi-- # Starting services again- printf "${CYAN}> Starting services...${NC}\n"- docker compose start api admin task-runner smtp reverse-proxy-- printf "${GREEN}> Check migration output above for details.${NC}\n"-}-# Function to set deployment mode in .envset_deployment_mode() {local mode=$1