diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 3717b76c3..1d7265b37 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -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 diff --git a/resolwe/flow/migrations/0024_update_sql_entity_methods.py b/resolwe/flow/migrations/0024_update_sql_entity_methods.py new file mode 100644 index 000000000..721e18357 --- /dev/null +++ b/resolwe/flow/migrations/0024_update_sql_entity_methods.py @@ -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)]