Skip to content

Commit

Permalink
Update entity related SQL stored procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Apr 18, 2024
1 parent 12eef17 commit 5815f1b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Changed
https://deps.dev/advisory/osv/GHSA-h5c8-rqwp-cp95
- Do not add ``descriptor_schema`` to automatically created entities

Fix
---
- Refresh the entity related SQL stored procedures


===================
38.6.0 - 2024-04-15
Expand Down
20 changes: 20 additions & 0 deletions resolwe/flow/migrations/0024_update_sql_entity_methods.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.1.7 on 2021-10-12 10:39
import os

from django.db import connection, migrations


def load_triggers(apps, schema_editor):
file_names = ["triggers_entity.sql"]
with connection.cursor() as c:
for file_name in file_names:
file_path = os.path.join(os.path.dirname(__file__), file_name)
with open(file_path) as fh:
sql_statement = fh.read()
c.execute(sql_statement)


class Migration(migrations.Migration):
dependencies = [("flow", "0023_remove_entity_descriptor_and_more")]

operations = [migrations.RunPython(load_triggers)]

0 comments on commit 5815f1b

Please sign in to comment.