Native PostgreSQL Schema Script: postgres.sql - Roles and services

Last modified 09 Jul 2026 21:46 UTC

This page documents schema objects parsed from config/sql/native/postgres.sql.

Region: Roles and services

Abstract roles, roles, services, archetypes, policies, applications, and related object tables.

Tables

m_abstract_role

Abstract base table for role-like focus objects that can be assigned or requested.

XSD type: http://midpoint.evolveum.com/xml/ns/public/common/common-3#AbstractRoleType

Inherits from: m_focus

No primary key is defined directly on this table. The table inherits from m_focus.

Columns

Column Type Required / constraints Description

objectType

ObjectType

required

autoAssignEnabled

BOOLEAN

Whether auto-assignment is enabled for this abstract role.

displayNameOrig

TEXT

Display name in original form.

displayNameNorm

TEXT

Display name in normalized form used for searches.

identifier

TEXT

Business or application identifier of the abstract role.

requestable

BOOLEAN

Whether this abstract role can be requested.

riskLevel

TEXT

Risk level associated with the abstract role.

m_application

Stores application objects used to model applications and application access.

XSD type: http://midpoint.evolveum.com/xml/ns/public/common/common-3#ApplicationType

Inherits from: m_abstract_role

Columns

Column Type Required / constraints Description

oid

UUID

primary key, required

Application object identifier.

objectType

ObjectType

Indexes

Name Columns Purpose / notes

m_application_nameOrig_idx

nameOrig

Speeds up lookup by original object name. Used for: original name searches

m_application_nameNorm_key

nameNorm

Enforces unique normalized object names and speeds up exact name lookup. Used for: normalized name lookup and uniqueness checks. unique

m_application_subtypes_idx

USING gin (subtypes)

Speeds up filtering by object subtype. Used for: subtype filters

m_application_identifier_idx

identifier

Speeds up lookup by abstract role identifier. Used for: identifier searches

m_application_validFrom_idx

validFrom

Speeds up filtering by activation validity start time. Used for: validity interval filters

m_application_validTo_idx

validTo

Speeds up filtering by activation validity end time. Used for: validity interval filters

m_application_fullTextInfo_idx

USING gin (fullTextInfo)

Speeds up full-text-like object searches. Used for: full-text-like object searches

m_application_createTimestamp_idx

createTimestamp

Speeds up filtering or ordering by creation time. Used for: creation time filters and ordering

m_application_modifyTimestamp_idx

modifyTimestamp

Speeds up filtering or ordering by modification time. Used for: modification time filters and ordering

Foreign keys

Column References

oid

m_object_oid.oid

m_archetype

Stores archetype objects used to classify and constrain other objects.

XSD type: http://midpoint.evolveum.com/xml/ns/public/common/common-3#ArchetypeType

Inherits from: m_abstract_role

Columns

Column Type Required / constraints Description

oid

UUID

primary key, required

Archetype object identifier.

objectType

ObjectType

Indexes

Name Columns Purpose / notes

m_archetype_nameOrig_idx

nameOrig

Speeds up lookup by original object name. Used for: original name searches

m_archetype_nameNorm_key

nameNorm

Enforces unique normalized object names and speeds up exact name lookup. Used for: normalized name lookup and uniqueness checks. unique

m_archetype_subtypes_idx

USING gin (subtypes)

Speeds up filtering by object subtype. Used for: subtype filters

m_archetype_identifier_idx

identifier

Speeds up lookup by abstract role identifier. Used for: identifier searches

m_archetype_validFrom_idx

validFrom

Speeds up filtering by activation validity start time. Used for: validity interval filters

m_archetype_validTo_idx

validTo

Speeds up filtering by activation validity end time. Used for: validity interval filters

m_archetype_fullTextInfo_idx

USING gin (fullTextInfo)

Speeds up full-text-like object searches. Used for: full-text-like object searches

m_archetype_createTimestamp_idx

createTimestamp

Speeds up filtering or ordering by creation time. Used for: creation time filters and ordering

m_archetype_modifyTimestamp_idx

modifyTimestamp

Speeds up filtering or ordering by modification time. Used for: modification time filters and ordering

Foreign keys

Column References

oid

m_object_oid.oid

m_policy

Stores policy objects that define reusable policy behavior.

XSD type: http://midpoint.evolveum.com/xml/ns/public/common/common-3#PolicyType

Inherits from: m_abstract_role

Columns

Column Type Required / constraints Description

oid

UUID

primary key, required

Policy object identifier.

objectType

ObjectType

Indexes

Name Columns Purpose / notes

m_policy_nameOrig_idx

nameOrig

Speeds up lookup by original object name. Used for: original name searches

m_policy_nameNorm_key

nameNorm

Enforces unique normalized object names and speeds up exact name lookup. Used for: normalized name lookup and uniqueness checks. unique

m_policy_subtypes_idx

USING gin (subtypes)

Speeds up filtering by object subtype. Used for: subtype filters

m_policy_identifier_idx

identifier

Speeds up lookup by abstract role identifier. Used for: identifier searches

m_policy_validFrom_idx

validFrom

Speeds up filtering by activation validity start time. Used for: validity interval filters

m_policy_validTo_idx

validTo

Speeds up filtering by activation validity end time. Used for: validity interval filters

m_policy_fullTextInfo_idx

USING gin (fullTextInfo)

Speeds up full-text-like object searches. Used for: full-text-like object searches

