- 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.
23 lines
564 B
Python
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()
|