bmc_hub/apply_migration_150.py
Christian bc504b9257 feat: Add subscription management functionality and AnyDesk API integration
- Implemented subscription creation, updating, and rendering in script_9.js.
- Added functions for handling subscription line items, product selection, and total calculations.
- Integrated AnyDesk API for session management in test_anydesk.py.
- Created REST client test requests for API endpoints in api.http.
- Developed a script to check ESET machine status and save details in tmp_check_eset_machine.py.
2026-03-30 07:50:15 +02:00

23 lines
564 B
Python

import psycopg2
from app.core.config import settings
def apply_migration():
conn = psycopg2.connect(settings.DATABASE_URL)
conn.autocommit = True
cur = conn.cursor()
try:
with open('migrations/150_sag_tidsforbrug_v1.sql', 'r') as f:
sql = f.read()
cur.execute(sql)
print("Migration 150 applied successfully.")
except Exception as e:
print(f"Error applying migration 150: {e}")
finally:
cur.close()
conn.close()
if __name__ == "__main__":
apply_migration()