Coverage for check_tables.py: 0%

13 statements  

« prev     ^ index     » next       coverage.py v7.16.0, created at 2026-10-17 16:50 +0800

1import sqlite3 

2c = sqlite3.connect('db.sqlite3') 

3cur = c.cursor() 

4cur.execute("SELECT name FROM sqlite_master WHERE type='table' AND name LIKE 'erp_%'") 

5print("ERP tables:", [r[0] for r in cur.fetchall()]) 

6cur.execute("SELECT app, name FROM django_migrations WHERE app='erp'") 

7print("ERP migrations:", list(cur.fetchall())) 

8cur.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='erp_shipment'") 

9print("erp_shipment exists:", cur.fetchone()) 

10cur.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='erp_account'") 

11print("erp_account exists:", cur.fetchone()) 

12cur.execute("SELECT name FROM sqlite_master WHERE type='table'") 

13print("\nAll tables:", [r[0] for r in cur.fetchall()])