m_policy_createTimestamp_idx

createTimestamp

Speeds up filtering or ordering by creation time. Used for: creation time filters and ordering

m_policy_modifyTimestamp_idx

modifyTimestamp

Speeds up filtering or ordering by modification time. Used for: modification time filters and ordering

Foreign keys

Column References

oid

m_object_oid.oid

m_role

Stores role objects used to model access, business roles, and technical roles.

XSD type: http://midpoint.evolveum.com/xml/ns/public/common/common-3#RoleType

Inherits from: m_abstract_role

Columns

Column Type Required / constraints Description

oid

UUID

primary key, required

Role object identifier.

objectType

ObjectType

Indexes

Name Columns Purpose / notes

m_role_nameOrig_idx

nameOrig

Speeds up lookup by original object name. Used for: original name searches

m_role_nameNorm_key

nameNorm

Enforces unique normalized object names and speeds up exact name lookup. Used for: normalized name lookup and uniqueness checks. unique

m_role_subtypes_idx

USING gin (subtypes)

Speeds up filtering by object subtype. Used for: subtype filters

m_role_identifier_idx

identifier

Speeds up lookup by abstract role identifier. Used for: identifier searches

m_role_validFrom_idx

validFrom

Speeds up filtering by activation validity start time. Used for: validity interval filters

m_role_validTo_idx

validTo

Speeds up filtering by activation validity end time. Used for: validity interval filters

m_role_fullTextInfo_idx

USING gin (fullTextInfo)

Speeds up full-text-like object searches. Used for: full-text-like object searches

m_role_createTimestamp_idx

createTimestamp

Speeds up filtering or ordering by creation time. Used for: creation time filters and ordering

m_role_modifyTimestamp_idx

modifyTimestamp

Speeds up filtering or ordering by modification time. Used for: modification time filters and ordering

Foreign keys

Column References

oid

m_object_oid.oid

m_service

Stores service objects, including service accounts and application services.

XSD type: http://midpoint.evolveum.com/xml/ns/public/common/common-3#ServiceType

Inherits from: m_abstract_role

Columns

Column Type Required / constraints Description

oid

UUID

primary key, required

Service object identifier.

objectType

ObjectType

displayOrder

INTEGER

Display ordering value for service presentation.

Indexes

Name Columns Purpose / notes

m_service_nameOrig_idx

nameOrig

Speeds up lookup by original object name. Used for: original name searches

m_service_nameNorm_key

nameNorm

Enforces unique normalized object names and speeds up exact name lookup. Used for: normalized name lookup and uniqueness checks. unique

m_service_subtypes_idx

USING gin (subtypes)

Speeds up filtering by object subtype. Used for: subtype filters

m_service_identifier_idx

identifier

Speeds up lookup by abstract role identifier. Used for: identifier searches

m_service_validFrom_idx

validFrom

Speeds up filtering by activation validity start time. Used for: validity interval filters

m_service_validTo_idx

validTo

Speeds up filtering by activation validity end time. Used for: validity interval filters

m_service_fullTextInfo_idx

USING gin (fullTextInfo)

Speeds up full-text-like object searches. Used for: full-text-like object searches

m_service_createTimestamp_idx

createTimestamp

Speeds up filtering or ordering by creation time. Used for: creation time filters and ordering

m_service_modifyTimestamp_idx

modifyTimestamp

Speeds up filtering or ordering by modification time. Used for: modification time filters and ordering

Foreign keys

Column References

oid

m_object_oid.oid

Triggers

Triggers run routines automatically when table rows are inserted, updated, or deleted.

Trigger Description Table Executes

m_application_oid_delete_tr

Removes the object OID registry entry when rows are deleted from m_application.

m_application

delete_object_oid

m_application_oid_insert_tr

Maintains the object OID registry when rows are inserted into m_application.

m_application

insert_object_oid

m_application_update_tr

Maintains object update metadata before rows are updated in m_application.

m_application

before_update_object

m_archetype_oid_delete_tr

Removes the object OID registry entry when rows are deleted from m_archetype.

m_archetype

delete_object_oid

m_archetype_oid_insert_tr

Maintains the object OID registry when rows are inserted into m_archetype.

m_archetype

insert_object_oid

m_archetype_update_tr

Maintains object update metadata before rows are updated in m_archetype.

m_archetype

before_update_object

m_policy_oid_delete_tr

Removes the object OID registry entry when rows are deleted from m_policy.

m_policy

delete_object_oid

m_policy_oid_insert_tr

Maintains the object OID registry when rows are inserted into m_policy.

m_policy

insert_object_oid

m_policy_update_tr

Maintains object update metadata before rows are updated in m_policy.

m_policy

before_update_object

m_role_oid_delete_tr

Removes the object OID registry entry when rows are deleted from m_role.

m_role

delete_object_oid

m_role_oid_insert_tr

Maintains the object OID registry when rows are inserted into m_role.

m_role

insert_object_oid

m_role_update_tr

Maintains object update metadata before rows are updated in m_role.

m_role

before_update_object

m_service_oid_delete_tr

Removes the object OID registry entry when rows are deleted from m_service.

m_service

delete_object_oid

m_service_oid_insert_tr

Maintains the object OID registry when rows are inserted into m_service.

m_service

insert_object_oid

m_service_update_tr

Maintains object update metadata before rows are updated in m_service.

m_service

before_update_object

Was this page helpful?
YES NO
Thanks for your feedback