diff --git a/bin/migrate-sqlite-to-pg.sh b/bin/migrate-sqlite-to-pg.sh index f3675ff..ad3ff5d 100755 --- a/bin/migrate-sqlite-to-pg.sh +++ b/bin/migrate-sqlite-to-pg.sh @@ -8,7 +8,7 @@ DB_URL=$(grep -m1 '^DATABASE_URL=' .env.local | sed 's/^DATABASE_URL=//; s/^"//; PG_USER=$(sed -n 's|.*://\([^:@]*\):.*|\1|p' <<<"$DB_URL") PG_PASS=$(sed -n 's|.*://[^:@]*:\([^@]*\)@.*|\1|p' <<<"$DB_URL") PG_HOST=$(sed -n 's|.*@\([^:/?]*\).*|\1|p' <<<"$DB_URL") -PG_DB=$(sed -n 's|.*:/\([^?]*\).*|\1|p' <<<"$DB_URL") +PG_DB=$(sed -n 's|.*/\([^/?]*\).*|\1|p' <<<"$DB_URL") export PGPASSWORD="$PG_PASS" echo "== 1) SQLite-Export (CSV) aus dem laufenden Container"