diff --git a/lamindb_setup/core/_private_django_api.py b/lamindb_setup/core/_private_django_api.py index 92848184d..7f24a4ec4 100644 --- a/lamindb_setup/core/_private_django_api.py +++ b/lamindb_setup/core/_private_django_api.py @@ -37,7 +37,6 @@ def private_django_api(reverse=False): "MultipleObjectsReturned", "add_to_class", "adelete", - "refresh_from_db", "asave", "clean", "clean_fields", diff --git a/lamindb_setup/core/django.py b/lamindb_setup/core/django.py index 668dada0c..024395ef3 100644 --- a/lamindb_setup/core/django.py +++ b/lamindb_setup/core/django.py @@ -238,6 +238,8 @@ def setup_django( if view_schema: installed_apps = installed_apps[::-1] # to fix how apps appear installed_apps += ["schema_graph", "django.contrib.staticfiles"] + if isettings.dialect == "postgresql": + installed_apps.insert(0, "pgtrigger") kwargs = dict( INSTALLED_APPS=installed_apps, diff --git a/pyproject.toml b/pyproject.toml index 11e70310f..ae3aed415 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ dependencies = [ # External dependencies "django>=5.2,<5.3", "dj_database_url>=1.3.0,<3.0.0", + "django-pgtrigger", # 30kB pure python, no dependencies "pydantic-settings", "platformdirs<5.0.0", "httpx_retries<1.0.0",