Spaces:
Running
Running
| echo "π POS Seed Data Quick Setup" | |
| echo "================================" | |
| # Check if we're in the right directory | |
| if [ ! -f "create_seed_data_simple.py" ]; then | |
| echo "β Please run this script from the cuatrolabs-pos-ms directory" | |
| echo "Usage: cd cuatrolabs-pos-ms && bash quick_setup.sh" | |
| exit 1 | |
| fi | |
| echo "π Current directory: $(pwd)" | |
| echo "β In correct directory" | |
| # Check dependencies | |
| echo "" | |
| echo "π Checking dependencies..." | |
| python -c "import motor, asyncpg, dotenv" 2>/dev/null | |
| if [ $? -eq 0 ]; then | |
| echo "β All dependencies available" | |
| else | |
| echo "β Missing dependencies. Installing..." | |
| pip install -r seed_requirements.txt | |
| fi | |
| # Create seed data | |
| echo "" | |
| echo "π Creating seed data in MongoDB..." | |
| python create_seed_data_simple.py | |
| if [ $? -eq 0 ]; then | |
| echo "β Seed data created successfully" | |
| else | |
| echo "β Failed to create seed data" | |
| exit 1 | |
| fi | |
| # Sync to PostgreSQL | |
| echo "" | |
| echo "π Syncing to PostgreSQL..." | |
| python simple_sync.py | |
| if [ $? -eq 0 ]; then | |
| echo "β Sync completed successfully" | |
| else | |
| echo "β Sync failed" | |
| exit 1 | |
| fi | |
| # Verify data | |
| echo "" | |
| echo "π Verifying data..." | |
| python verify_seed_data.py | |
| echo "" | |
| echo "π Setup complete!" | |
| echo "================================" | |
| echo "Merchant ID: company_cuatro_beauty_ltd" | |
| echo "Data created: Staff, Services, Customers" | |
| echo "Databases: MongoDB + PostgreSQL" |