| import sqlite3 | |
| conn = sqlite3.connect(r'C:\Users\SSASHANK\restaurant-pos\backend\data\restaurant.db') | |
| # Check if notification_logs table exists | |
| cursor = conn.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='notification_logs'") | |
| table = cursor.fetchone() | |
| print(f"Table exists: {table is not None}") | |
| # Check config values server would read | |
| cursor = conn.execute("SELECT whats_app_token, whats_app_phone_id, whats_app_base_url FROM restaurant_configs LIMIT 1") | |
| row = cursor.fetchone() | |
| print(f"Token: '{row[0]}'") | |
| print(f"PhoneID: '{row[1]}'") | |
| print(f"BaseURL: '{row[2]}'") | |
| # Check if any products exist (for menu) | |
| cursor = conn.execute("SELECT COUNT(*) FROM products WHERE is_active=1 AND is_available=1") | |
| count = cursor.fetchone()[0] | |
| print(f"Active products: {count}") | |
| conn.close() | |