DB Objects
Last updated
Last updated
All db objects (Tables, views, functions etc) are lowercase, the migration does this. Please create new ones and call them from code accordingly.
DB Triggers: we will do a global trigger for modifiziert_am/von and link it to all needed tables. Details to follow
PKs: NOT DEFERRED, NOT DEFERRABLE (otherwise we canât create FKs for them)
FKs: DEFERRABLE INITIALLY DEFERRED
Deferrable means that the integrity of data in FKs will be checked only at Commit;
Initially deferred means that after an insert the data will be checked only at Commit;
To modify data that is part of PKs/FKs you need to use the command âSET CONSTRAINTS ALL DEFERRED;â. See page
Please note that in PG Admin you will see âDeferrableâ checked (correct) but also âDeferredâ checked (partially correct, because itâs INITIALLY DEFERRED). Donât create FKs with DEFERRED (without the keyword INITIALLY)