This commit is contained in:
smals-lade
2026-02-10 10:55:37 +01:00
parent de5849685d
commit 0934db9257
2 changed files with 0 additions and 53 deletions
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# This script creates all backend files for Story 0
BASE_DIR="/home/feeling/Documents/Code/ldpv2/backend/src/main/java/com/ldpv2"
# Create all necessary directories
mkdir -p "$BASE_DIR"/{config,domain/{entity,enums},repository,service,dto/{request,response},controller,security,exception}
mkdir -p /home/feeling/Documents/Code/ldpv2/backend/src/main/resources/db/changelog/{v1.0,data}
mkdir -p /home/feeling/Documents/Code/ldpv2/backend/src/test/java/com/ldpv2/{service,controller,integration}
echo "Backend directory structure created successfully"
-41
View File
@@ -1,41 +0,0 @@
#!/bin/bash
echo "=========================================="
echo "LDPv2 - Database Diagnostics"
echo "=========================================="
echo ""
echo "1. Checking if user table exists:"
echo "-----------------------------------"
docker exec ldpv2-postgres psql -U ldpv2_user -d ldpv2 -c "\dt users"
echo ""
echo "2. Checking users in database:"
echo "-----------------------------------"
docker exec ldpv2-postgres psql -U ldpv2_user -d ldpv2 -c "SELECT id, username, email, role, created_at FROM users;"
echo ""
echo "3. Checking password hash for admin:"
echo "-----------------------------------"
docker exec ldpv2-postgres psql -U ldpv2_user -d ldpv2 -c "SELECT username, LEFT(password, 20) || '...' as password_hash FROM users WHERE username='admin';"
echo ""
echo "4. Checking all tables:"
echo "-----------------------------------"
docker exec ldpv2-postgres psql -U ldpv2_user -d ldpv2 -c "\dt"
echo ""
echo "5. Checking Liquibase changelog (executed migrations):"
echo "-----------------------------------"
docker exec ldpv2-postgres psql -U ldpv2_user -d ldpv2 -c "SELECT id, author, filename, dateexecuted, exectype FROM databasechangelog ORDER BY dateexecuted;"
echo ""
echo "6. Testing BCrypt hash verification:"
echo "-----------------------------------"
echo "The password 'admin123' should hash to something starting with \$2a\$10\$"
echo "Expected hash in initial-data.xml: \$2a\$10\$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy"
echo ""
echo "=========================================="
echo "Diagnostics complete!"
echo "=========================================="