geo detection
This commit is contained in:
20
bin/init_database.sh
Normal file
20
bin/init_database.sh
Normal 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!"
|
||||
Reference in New Issue
Block a user