Path: redb/redb.MSSql/sql/v2-pvt/31_node_permissions_trigger.sql Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.MSSql/sql/v2-pvt/31_node_permissions_trigger.sql ---- -- ===================================================== -- tr_auto_create_node_permissions: disabled, as on PostgreSQL -- ===================================================== -- The trigger (sql/redb_permissions.sql, created at installation) copies an inherited permission onto the parent of a -- new child object. PostgreSQL creates it disabled (redbPostgre.sql: ALTER TABLE _objects DISABLE TRIGGER ...), and -- SQL Server never ran it either: the bulk copy of new objects did not fire triggers. From module 0.2.41 the bulk copy -- fires triggers and checks the foreign keys (FireTriggers | CheckConstraints), so the trigger is disabled here to keep -- the two providers saving the same rows. It rides the versioned bundle so existing databases get it on the next start. -- ===================================================== IF OBJECT_ID(N'dbo.tr_auto_create_node_permissions', N'TR') IS NOT NULL AND OBJECTPROPERTY(OBJECT_ID(N'dbo.tr_auto_create_node_permissions'), 'ExecIsTriggerDisabled') = 0 ALTER TABLE [dbo].[_objects] DISABLE TRIGGER [tr_auto_create_node_permissions]; GO