0016_auto_20250125_1733.py 729 B

1234567891011121314151617181920212223242526
  1. # Generated by Django 5.1.5 on 2025-01-25 17:33
  2. import os
  3. from django.db import migrations
  4. from django.db.migrations import RunSQL
  5. def get_sql_content(filename):
  6. """Helper to read SQL from a file."""
  7. sql_dir = os.path.join(os.path.dirname(__file__), "./sql")
  8. file_path = os.path.join(sql_dir, filename)
  9. with open(file_path, "r") as f:
  10. return f.read()
  11. class Migration(migrations.Migration):
  12. dependencies = [
  13. ("projects", "0015_rename_label_projectkey_name_projectkey_is_active"),
  14. ]
  15. operations = [
  16. RunSQL(
  17. sql=get_sql_content("get_project_auth_info.sql"),
  18. reverse_sql="DROP FUNCTION IF EXISTS get_project_auth_info(INTEGER, UUID);",
  19. )
  20. ]