- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
26 lines
869 B
Python
26 lines
869 B
Python
from sqlalchemy import create_engine
|
|
from sqlalchemy.sql import text
|
|
from app.core.config.Config import settings
|
|
|
|
engines = [
|
|
create_engine(settings.CORE_DATABASE_URL),
|
|
create_engine(settings.CRM_DATABASE_URL),
|
|
create_engine(settings.COMMERCE_DATABASE_URL)
|
|
]
|
|
|
|
for engine in engines:
|
|
try:
|
|
with engine.connect() as conn:
|
|
try:
|
|
conn.execute(text("ALTER TABLE service_jobs CHANGE replaced_part_number replaced_part_numbers JSON;"))
|
|
print("Altered service_jobs in", engine.url)
|
|
except Exception as e:
|
|
pass
|
|
|
|
try:
|
|
conn.execute(text("ALTER TABLE order_items ADD COLUMN part_numbers JSON;"))
|
|
print("Altered order_items in", engine.url)
|
|
except Exception as e:
|
|
pass
|
|
except Exception:
|
|
pass
|