geo detection

This commit is contained in:
2025-11-06 15:09:15 +09:00
parent 88d9ccd75d
commit 0bbeb0767b
47 changed files with 1355 additions and 93 deletions

20
bin/init_database.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# init_database.sh - Initialize database with schema
set -e
echo "🗄️ Initializing database..."
# Wait for database to be ready
echo "⏳ Waiting for database..."
sleep 3
# Create UUID extension
echo "📦 Creating UUID extension..."
docker compose exec -T db psql -U postgres -d telegram_tinder_bot -c "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" || true
# Apply consolidated schema
echo "📋 Applying database schema..."
docker compose exec -T db psql -U postgres -d telegram_tinder_bot < sql/consolidated.sql
echo "✅ Database initialized successfully!"