-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable symbology triggers instead of dropping #88
Disable symbology triggers instead of dropping #88
Conversation
@cymed I now get the following error on INTERLIS import with the latest database version: https://github.com/teksi/wastewater/actions/runs/7556220562/artifacts/1175190367 Ein Fehler trat bei der Ausführung von Python-Code auf: sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) FEHLER: Funktion tww_sys.drop_symbology_triggers() existiert nicht LINE 1: SELECT tww_sys.drop_symbology_triggers(); ^ HINT: Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen. [SQL: SELECT tww_sys.drop_symbology_triggers();] (Background on this error at: http://sqlalche.me/e/13/f405) The above exception was the direct cause of the following exception: Traceback (most recent call last): [SQL: SELECT tww_sys.drop_symbology_triggers();] Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] Python-Pfad: |
Disabling rather than dropping sounds good, but I'm not convinced by the complexity of maintaining a table with the triggers and the fact of using execute format. |
for more information, see https://pre-commit.ci
To drop or disable a trigger, one must own the table.
It is better practice to disable the trigger, as one can see what is enabled/disabled easier.
Also, a new table tww_sys.symbology_triggers is introduced, which allows handling trigger enabling/disabling dynamically