[
  {
    "tableName": "_System_Object",
    "keyPrefix": "!j0",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Object metadata definitions",
    "requiredWritePermission": "ModifyMetadata",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.object-catalog.v1",
      "semanticFields": ["ApiName", "IsDeleted"]
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "KeyPrefix",
        "label": "Key Prefix",
        "type": "VARCHAR(3)",
        "nullable": true
      },
      {
        "name": "TableType",
        "label": "Table Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'custom_object'"
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PluralLabel",
        "label": "Plural Label",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AppId",
        "label": "App",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Icon",
        "label": "Icon",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ThemeColor",
        "label": "Theme Color",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsCustom",
        "label": "Custom Object",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CustomSetting",
        "label": "Custom Setting",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": true,
        "description": "Canonical persisted Salesforce-compatible object fact indicating this object is a Custom Setting. Repair and describe readers must use this fact instead of inferring from table type or object name."
      },
      {
        "name": "Searchable",
        "label": "Searchable",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "SharingModel",
        "label": "Sharing Model",
        "type": "VARCHAR(255)",
        "default": "'Private'"
      },
      {
        "name": "IsCustomized",
        "label": "Is Customized",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "EnableHierarchySharing",
        "label": "Enable Hierarchy Sharing",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": true
      },
      {
        "name": "RequiredWritePermission",
        "label": "Required Write Permission",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "RequiredReadPermission",
        "label": "Required Read Permission",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AccessPolicy",
        "label": "Access Policy",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "AccessPolicyRecordMutationPackName",
        "label": "Access Policy Record Mutation Pack Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed pack that declared the pack-owned AccessPolicy.recordMutation value for this object."
      },
      {
        "name": "AccessPolicyRecordMutationPackBusinessKey",
        "label": "Access Policy Record Mutation Pack Business Key",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed object_record_mutation_policy business key that declared the pack-owned AccessPolicy.recordMutation value."
      },
      {
        "name": "AccessPolicyRecordMutationPackManageability",
        "label": "Access Policy Record Mutation Pack Manageability",
        "type": "VARCHAR(64)",
        "nullable": true,
        "description": "Source-backed object_record_mutation_policy manageability contract for AccessPolicy.recordMutation."
      },
      {
        "name": "AccessPolicyRecordMutationPackValue",
        "label": "Access Policy Record Mutation Pack Value",
        "type": "JSON",
        "nullable": true,
        "description": "Pack-owned AccessPolicy.recordMutation payload used to detect drift and sweep stale declarations."
      },
      {
        "name": "AccessPolicyLifecyclePackName",
        "label": "Access Policy Lifecycle Pack Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed pack that declared the pack-owned AccessPolicy.lifecycle value for this object."
      },
      {
        "name": "AccessPolicyLifecyclePackBusinessKey",
        "label": "Access Policy Lifecycle Pack Business Key",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed object_lifecycle_policy business key that declared the pack-owned AccessPolicy.lifecycle value."
      },
      {
        "name": "AccessPolicyLifecyclePackManageability",
        "label": "Access Policy Lifecycle Pack Manageability",
        "type": "VARCHAR(64)",
        "nullable": true,
        "description": "Source-backed object_lifecycle_policy manageability contract for AccessPolicy.lifecycle."
      },
      {
        "name": "AccessPolicyLifecyclePackValue",
        "label": "Access Policy Lifecycle Pack Value",
        "type": "JSON",
        "nullable": true,
        "description": "Pack-owned AccessPolicy.lifecycle payload used to detect drift and sweep stale declarations."
      },
      {
        "name": "DeleteMode",
        "label": "Delete Mode",
        "type": "VARCHAR(50)",
        "nullable": true
      },
      {
        "name": "PathField",
        "label": "Path Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "DisplayNameField",
        "label": "Display Name Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LockRule",
        "label": "Lock Rule",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ReadSource",
        "label": "Read Source",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "LockRuleCustomized",
        "label": "Lock Rule Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "description": "Column-scoped override bit for LockRule. Pack apply and verify own the executable LockRule contract only while this flag is 0; unrelated object-row customization must not transfer ownership of the executable metadata fact."
      },
      {
        "name": "ListFields",
        "label": "List Fields",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "ListFieldsCustomized",
        "label": "List Fields Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "description": "Column-scoped override bit for ListFields. Pack apply owns ListFields only while this flag is 0; admin list-field edits set it to 1 without marking the whole object row as package-owned or package-drifted."
      },
      {
        "name": "ChildCloneRules",
        "label": "Child Clone Rules",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "ChildCloneRulesCustomized",
        "label": "Child Clone Rules Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "description": "Column-scoped override bit for ChildCloneRules. Pack apply and verify own executable child-clone contracts only while this flag is 0; unrelated object-row customization must not transfer ownership of the executable metadata fact."
      },
      {
        "name": "ChildCloneRulesPackName",
        "label": "Child Clone Rules Pack Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed pack that declared the pack-owned ChildCloneRules value. L2 tenant apply reads this persisted owner instead of resolving the original pack source."
      },
      {
        "name": "ChildCloneRulesPackBusinessKey",
        "label": "Child Clone Rules Pack Business Key",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed object_spec business key that declared the pack-owned ChildCloneRules value."
      },
      {
        "name": "ChildCloneRulesPackManageability",
        "label": "Child Clone Rules Pack Manageability",
        "type": "VARCHAR(64)",
        "nullable": true,
        "description": "Object-spec manageability for the pack-owned ChildCloneRules value."
      },
      {
        "name": "ChildCloneRulesPackValue",
        "label": "Child Clone Rules Pack Value",
        "type": "JSON",
        "nullable": true,
        "description": "Pack-owned ChildCloneRules payload used to restore defaults_only rows when an L2 override is removed."
      },
      {
        "name": "ExclusiveSiblingFields",
        "label": "Exclusive Sibling Fields",
        "type": "JSON",
        "nullable": true,
        "description": "Generic executable metadata declaring boolean fields that are exclusive among records sharing a reference partition."
      },
      {
        "name": "ExclusiveSiblingFieldsCustomized",
        "label": "Exclusive Sibling Fields Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "description": "Column-scoped override bit for ExclusiveSiblingFields. Pack apply and verify own executable sibling-exclusivity contracts only while this flag is 0; unrelated object-row customization must not transfer ownership of the executable metadata fact."
      },
      {
        "name": "ExclusiveSiblingFieldsPackName",
        "label": "Exclusive Sibling Fields Pack Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed pack that declared the pack-owned ExclusiveSiblingFields value. L2 tenant apply reads this persisted owner instead of resolving the original pack source."
      },
      {
        "name": "ExclusiveSiblingFieldsPackBusinessKey",
        "label": "Exclusive Sibling Fields Pack Business Key",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Source-backed object_spec business key that declared the pack-owned ExclusiveSiblingFields value."
      },
      {
        "name": "ExclusiveSiblingFieldsPackManageability",
        "label": "Exclusive Sibling Fields Pack Manageability",
        "type": "VARCHAR(64)",
        "nullable": true,
        "description": "Object-spec manageability for the pack-owned ExclusiveSiblingFields value."
      },
      {
        "name": "ExclusiveSiblingFieldsPackValue",
        "label": "Exclusive Sibling Fields Pack Value",
        "type": "JSON",
        "nullable": true,
        "description": "Pack-owned ExclusiveSiblingFields payload used to restore defaults_only rows when an L2 override is removed."
      },
      {
        "name": "DefaultChildRows",
        "label": "Default Child Rows",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "DefaultChildRowsCustomized",
        "label": "Default Child Rows Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "description": "Column-scoped override bit for DefaultChildRows. Pack apply and verify own executable default-child-row contracts only while this flag is 0; unrelated object-row customization must not transfer ownership of the executable metadata fact."
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Iscustom"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Field",
    "keyPrefix": "!k0",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Field metadata definitions",
    "requiredWritePermission": "ModifyMetadata",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectId",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PhysicalName",
        "label": "Physical Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Actual physical column name in the database if different from api_name (for aliasing)"
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Required",
        "label": "Required",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsUnique",
        "label": "Unique",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsSystem",
        "label": "System Field",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsNameField",
        "label": "Name Field",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "Createable",
        "label": "Createable",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "Updateable",
        "label": "Updateable",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "Indexed",
        "label": "Indexed",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "Options",
        "label": "Options",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "ReferenceTo",
        "label": "Reference To",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "WritableReferenceTo",
        "label": "Writable Reference To",
        "type": "JSON",
        "nullable": true,
        "description": "Optional user-context writable subset of ReferenceTo. NULL means all declared targets are writable; trusted platform contexts may write any declared target."
      },
      {
        "name": "DeleteRule",
        "label": "Delete Rule",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Formula",
        "label": "Formula",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ReturnType",
        "label": "Return Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "FormulaMode",
        "label": "Formula Mode",
        "type": "VARCHAR(50)",
        "nullable": true,
        "description": "Formula computation mode: active (TiDB View read-time compute), frozen (write-time engine snapshot)"
      },
      {
        "name": "FormulaStorageMode",
        "label": "Formula Storage Mode",
        "type": "VARCHAR(50)",
        "nullable": true,
        "description": "Resolver-authored storage override for formula-backed fields: active formulas default to view_only and opt into write_materialized only when explicitly authored."
      },
      {
        "name": "ProjectionConfig",
        "label": "Projection Config",
        "type": "JSON",
        "nullable": true,
        "description": "Internal L1 metadata projection config for standard computed fields."
      },
      {
        "name": "DefaultValue",
        "label": "Default Value",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "sibling_max_parent_field",
        "label": "Sibling Max Parent Field",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Parent lookup field used by the sibling-max create default resolver. When the target field is omitted on create, the records engine writes MAX(target)+1 among non-deleted rows with the same parent."
      },
      {
        "name": "HelpText",
        "label": "Help Text",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "TrackHistory",
        "label": "Track History",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "HistoryTrackingRevision",
        "label": "History Tracking Revision",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "description": "Internal optimistic-CAS revision for TrackHistory transitions."
      },
      {
        "name": "MinValue",
        "label": "Min Value",
        "type": "DECIMAL(18,4)",
        "nullable": true
      },
      {
        "name": "MaxValue",
        "label": "Max Value",
        "type": "DECIMAL(18,4)",
        "nullable": true
      },
      {
        "name": "MinLength",
        "label": "Min Length",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "MaxLength",
        "label": "Max Length",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "Regex",
        "label": "Regex Pattern",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "RegexMessage",
        "label": "Regex Message",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Validator",
        "label": "Validator",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ValidatorConfig",
        "label": "Validator Config",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ControllingField",
        "label": "Controlling Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "PicklistDependency",
        "label": "Picklist Dependency",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "RollupConfig",
        "label": "Rollup Config",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "IsMasterDetail",
        "label": "Master-Detail",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsPolymorphic",
        "label": "Polymorphic",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "RelationshipName",
        "label": "Relationship Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ChildRelationshipName",
        "label": "Child Relationship Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Authoritative child-side relationship name for reference / master-detail FK fields. This is what Salesforce publishes as describe(parent).childRelationships[*].relationshipName and what SOQL parent-child subqueries (SELECT (SELECT ... FROM Contacts) FROM Account) bind to. Generic FK substrate (parallels parent-side RelationshipName); not L1/CRM-application shape. NULL is permitted on greenfield L0 and on installed packs that pre-date the column; runtime read paths must fail-closed when an FK lookup needs the value but the row is NULL — see issue #153 F1 4-state truth table."
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "Set to 1 when an admin modifies this field via UI/API. Bootstrap will not overwrite customized fields."
      },
      {
        "name": "OwnerKind",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "''",
        "label": "Owner Kind",
        "description": "Field fact ownership discriminator. Values are pack, admin, or runtime. Empty means legacy ownerless and must be adopted or rejected by install/verify."
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Owner Pack",
        "description": "Installed pack name when OwnerKind=pack. NULL for admin/runtime-owned field facts."
      },
      {
        "name": "WriteProtectionPolicy",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Write Protection Policy",
        "writeProtectionPolicy": "authority_only",
        "description": "Generic field write-protection policy. trusted_only admits trusted platform records contexts and immutable_after_create admits only initial generic assignment. authority_only is reserved to exact declarations in this embedded system-table catalog; generic metadata and record writers cannot introduce, weaken, or remove it."
      },
      {
        "name": "ReadProtectionPolicy",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Read Protection Policy",
        "description": "Generic field read-protection policy. blocked means generic record/query paths must never return this field."
      },
      {
        "name": "auto_number_format",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Auto Number Format",
        "description": "Autonumber Engine v2: display format string with tokens (e.g. 'Q-{YYYY}-{0000}'). PRD §4.3; raw VARCHAR(200) upgraded to 255 to match system_tables VARCHAR whitelist."
      },
      {
        "name": "auto_number_scope",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Auto Number Scope",
        "description": "Autonumber Engine v2: counter scope — 'global' or 'per_day'. PRD §4.3."
      },
      {
        "name": "auto_number_start",
        "type": "BIGINT",
        "nullable": true,
        "default": "1",
        "label": "Auto Number Start",
        "description": "Autonumber Engine v2: starting counter value. PRD §4.3."
      },
      {
        "name": "auto_number_token_refs",
        "type": "JSON",
        "nullable": true,
        "label": "Auto Number Token Refs",
        "description": "Autonumber Engine v2: canonicalized token reference array extracted from the format. PRD §4.3."
      },
      {
        "name": "auto_number_canonical_hash",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Auto Number Canonical Hash",
        "description": "Autonumber Engine v2: sha256 hex of canonicalized (format, scope, token_refs, start) — used for drift detection. PRD §4.3; raw CHAR(64) swapped to VARCHAR(64) to match system_tables VARCHAR whitelist."
      },
      {
        "name": "auto_number_counter_reset_policy",
        "type": "VARCHAR(32)",
        "nullable": true,
        "default": "'none'",
        "label": "Auto Number Counter Reset Policy",
        "description": "Autonumber Engine v2: counter reset policy — 'none' (default) or future policies. PRD §4.3."
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectId"
        ]
      },
      {
        "columns": [
          "Type"
        ]
      },
      {
        "columns": [
          "ObjectId",
          "ApiName"
        ],
        "unique": true
      },
      {
        "columns": [
          "OwnerKind",
          "OwnerPack"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ObjectId",
        "references": "_System_Object(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_FieldHistorySequence",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Canonical per-field serialization authority for history facts and tracking transitions.",
    "columns": [
      {
        "name": "FieldId",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Field Id"
      },
      {
        "name": "CurrentSequence",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Current Sequence"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_FieldHistoryTrackingInterval",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Strict temporal eligibility intervals for field history facts.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Id"
      },
      {
        "name": "OpenFieldId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Open Field Id",
        "description": "Equals FieldId only while this interval is open; the unique index permits at most one open interval per field."
      },
      {
        "name": "StartedSequence",
        "type": "BIGINT",
        "nullable": false,
        "label": "Started Sequence"
      },
      {
        "name": "EndedSequence",
        "type": "BIGINT",
        "nullable": true,
        "label": "Ended Sequence"
      },
      {
        "name": "StartedAt",
        "type": "DATETIME(6)",
        "nullable": false,
        "label": "Started At"
      },
      {
        "name": "EndedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Ended At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_field_history_interval",
        "columns": [
          "FieldId",
          "StartedSequence",
          "EndedSequence"
        ]
      },
      {
        "name": "uk_field_history_open",
        "columns": [
          "OpenFieldId"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_Table",
    "keyPrefix": "!l0",
    "tableType": "system_core",
    "category": "registry",
    "description": "Meta-metadata registry cataloging all tables",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "TableName",
        "label": "Table Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "TableType",
        "label": "Table Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'custom_object'"
      },
      {
        "name": "Category",
        "label": "Category",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsManaged",
        "label": "Managed",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "SchemaVersion",
        "label": "Schema Version",
        "type": "VARCHAR(255)",
        "default": "'1.0.0'"
      },
      {
        "name": "CreatedBy",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "default": "'bootstrap'"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Tabletype"
        ]
      },
      {
        "columns": [
          "Category"
        ]
      },
      {
        "columns": [
          "Ismanaged"
        ]
      }
    ]
  },
  {
    "tableName": "_System_InstalledPack",
    "tableType": "system_core",
    "category": "registry",
    "description": "Registry of application/distribution packs installed into this org. L0 reads this table to decide which app-pack Verify gates are in scope.",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "Name", "label": "Pack Name", "type": "VARCHAR(255)", "nullable": false, "unique": true },
      { "name": "PackInstallId", "label": "Pack Install Identity", "type": "VARCHAR(255)", "nullable": false, "default": "''", "description": "Fresh UUID minted on every install (including same-name rebirths via ON DUPLICATE KEY UPDATE). Downstream consumers (connector events queue scoping, Wave 2-5 substrate) key per-incarnation state on this value, not on Id which is deterministic from Name." },
      { "name": "Category", "label": "Pack Category", "type": "VARCHAR(64)", "nullable": false },
      { "name": "Status", "label": "Install Status", "type": "VARCHAR(64)", "nullable": false, "default": "'installing'" },
      { "name": "PackVersion", "label": "Pack Version", "type": "VARCHAR(64)", "nullable": true },
      { "name": "ManifestFormatVersion", "label": "Manifest Format Version", "type": "VARCHAR(32)", "nullable": true },
      { "name": "PlatformCompatibility", "label": "Platform Compatibility", "type": "TEXT", "nullable": true },
      { "name": "DesiredPayloadHash", "label": "Desired Payload Hash", "type": "VARCHAR(128)", "nullable": true },
      { "name": "AppliedPayloadHash", "label": "Applied Payload Hash", "type": "VARCHAR(128)", "nullable": true },
      { "name": "PayloadHashAlgorithm", "label": "Payload Hash Algorithm", "type": "VARCHAR(64)", "nullable": true },
      { "name": "SourceKind", "label": "Source Kind", "type": "VARCHAR(64)", "nullable": true },
      { "name": "SourceURI", "label": "Source URI", "type": "TEXT", "nullable": true },
      { "name": "SourceRevision", "label": "Source Revision", "type": "VARCHAR(255)", "nullable": true },
      { "name": "HostRequirementsDigest", "label": "Host Requirements Digest", "type": "VARCHAR(128)", "nullable": true, "description": "Independent source-convergence digest for manifest hostRequirements. Kept separate from payload hash so host compatibility changes refresh through apply/verify without changing component payload identity." },
      { "name": "RuntimeObjectSpecDeclarations", "label": "Runtime Object Spec Declarations", "type": "JSON", "nullable": true, "description": "Persisted runtime rebuild declaration for install/apply-owned object-spec payloads. Written only by explicit install/apply convergence." },
      { "name": "RuntimeRelatedListRules", "label": "Runtime Related List Rules", "type": "JSON", "nullable": true, "description": "Persisted runtime rebuild declaration for install/apply-owned related-list runtime rules. Written only by explicit install/apply convergence." },
      { "name": "RuntimeSearchScopeOrder", "label": "Runtime Search Scope Order", "type": "JSON", "nullable": true, "description": "Persisted runtime rebuild declaration for install/apply-owned search-scope runtime order. Written only by explicit install/apply convergence." },
      { "name": "RuntimeSearchAllDefaultFields", "label": "Runtime Search All Default Fields", "type": "JSON", "nullable": true, "description": "Persisted runtime rebuild declaration for install/apply-owned search_all_default_fields metadata. Written only by explicit install/apply convergence." },
      { "name": "RuntimeFormulaFunctionBundles", "label": "Runtime Formula Function Bundles", "type": "JSON", "nullable": true, "description": "Persisted runtime rebuild declaration for install/apply-owned formula_function_bundle metadata. Written only by explicit install/apply convergence." },
      { "name": "RuntimeStartupShallowDeclarations", "label": "Runtime Startup Shallow Declarations", "type": "JSON", "nullable": true, "description": "Persisted startup-shallow declaration cache for install/apply-owned non-object-spec pack surfaces. Written only by explicit install/apply convergence." },
      { "name": "InstallSource", "label": "Install Source", "type": "VARCHAR(64)", "nullable": true },
      { "name": "LastError", "label": "Last Error", "type": "TEXT", "nullable": true },
      { "name": "MigratedDate", "label": "Migrated Date", "type": "DATETIME", "nullable": true },
      { "name": "LastAppliedDate", "label": "Last Applied Date", "type": "DATETIME", "nullable": true },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "columns": ["Status"] },
      { "columns": ["Category"] },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_PackGeneration",
    "tableType": "system_core",
    "category": "registry",
    "label": "Pack Generation",
    "description": "Immutable source-backed runtime generation prepared independently of the active pack projection. Lifecycle writes prepare or retire generations here; runtime readers select only the generation named by _System_PackActivation.",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "PackInstallId", "label": "Pack Install Identity", "type": "VARCHAR(255)", "nullable": false, "description": "Immutable generation identity minted for a specific prepared source-backed installation." },
      { "name": "PackName", "label": "Pack Name", "type": "VARCHAR(255)", "nullable": false },
      { "name": "Category", "label": "Pack Category", "type": "VARCHAR(64)", "nullable": false },
      { "name": "Status", "label": "Generation Status", "type": "VARCHAR(64)", "nullable": false, "default": "'preparing'", "description": "Generic lifecycle state: preparing, active, draining, retired, failed_clean, failed_dirty, or indeterminate." },
      { "name": "PackVersion", "label": "Pack Version", "type": "VARCHAR(64)", "nullable": true },
      { "name": "ManifestFormatVersion", "label": "Manifest Format Version", "type": "VARCHAR(32)", "nullable": true },
      { "name": "PlatformCompatibility", "label": "Platform Compatibility", "type": "TEXT", "nullable": true },
      { "name": "DesiredPayloadHash", "label": "Desired Payload Hash", "type": "VARCHAR(128)", "nullable": true },
      { "name": "AppliedPayloadHash", "label": "Applied Payload Hash", "type": "VARCHAR(128)", "nullable": true },
      { "name": "PayloadHashAlgorithm", "label": "Payload Hash Algorithm", "type": "VARCHAR(64)", "nullable": true },
      { "name": "SourceKind", "label": "Source Kind", "type": "VARCHAR(64)", "nullable": true },
      { "name": "SourceURI", "label": "Source URI", "type": "TEXT", "nullable": true },
      { "name": "SourceRevision", "label": "Source Revision", "type": "VARCHAR(255)", "nullable": true },
      { "name": "HostRequirementsDigest", "label": "Host Requirements Digest", "type": "VARCHAR(128)", "nullable": true },
      { "name": "RuntimeObjectSpecDeclarations", "label": "Runtime Object Spec Declarations", "type": "JSON", "nullable": true },
      { "name": "RuntimeRelatedListRules", "label": "Runtime Related List Rules", "type": "JSON", "nullable": true },
      { "name": "RuntimeSearchScopeOrder", "label": "Runtime Search Scope Order", "type": "JSON", "nullable": true },
      { "name": "RuntimeSearchAllDefaultFields", "label": "Runtime Search All Default Fields", "type": "JSON", "nullable": true },
      { "name": "RuntimeFormulaFunctionBundles", "label": "Runtime Formula Function Bundles", "type": "JSON", "nullable": true },
      { "name": "RuntimeStartupShallowDeclarations", "label": "Runtime Startup Shallow Declarations", "type": "JSON", "nullable": true },
      { "name": "LastError", "label": "Last Error", "type": "TEXT", "nullable": true },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "name": "uq_pack_generation_install", "columns": ["PackInstallId"], "unique": true },
      { "name": "idx_pack_generation_name_status", "columns": ["PackName", "Status", "IsDeleted"] },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_PackGenerationConnectorBindingDefinitionSet",
    "tableType": "system_core",
    "category": "registry",
    "label": "Pack Generation Connector Binding Definition Set",
    "description": "Immutable completeness commitment for the Connector binding-definition set owned by one exact source-backed PackGeneration. One row is required even for an empty set; absence is a fail-closed legacy or incomplete generation, never an implicit empty set.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "PackGenerationId", "type": "VARCHAR(255)", "primaryKey": true, "label": "Pack Generation Id", "description": "Immutable PackGeneration coordinate and the sole identity of this set commitment. It retains the established parent FK collation for rolling schema compatibility; authority adapters must select with BINARY and validate the returned bytes exactly." },
      { "name": "Protocol", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Set Protocol", "description": "Closed neutral protocol that defines the digest preimage, canonical ordering, and validation rules." },
      { "name": "DefinitionCount", "type": "DECIMAL(20,0)", "nullable": false, "label": "Definition Count", "description": "Exact number of immutable child definitions committed by DefinitionSetDigest, including zero." },
      { "name": "DefinitionSetDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Set Digest", "description": "Domain-separated digest over the generation coordinate, protocol, count, canonical ordinal order, and every complete binding-definition envelope." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Control Plane never updates an immutable definition-set row." }
    ],
    "foreignKeys": [
      { "column": "PackGenerationId", "references": "_System_PackGeneration(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_PackGenerationConnectorBindingDefinition",
    "tableType": "system_core",
    "category": "registry",
    "label": "Pack Generation Connector Binding Definition",
    "description": "Immutable canonical definition owned by one exact source-backed PackGeneration definition set. The set header commits the complete ordered child set by protocol, count, and digest; readers must verify the entire set before disclosing any definition and never fall back to InstalledPack or live/current component projections.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Binding Definition Id", "description": "Deterministic immutable child-row identity derived from the exact generation and natural binding identity." },
      { "name": "PackGenerationId", "type": "VARCHAR(255)", "nullable": false, "label": "Pack Generation Id", "description": "Immutable set-header coordinate. It retains the established FK collation; authority adapters must select with BINARY and validate the returned bytes exactly." },
      { "name": "PackInstallId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Pack Install Identity", "description": "Redundant exact pack-install coordinate from the canonical envelope. Readers compare it byte-for-byte with the parent PackGeneration before accepting the set." },
      { "name": "DefinitionOrdinal", "type": "DECIMAL(20,0)", "nullable": false, "label": "Definition Ordinal", "description": "Zero-based contiguous position in canonical Kind then BusinessKey order." },
      { "name": "Kind", "type": "VARCHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Binding Kind" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Owner Pack" },
      { "name": "PackPayloadDigest", "type": "CHAR(85)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Pack Payload Digest", "description": "Exact nexus-pack-sha256-v1 payload identity of the immutable parent generation." },
      { "name": "BusinessKey", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Business Key" },
      { "name": "DefinitionVersion", "type": "DECIMAL(20,0)", "nullable": false, "label": "Definition Version" },
      { "name": "DefinitionEnvelopeDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Envelope Digest", "description": "Digest of the complete canonical connectorbindingownerv1 envelope bytes." },
      { "name": "DefinitionEnvelope", "type": "MEDIUMBLOB", "nullable": false, "label": "Definition Envelope", "description": "Canonical connectorbindingownerv1 JSON envelope containing the exact definition bytes and deterministic owner receipt; bounded to two MiB by the neutral contract." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Control Plane never updates immutable definition rows." }
    ],
    "indices": [
      { "name": "ux_pack_generation_binding_definition_ordinal", "columns": ["PackGenerationId", "DefinitionOrdinal"], "unique": true },
      { "name": "ux_pack_generation_binding_definition_identity", "columns": ["PackGenerationId", "Kind", "BusinessKey"], "unique": true }
    ],
    "foreignKeys": [
      { "column": "PackGenerationId", "references": "_System_PackGenerationConnectorBindingDefinitionSet(PackGenerationId)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_PackActivation",
    "tableType": "system_core",
    "category": "registry",
    "label": "Pack Activation",
    "description": "Single active-generation pointer per pack name. Switching this pointer is the sole runtime activation boundary; preparing a replacement generation must not mutate the active generation or compatibility projection.",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "PackName", "label": "Pack Name", "type": "VARCHAR(255)", "nullable": false },
      { "name": "ActivePackInstallId", "label": "Active Pack Install Identity", "type": "VARCHAR(255)", "nullable": false },
      { "name": "PreviousPackInstallId", "label": "Previous Pack Install Identity", "type": "VARCHAR(255)", "nullable": true },
      { "name": "ActivationEpoch", "label": "Activation Epoch", "type": "BIGINT", "nullable": false, "default": "0" },
      { "name": "ActivatedDate", "label": "Activated Date", "type": "DATETIME", "nullable": true },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "name": "uq_pack_activation_name", "columns": ["PackName"], "unique": true },
      { "columns": ["ActivePackInstallId"] },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ConnectorCapabilityDeclaration",
    "tableType": "system_core",
    "category": "registry",
    "label": "Connector Capability Declaration",
    "description": "Per-installed-pack source-declared connector capability bindings (namespace, kind). Written by the connector_capability ComponentKind apply hook from the pack manifest. Hash-locked to the parent installed-pack row via PayloadHash. Soft-deleted on pack uninstall and on reapply-time reconciliation (sweeper).",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "InstalledPackName", "label": "Installed Pack Name", "type": "VARCHAR(255)", "nullable": false, "references": "_System_InstalledPack(Name)" },
      { "name": "Namespace", "label": "Capability Namespace", "type": "VARCHAR(255)", "nullable": false },
      { "name": "Kind", "label": "Capability Kind", "type": "VARCHAR(64)", "nullable": false },
      { "name": "PayloadHash", "label": "Source Payload Hash", "type": "VARCHAR(128)", "nullable": false },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "columns": ["InstalledPackName"] },
      { "columns": ["Namespace", "Kind"], "unique": true },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ConnectedAppDeclaration",
    "tableType": "system_core",
    "category": "registry",
    "label": "Connected App Declaration",
    "description": "Per-installed-pack source-declared Connected App ownership. Written by the connected_app ComponentKind apply hook from the pack manifest. Soft-deleted on pack reapply when a Connected App is removed or renamed so stale OAuth clients can be deactivated and session/cache state invalidated.",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "InstalledPackName", "label": "Installed Pack Name", "type": "VARCHAR(255)", "nullable": false, "references": "_System_InstalledPack(Name)" },
      { "name": "ConnectedAppId", "label": "Connected App ID", "type": "VARCHAR(255)", "nullable": false },
      { "name": "PayloadHash", "label": "Source Payload Hash", "type": "VARCHAR(128)", "nullable": false },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "columns": ["InstalledPackName"] },
      { "columns": ["ConnectedAppId"], "unique": true },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ConnectedAppStage",
    "tableType": "system_core",
    "category": "registry",
    "label": "Connected App Stage",
    "description": "Pending source-backed Connected App records staged during pack apply. Runtime OAuth reads only _System_ConnectedApp; staged rows are published into the live table atomically with _System_InstalledPack activation.",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "InstalledPackName", "label": "Installed Pack Name", "type": "VARCHAR(255)", "nullable": false, "references": "_System_InstalledPack(Name)" },
      { "name": "ConnectedAppId", "label": "Connected App ID", "type": "VARCHAR(255)", "nullable": false },
      { "name": "PayloadHash", "label": "Source Payload Hash", "type": "VARCHAR(128)", "nullable": false },
      { "name": "RecordJson", "label": "Staged Connected App Record", "type": "JSON", "nullable": true },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "columns": ["InstalledPackName"] },
      { "columns": ["ConnectedAppId"], "unique": true },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_OAuthDynamicClientRegistration",
    "tableType": "system_core",
    "category": "registry",
    "label": "OAuth Dynamic Client Registration",
    "description": "L2 administrator-owned registration binding for RFC 7591 dynamic OAuth clients. It records the optional L1 scope-owner pack approved for the client, but is not a pack component and is never reconciled by pack apply. Generic CRUD writes are blocked; the system manager's dedicated transactional writer is the only mutation path.",
    "columns": [
      { "name": "Id", "label": "Record ID", "type": "VARCHAR(255)", "primaryKey": true },
      { "name": "ConnectedAppId", "label": "Connected App ID", "type": "VARCHAR(255)", "nullable": false, "unique": true },
      { "name": "ScopeOwnerPack", "label": "Scope Owner Pack", "type": "VARCHAR(255)", "nullable": true, "references": "_System_InstalledPack(Name)" },
      { "name": "RegisteredByUserId", "label": "Registered By User ID", "type": "VARCHAR(255)", "nullable": false, "references": "User(Id)" },
      { "name": "CreatedDate", "label": "Created Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "LastModifiedDate", "label": "Last Modified Date", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP" },
      { "name": "IsDeleted", "label": "Deleted", "type": "TINYINT(1)", "nullable": false, "default": "0" }
    ],
    "indices": [
      { "columns": ["ScopeOwnerPack"] },
      { "columns": ["RegisteredByUserId"] },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "Profile",
    "keyPrefix": "00e",
    "tableType": "system_core",
    "category": "auth",
    "description": "User profiles and permission sets",
    "requiredWritePermission": "ManageProfilesPermSets",
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          {
            "phase": "before_delete",
            "capability": "platform.security.write.soft-delete-reference-guard"
          }
        ]
      },
      "lifecycle": {
        "hooks": [
          {
            "phase": "after_create_in_tx",
            "capability": "platform.profile-permission-carrier"
          },
          {
            "phase": "after_update_in_tx",
            "capability": "platform.profile-permission-carrier"
          },
          {
            "phase": "after_delete_in_tx",
            "capability": "platform.profile-permission-carrier"
          }
        ]
      }
    },
    "protectedRecords": {
      "guardField": "IsSystem",
      "policy": "reject_delete",
      "errorCode": "CANNOT_DELETE_PROTECTED_RECORD",
      "message": "Platform-managed Profile cannot be deleted"
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Profile Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Active",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "IsSystem",
        "label": "System Profile",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "UserType",
        "label": "User License",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Standard'"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "AppMenuItem",
    "tableType": "system",
    "label": "App Menu Item",
    "description": "Navigation items for App Launcher",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "StartUrl",
        "label": "Start URL",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(50)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Visible",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "SortOrder",
        "label": "Sort Order",
        "type": "INT",
        "default": "0"
      },
      {
        "name": "AppId",
        "label": "App ID",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Icon",
        "label": "Icon",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Color",
        "label": "Color",
        "type": "VARCHAR(50)"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "UserRole",
    "keyPrefix": "00E",
    "tableType": "system_core",
    "category": "auth",
    "description": "Role hierarchy for access control",
    "requiredWritePermission": "ManageRoles",
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.role-hierarchy" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.user-role-parent" },
          { "phase": "before_update", "capability": "platform.security.write.user-role-parent" },
          { "phase": "before_delete", "capability": "platform.security.write.user-role-parent" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Role Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "RollupDescription",
        "label": "Rollup Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ParentRoleId",
        "label": "Parent Role",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "UserRole"
        ]
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Parentroleid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ParentRoleId",
        "references": "UserRole(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "User",
    "keyPrefix": "005",
    "tableType": "system_core",
    "category": "auth",
    "description": "System users",
    "requiredWritePermission": "ManageUsers",
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.user-profile-role" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_delete", "capability": "platform.security.write.user-delete-lifecycle" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Username",
        "label": "Username",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Email",
        "label": "Email Address",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Password",
        "label": "Password",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "password",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "FirstName",
        "label": "First Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastName",
        "label": "Last Name",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Phone",
        "label": "Phone",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ProfileId",
        "label": "Profile",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Profile"
        ],
        "is_system": true,
        "default": "'standard_user'"
      },
      {
        "name": "UserRoleId",
        "label": "Role",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "UserRole"
        ],
        "is_system": true
      },
      {
        "name": "ManagerId",
        "label": "Manager",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "is_system": true
      },
      {
        "name": "Title",
        "label": "Title",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Department",
        "label": "Department",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Division",
        "label": "Division",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Company",
        "label": "Company Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "MiddleName",
        "label": "Middle Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Suffix",
        "label": "Suffix",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Alias",
        "label": "Alias",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CommunityNickname",
        "label": "Nickname",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "MobilePhone",
        "label": "Mobile",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "TimeZoneSidKey",
        "label": "Time Zone",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'America/Los_Angeles'"
      },
      {
        "name": "LocaleSidKey",
        "label": "Locale",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'en_US'"
      },
      {
        "name": "LanguageLocaleKey",
        "label": "Language",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'en_US'"
      },
      {
        "name": "EmailEncodingKey",
        "label": "Email Encoding",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'UTF-8'"
      },
      {
        "name": "CurrencyIsoCode",
        "label": "Currency",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'USD'"
      },
      {
        "name": "Street",
        "label": "Street",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "City",
        "label": "City",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "State",
        "label": "State/Province",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "PostalCode",
        "label": "Zip/Postal Code",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Country",
        "label": "Country",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Active",
        "type": "TINYINT(1)",
        "default": "1",
        "is_system": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "FailedLoginAttempts",
        "label": "Failed Login Attempts",
        "type": "INT",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "LockedUntil",
        "label": "Locked Until",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "LastLoginDate",
        "label": "Last Login",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Profileid"
        ]
      },
      {
        "name": "idx_user_assignment_policy_eligibility",
        "columns": [
          "Profileid",
          "Isactive",
          "Isdeleted",
          "Id"
        ]
      },
      {
        "columns": [
          "Userroleid"
        ]
      },
      {
        "columns": [
          "Managerid"
        ]
      },
      {
        "columns": [
          "Department"
        ]
      },
      {
        "columns": [
          "Division"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)"
      },
      {
        "column": "UserRoleId",
        "references": "UserRole(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "ManagerId",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_Session",
    "tableType": "system_core",
    "category": "auth",
    "description": "User authentication sessions",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "User Id"
      },
      {
        "name": "Token",
        "type": "VARBINARY(3000)",
        "nullable": false,
        "unique": true,
        "label": "Token Verifier",
        "description": "Unique SHA-256 verifier for new session bearers; legacy rows may retain the raw bearer until renewal.",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "CurrentBearerToken",
        "type": "VARBINARY(3000)",
        "nullable": true,
        "label": "Current Bearer Token",
        "description": "Raw current bearer used for renewal winner recovery; nullable for legacy session rows.",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Expires At"
      },
      {
        "name": "LastActivity",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Activity"
      },
      {
        "name": "IpAddress",
        "type": "VARCHAR(255)",
        "label": "Ip Address"
      },
      {
        "name": "UserAgent",
        "type": "VARCHAR(255)",
        "label": "User Agent"
      },
      {
        "name": "IsRevoked",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Revoked"
      },
      {
        "name": "AuthEpoch",
        "type": "DECIMAL(20,0)",
        "nullable": false,
        "default": "1",
        "label": "Auth Epoch",
        "description": "Authoritative monotonic Runtime delegation epoch for this durable session."
      },
      {
        "name": "ControlProofHash",
        "type": "CHAR(64)",
        "nullable": true,
        "collationName": "utf8mb4_bin",
        "label": "Control Proof Hash",
        "description": "SHA-256 verifier for the independently held first-party browser session-control proof.",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "Scope",
        "type": "TEXT",
        "nullable": true,
        "label": "Scope"
      },
      {
        "name": "ConnectedAppId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Connected App Id"
      },
      {
        "name": "GrantType",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Grant Type"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Userid"
        ]
      },
      {
        "columns": [
          "Expiresat"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "BLOCKED"
  },
  {
    "tableName": "_System_RecordType",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Record type configurations",
    "rowMutationProtection": {
      "policy": "authority_owned_when_any_non_null",
      "scopeFields": ["ObjectId"],
      "fields": ["CatalogNamespaceId", "CatalogLocalKey"],
      "requiredUniqueIndex": "uq_record_type_catalog_key"
    },
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.record-type-catalog.v1",
      "semanticFields": ["ObjectId", "SobjectType", "IsActive", "IsDeleted"]
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Developer Name",
        "description": "Canonical Salesforce-style developer name derived from Name via utils.SanitizeDeveloperName until independent RecordType DeveloperName authoring is supported."
      },
      {
        "name": "CatalogNamespaceId",
        "type": "VARBINARY(128)",
        "nullable": true,
        "label": "Catalog Namespace Id",
        "writeProtectionPolicy": "authority_only",
        "description": "Reserved v1 RecordType identity-key namespace storage. Generic metadata and record writers cannot author it. Never derived from Name, DeveloperName, OwnerPack, or local IDs. Nullable only for legacy rows pending an authenticated Catalog or organization writer and separately reviewed signed backfill."
      },
      {
        "name": "CatalogLocalKey",
        "type": "VARBINARY(128)",
        "nullable": true,
        "label": "Catalog Local Key",
        "writeProtectionPolicy": "authority_only",
        "description": "Reserved v1 RecordType identity-key local-key storage. Generic metadata and record writers cannot author it. Never derived from Name, DeveloperName, OwnerPack, or local IDs. Nullable only for legacy rows pending an authenticated Catalog or organization writer and separately reviewed signed backfill."
      },
      {
        "name": "NamespacePrefix",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Namespace Prefix",
        "description": "SF v63 NamespacePrefix field. Always NULL for NexusCRM (no managed package namespace). Backed here so the physical_table readSource can project the column declared in standard_objects_spec.json."
      },
      {
        "name": "record_type_code",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Record Type Code",
        "description": "Autonumber Engine v2: short code used in autonumber format tokens (e.g. 'Q', 'INV'). PRD §4.5 + Q11 Approach α + v2 fixpack F7: NULL allowed on creation; V6 verify gate must check IS NOT NULL AND != '' before rollout to block empty-string bypass. Raw VARCHAR(16) upgraded to VARCHAR(50) to match system_tables VARCHAR whitelist."
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsMaster",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Master"
      },
      {
        "name": "BusinessProcessId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Business Process Id",
        "description": "Opaque Salesforce-compatible business-process identifier associated with the record type. L0 stores and returns the identifier but does not interpret application-specific process semantics."
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "SObject Type",
        "description": "Authoritative owning object API name, persisted so the readSource-backed RecordType contract can return SobjectType without a synthetic join."
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "''",
        "label": "Owner Pack",
        "description": "Pack owner for package-authored record types. Empty string means org/admin authored or legacy unknown. Apply and verify must use this explicit owner instead of inferring ownership from Id."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectId"
        ]
      },
      {
        "columns": [
          "ObjectId",
          "Name"
        ],
        "unique": true
      },
      {
        "columns": [
          "ObjectId",
          "DeveloperName"
        ],
        "unique": true
      },
      {
        "name": "uq_record_type_catalog_key",
        "columns": [
          "ObjectId",
          "CatalogNamespaceId",
          "CatalogLocalKey"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ObjectId",
        "references": "_System_Object(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_RecordTypePicklistValue",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Record-type-scoped picklist value availability and defaults",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "RecordTypeId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Type Id"
      },
      {
        "name": "FieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Id"
      },
      {
        "name": "Value",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Value"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsDefault",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Default"
      },
      {
        "name": "SortOrder",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Sort Order"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "''",
        "label": "Owner Pack",
        "description": "Pack owner for package-authored scoped picklist values. Empty string means org/admin authored or legacy unknown."
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "Marks an admin/org overlay that pack reconcile must preserve."
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "RecordTypeId",
          "FieldId",
          "Value"
        ],
        "unique": true
      },
      {
        "columns": [
          "RecordTypeId",
          "FieldId"
        ]
      },
      {
        "columns": [
          "OwnerPack"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "RecordTypeId",
        "references": "_System_RecordType(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "FieldId",
        "references": "_System_Field(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_AutoNumberCounter",
    "tableType": "system_metadata",
    "category": "metadata",
    "label": "Auto Number Counter",
    "description": "Autonumber Engine v2 counter table. PRD §4.4. Per-(field_id, scope_key) monotonic sequence — scope_key is '' for global scope, 'YYYY-MM-DD' for per_day scope, or the rendered non-counter format prefix for per_prefix scope. Follows the established _System_AutoNumber pattern: synthetic Id PK + UNIQUE (FieldId, ScopeKey). VARCHAR widths align with the system_tables VARCHAR whitelist.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Id",
        "description": "References _System_Field.Id."
      },
      {
        "name": "ScopeKey",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Scope Key",
        "description": "'' for global scope, 'YYYY-MM-DD' for per_day scope, or the rendered non-counter format prefix for per_prefix scope (e.g. 'JP-QT-260418-', 'IBG-B-20260418-'). VARCHAR(255) accommodates per_prefix keys which can include country codes, RecordType codes, and date components; widened from VARCHAR(50) when per_prefix scope was added (pre-cutover, fixing Codex adversarial finding)."
      },
      {
        "name": "NextValue",
        "type": "BIGINT",
        "nullable": false,
        "default": "1",
        "label": "Next Value"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "FieldId",
          "ScopeKey"
        ],
        "unique": true
      },
      {
        "columns": [
          "FieldId"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Relationship",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Object relationship definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ChildObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Child Object Api Name"
      },
      {
        "name": "ParentObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Object Api Name"
      },
      {
        "name": "FieldApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Api Name"
      },
      {
        "name": "RelationshipName",
        "type": "VARCHAR(255)",
        "label": "Relationship Name"
      },
      {
        "name": "RelationshipType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'reference'",
        "label": "Relationship Type"
      },
      {
        "name": "IsSharingParent",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Sharing Parent"
      },
      {
        "name": "CascadeDelete",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Cascade Delete"
      },
      {
        "name": "RestrictedDelete",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Restricted Delete"
      },
      {
        "name": "RelatedListLabel",
        "type": "VARCHAR(255)",
        "label": "Related List Label"
      },
      {
        "name": "RelatedListFields",
        "type": "TEXT",
        "label": "Related List Fields"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Childobjectapiname"
        ]
      },
      {
        "columns": [
          "Parentobjectapiname"
        ]
      },
      {
        "columns": [
          "Fieldapiname"
        ]
      }
    ]
  },
  {
    "tableName": "_System_FieldDependency",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Field dependency rules",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ControllingFieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Controlling Field Id"
      },
      {
        "name": "DependentFieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Dependent Field Id"
      },
      {
        "name": "ControllingValue",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Controlling Value"
      },
      {
        "name": "DependentValues",
        "type": "JSON",
        "label": "Dependent Values"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Controllingfieldid"
        ]
      },
      {
        "columns": [
          "Dependentfieldid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ControllingFieldId",
        "references": "_System_Field(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "DependentFieldId",
        "references": "_System_Field(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_App",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Application configurations",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.app-navigation-catalog.v1",
      "semanticFields": ["FrontendAppId"]
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "NamespacePrefix",
        "label": "Namespace Prefix",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Icon",
        "type": "VARCHAR(255)",
        "label": "Icon"
      },
      {
        "name": "Color",
        "type": "VARCHAR(255)",
        "label": "Color"
      },
      {
        "name": "FrontendAppId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Frontend App Id",
        "description": "Canonical frontend app-pack owner id for this app's navigation and app-scoped UI registries. NULL means unresolved legacy/admin row."
      },
      {
        "name": "NavigationItems",
        "type": "JSON",
        "label": "Navigation Items"
      },
      {
        "name": "NavigationRevision",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Navigation Revision"
      },
      {
        "name": "UtilityItems",
        "type": "JSON",
        "label": "Utility Items"
      },
      {
        "name": "AssignedProfiles",
        "type": "JSON",
        "label": "Assigned Profiles"
      },
      {
        "name": "IsDefault",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Default"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_Theme",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Visual theme configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Active"
      },
      {
        "name": "Colors",
        "type": "JSON",
        "nullable": false,
        "label": "Colors"
      },
      {
        "name": "Density",
        "type": "VARCHAR(255)",
        "default": "'comfortable'",
        "label": "Density"
      },
      {
        "name": "LogoUrl",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Logo Url"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_BulkJob",
    "tableType": "system_core",
    "category": "integration",
    "description": "Salesforce Bulk API v2 Job",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Object",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object"
      },
      {
        "name": "Operation",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Operation"
      },
      {
        "name": "State",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Open'",
        "label": "State"
      },
      {
        "name": "ConcurrencyMode",
        "type": "VARCHAR(255)",
        "default": "'Parallel'",
        "label": "Concurrency Mode"
      },
      {
        "name": "ContentType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'CSV'",
        "label": "Content Type"
      },
      {
        "name": "ColumnDelimiter",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'COMMA'",
        "label": "Column Delimiter"
      },
      {
        "name": "LineEnding",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'LF'",
        "label": "Line Ending"
      },
      {
        "name": "ApiVersion",
        "type": "DECIMAL(5,1)",
        "nullable": false,
        "default": "63.0",
        "label": "API Version"
      },
      {
        "name": "ExternalIdFieldName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "External ID Field Name"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "TotalProcessingTime",
        "type": "BIGINT",
        "default": "0",
        "label": "Total Processing Time"
      },
      {
        "name": "ApiActiveProcessingTime",
        "type": "BIGINT",
        "default": "0",
        "label": "Api Active Processing Time"
      },
      {
        "name": "ApexProcessingTime",
        "type": "BIGINT",
        "default": "0",
        "label": "Apex Processing Time"
      },
      {
        "name": "NumberRecordsProcessed",
        "type": "BIGINT",
        "default": "0",
        "label": "Number Records Processed"
      },
      {
        "name": "NumberRecordsFailed",
        "type": "BIGINT",
        "default": "0",
        "label": "Number Records Failed"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "JobType",
        "type": "VARCHAR(255)",
        "nullable": true,
        "comment": "Job type: V2Query for query jobs",
        "label": "Job Type"
      },
      {
        "name": "ContentUrl",
        "type": "TEXT",
        "nullable": true,
        "comment": "Stores SOQL query for query jobs",
        "label": "Content Url"
      },
      {
        "name": "WorkBinding",
        "type": "TEXT",
        "nullable": true,
        "comment": "Canonical immutable Runtime metadata binding assigned atomically by the first independent-worker claim before any record effect.",
        "label": "Work Binding"
      },
      {
        "name": "AvailableAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Available At"
      },
      {
        "name": "ClaimOwner",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Claim Owner"
      },
      {
        "name": "ClaimToken",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Claim Token",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "ClaimOwnershipEpoch",
        "type": "DECIMAL(20,0)",
        "nullable": true,
        "label": "Claim Ownership Epoch"
      },
      {
        "name": "LeaseExpiresAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Lease Expires At"
      },
      {
        "name": "RetryCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Retry Count"
      },
      {
        "name": "LastFailure",
        "type": "TEXT",
        "nullable": true,
        "label": "Last Failure"
      },
      {
        "name": "IsDeleted",
        "type": "BOOLEAN",
        "default": "0",
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "State"
        ]
      },
      {
        "columns": [
          "Object"
        ]
      },
      {
        "name": "idx_bulk_job_available",
        "columns": [
          "State",
          "AvailableAt",
          "CreatedDate",
          "Id"
        ]
      }
    ]
  },
  {
    "tableName": "_System_BulkBatch",
    "tableType": "system_core",
    "category": "integration",
    "description": "Internal batch tracking for Bulk API Jobs",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "JobId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Job Id"
      },
      {
        "name": "State",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Queued'",
        "label": "State"
      },
      {
        "name": "RecordsProcessed",
        "type": "INT",
        "default": "0",
        "label": "Records Processed"
      },
      {
        "name": "RecordsFailed",
        "type": "INT",
        "default": "0",
        "label": "Records Failed"
      },
      {
        "name": "TotalRecords",
        "type": "INT",
        "default": "0",
        "label": "Total Records"
      },
      {
        "name": "ObjectKey",
        "type": "TEXT",
        "nullable": true,
        "label": "Object Key"
      },
      {
        "name": "StorageProvider",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Storage Provider"
      },
      {
        "name": "StorageBucket",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Storage Bucket"
      },
      {
        "name": "StorageAuthorityDigest",
        "type": "CHAR(71)",
        "nullable": true,
        "label": "Storage Authority Digest"
      },
      {
        "name": "ContentSHA256",
        "type": "CHAR(64)",
        "nullable": true,
        "label": "Content SHA256"
      },
      {
        "name": "ContentLength",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Content Length"
      },
      {
        "name": "NextRowOffset",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Next Row Offset"
      },
      {
        "name": "LastError",
        "type": "TEXT",
        "nullable": true,
        "label": "Last Error"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_bulk_batch_job_state",
        "columns": ["JobId", "State", "Id"]
      }
    ],
    "foreignKeys": [
      {
        "column": "JobId",
        "references": "_System_BulkJob(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_BulkWorkGeneration",
    "tableType": "system_core",
    "category": "integration",
    "description": "Platform-owned Bulk work wake cursor; BulkJob and BulkBatch remain the only work authority",
    "columns": [
      { "name": "SingletonKey", "type": "TINYINT", "primaryKey": true, "label": "Singleton Key" },
      { "name": "Generation", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Bulk Work Wake Generation" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ]
  },
  {
    "tableName": "push_topic",
    "tableType": "system_core",
    "category": "integration",
    "description": "Salesforce Streaming API PushTopic",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Query",
        "type": "TEXT",
        "nullable": false,
        "label": "Query"
      },
      {
        "name": "ApiVersion",
        "type": "DECIMAL(10,1)",
        "default": "60.0",
        "label": "Api Version"
      },
      {
        "name": "NotifyForFields",
        "type": "VARCHAR(255)",
        "default": "'Referenced'",
        "label": "Notify For Fields"
      },
      {
        "name": "NotifyForOperationCreate",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Create"
      },
      {
        "name": "NotifyForOperationUpdate",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Update"
      },
      {
        "name": "NotifyForOperationDelete",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Delete"
      },
      {
        "name": "NotifyForOperationUndelete",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Undelete"
      },
      {
        "name": "IsActive",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Is Active"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "BOOLEAN",
        "default": "0",
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "Name"
        ]
      },
      {
        "columns": [
          "Isactive"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Log",
    "tableType": "system_core",
    "category": "audit",
    "description": "System event logs",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Timestamp",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Timestamp"
      },
      {
        "name": "Level",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Level"
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Source"
      },
      {
        "name": "Message",
        "type": "TEXT",
        "label": "Message"
      },
      {
        "name": "Details",
        "type": "TEXT",
        "nullable": true,
        "label": "Details"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Timestamp"
        ]
      },
      {
        "columns": [
          "Level"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Recent",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Recently viewed records",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "User Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "RecordName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Name"
      },
      {
        "name": "Timestamp",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Timestamp"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Userid"
        ]
      },
      {
        "columns": [
          "Userid",
          "Timestamp"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_Config",
    "tableType": "system_core",
    "category": "config",
    "description": "System configuration settings",
    "columns": [
      {
        "name": "KeyName",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Key Name"
      },
      {
        "name": "Value",
        "type": "TEXT",
        "label": "Value",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "IsSecret",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Secret"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ValidationRule",
    "tableType": "system_metadata",
    "category": "business_logic",
    "description": "Validation rule definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "Active",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Active"
      },
      {
        "name": "Condition",
        "type": "TEXT",
        "nullable": false,
        "label": "Condition"
      },
      {
        "name": "ErrorMessage",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Error Message"
      },
      {
        "name": "ErrorDisplayField",
        "type": "VARCHAR(255)",
        "label": "Error Display Field",
        "nullable": true
      },
      {
        "name": "RecordSetBindings",
        "type": "JSON",
        "label": "Record Set Bindings",
        "nullable": true,
        "description": "NexusCRM validation-rule extension: metadata-owned boolean record-set bindings evaluated before the rule formula."
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Is Customized"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "''",
        "label": "Owner Pack",
        "description": "Pack owner for package-authored validation rules. Empty string means org/admin authored or legacy unknown. Apply and verify must use this explicit owner instead of inferring ownership from synthetic Id prefixes."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Name"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_PageLayout",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "UI Page Layout definitions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectApiName",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "LayoutName",
        "label": "Layout Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDefault",
        "label": "Default",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "Config",
        "label": "JSON Configuration",
		"type": "MEDIUMTEXT",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "DEPRECATED \u2014 kept for backward compatibility. Use Source column instead."
      },
      {
        "name": "LayoutVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Layout Version",
        "description": "DEPRECATED \u2014 kept for backward compatibility. Use GenerationVersion column instead."
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'auto_generated'",
        "label": "Source",
        "description": "Origin of this layout: auto_generated, admin_created, cloned, curated. Controls whether auto-regeneration applies."
      },
      {
        "name": "GenerationVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Generation Version",
        "description": "Algorithm version that produced this layout. Only meaningful when Source=auto_generated."
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Owner Pack",
        "description": "Installed pack name when owned by a source-backed pack. NULL for admin/platform-authored layouts."
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Layoutname"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_ApprovalPageLayout",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "UI Page Layout definitions for approval processes - allows admins to customize which fields appear on the approval response page",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectApiName",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "LayoutName",
        "label": "Layout Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'approval_response'"
      },
      {
        "name": "IsDefault",
        "label": "Default",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "Config",
        "label": "JSON Configuration",
        "type": "JSON",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "DEPRECATED — kept for backward compatibility. Use Source column instead."
      },
      {
        "name": "LayoutVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Layout Version",
        "description": "DEPRECATED — kept for backward compatibility. Use GenerationVersion column instead."
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'auto_generated'",
        "label": "Source",
        "description": "Origin of this layout: auto_generated, admin_created, cloned, curated. Controls whether auto-regeneration applies."
      },
      {
        "name": "GenerationVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Generation Version",
        "description": "Algorithm version that produced this layout. Only meaningful when Source=auto_generated."
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Layoutname"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "ReportFolder",
    "keyPrefix": "00l",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Folders for organizing reports and dashboards (Salesforce Analytics Folders API)",
    "sharingModel": "FolderSharing",
    "accessPolicy": {
      "writeValidation": {
        "canonicalizers": [
          {
            "phase": "before_create",
            "capability": "platform.folder.write.folder-type-canonicalization"
          },
          {
            "phase": "before_update",
            "capability": "platform.folder.write.folder-type-canonicalization"
          },
          {
            "phase": "before_restore",
            "capability": "platform.folder.write.folder-type-canonicalization"
          }
        ],
        "validators": [
          {
            "phase": "before_create",
            "capability": "platform.folder.write.folder-type-permission"
          },
          {
            "phase": "before_update",
            "capability": "platform.folder.write.folder-type-permission"
          },
          {
            "phase": "before_delete",
            "capability": "platform.folder.write.folder-type-permission"
          },
          {
            "phase": "before_restore",
            "capability": "platform.folder.write.folder-type-permission"
          },
          {
            "phase": "before_purge",
            "capability": "platform.folder.write.folder-type-permission"
          }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Folder Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Unique Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "Type",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Report'",
        "label": "Folder Type"
      },
      {
        "name": "AccessType",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Shared'",
        "label": "Access Type"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Parent Folder"
      },
      {
        "name": "OwnerId",
        "label": "Owner ID",
        "type": "VARCHAR(255)",
        "nullable": true,
        "comment": "Folder owner — defaults to CreatedById, mutable for ownership transfer"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "Type"
        ]
      },
      {
        "columns": [
          "ParentId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ParentId",
        "references": "ReportFolder(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "FolderShare",
    "keyPrefix": "0AF",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Folder sharing permissions (Salesforce Analytics Folders API)",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FolderId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Folder"
      },
      {
        "name": "SharedToId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Shared To"
      },
      {
        "name": "SharedToType",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'User'",
        "label": "Share Type"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'View'",
        "label": "Access Level"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "FolderId"
        ]
      },
      {
        "columns": [
          "SharedToId"
        ]
      },
      {
        "columns": [
          "FolderId",
          "SharedToId",
          "AccessLevel"
        ],
        "comment": "Composite index for FolderAccessService.VisibleFolderIDs single-query lookup"
      }
    ],
    "foreignKeys": [
      {
        "column": "FolderId",
        "references": "ReportFolder(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_FolderType",
    "keyPrefix": "0FT",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Folder type catalog. App packs declare folder type names and the system permissions required to manage folders of that type.",
    "requiredWritePermission": "ModifyMetadata",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "API Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "FilterGroup",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Filter Group"
      },
      {
        "name": "CreatePermission",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Create Permission"
      },
      {
        "name": "ManagePermission",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Manage Permission"
      },
      {
        "name": "PersonalFolderName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Personal Folder Name"
      },
      {
        "name": "PersonalFolderDeveloperNamePrefix",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Personal Folder Developer Name Prefix"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Owner Pack"
      },
      {
        "name": "IsDefault",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Default"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Active"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ApiName"
        ],
        "unique": true
      },
      {
        "columns": [
          "IsActive"
        ]
      },
      {
        "columns": [
          "OwnerPack"
        ]
      }
    ]
  },
  {
    "tableName": "_System_ReportType",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Custom Report Type definitions. App packs may seed locked/default report types; runtime analytics reads this table as the report-type metadata SSoT.",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "CreateCustomizeReports",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "FullName", "type": "VARCHAR(255)", "nullable": false, "unique": true, "label": "Full Name" },
      { "name": "Label", "type": "VARCHAR(255)", "nullable": false, "label": "Label" },
      { "name": "Description", "type": "TEXT", "nullable": true, "label": "Description" },
      { "name": "BaseObject", "type": "VARCHAR(255)", "nullable": false, "label": "Base Object" },
      { "name": "Deployed", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Deployed" },
      { "name": "Autogenerated", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Autogenerated" },
      { "name": "Sections", "type": "JSON", "nullable": true, "label": "Sections" },
      { "name": "Categories", "type": "JSON", "nullable": true, "label": "Categories" },
      { "name": "Join", "type": "JSON", "nullable": true, "label": "Join" },
      { "name": "Metadata", "type": "JSON", "nullable": true, "label": "Metadata" },
      { "name": "OwnerPack", "type": "VARCHAR(128)", "nullable": true, "label": "Owner Pack" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Deleted" }
    ],
    "indices": [
      { "columns": ["FullName"] },
      { "columns": ["BaseObject"] },
      { "columns": ["OwnerPack"] },
      { "columns": ["IsDeleted"] }
    ]
  },
  {
    "tableName": "Report",
    "keyPrefix": "00O",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Report definitions",
    "sharingModel": "FolderContentSharing",
    "requiredWritePermission": "CreateCustomizeReports",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FolderId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Folder",
        "logicalType": "reference",
        "referenceTo": [
          "ReportFolder"
        ]
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Report Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Unique Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "SourceObject",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Primary Object"
      },
      {
        "name": "SourceRef",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Report Source Reference",
        "description": "Neutral report source token used for CRT or app-owned report sources."
      },
      {
        "name": "ReportType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'tabular'",
        "label": "Report Type"
      },
      {
        "name": "DisplayMode",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Display Mode",
        "description": "Neutral report display mode such as tabular, summary, or matrix."
      },
      {
        "name": "Columns",
        "type": "JSON",
        "nullable": true,
        "label": "Columns"
      },
      {
        "name": "Filters",
        "type": "JSON",
        "nullable": true,
        "label": "Filters"
      },
      {
        "name": "StandardDateFilter",
        "type": "JSON",
        "nullable": true,
        "label": "Standard Date Filter"
      },
      {
        "name": "Grouping",
        "type": "JSON",
        "nullable": true,
        "label": "Grouping"
      },
      {
        "name": "Aggregates",
        "type": "JSON",
        "nullable": true,
        "label": "Aggregates"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "Scope",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Show Me Scope",
        "description": "Report show-me filter scope: all, mine, myTeam (or legacy SF values)"
      },
      {
        "name": "BooleanFilter",
        "type": "TEXT",
        "nullable": true,
        "label": "Boolean Filter",
        "description": "SF-style numbered boolean expression combining Filters (e.g. \"1 OR 2 OR 3\", \"1 AND (2 OR 3)\"). Empty means AND all filters."
      }
    ],
    "indices": [
      {
        "columns": [
          "Folderid"
        ]
      },
      {
        "columns": [
          "Sourceobject"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "FolderId",
        "references": "ReportFolder(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_Action",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "UI action definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Type"
      },
      {
        "name": "Icon",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Icon"
      },
      {
        "name": "TargetObject",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Target Object"
      },
      {
        "name": "Config",
        "type": "JSON",
        "nullable": true,
        "label": "Config"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Pack"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "BOOLEAN",
        "default": "0",
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Name"
        ],
        "unique": true
      },
      {
        "columns": [
          "OwnerPack"
        ]
      }
    ]
  },
  {
    "tableName": "_System_ListView",
    "keyPrefix": "!lv",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "List view configurations",
    "accessPolicy": {
      "rowRead": {
        "kind": "ownerVisibility",
        "ownerField": "OwnerId",
        "visibilityField": "Visibility",
        "ownerVisibleValues": ["Private"]
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "FilterExpr",
        "type": "TEXT",
        "nullable": true,
        "label": "Filter Expr"
      },
      {
        "name": "FilterLogic",
        "type": "TEXT",
        "nullable": true,
        "label": "Filter Logic"
      },
      {
        "name": "SortField",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Sort Field"
      },
      {
        "name": "SortDirection",
        "type": "VARCHAR(16)",
        "nullable": true,
        "label": "Sort Direction"
      },
      {
        "name": "Fields",
        "type": "JSON",
        "nullable": false,
        "label": "Fields"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "logicalType": "reference",
        "referenceTo": ["User"],
        "nullable": true,
        "label": "Owner ID",
        "onDelete": "CASCADE"
      },
      {
        "name": "Visibility",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Visibility"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Developer Name"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectApiName"
        ]
      },
      {
        "columns": [
          "ObjectApiName",
          "OwnerId"
        ]
      },
      {
        "name": "uniq_listview_object_developer_name",
        "columns": [
          "ObjectApiName",
          "DeveloperName"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "OwnerId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "SharingRule",
    "keyPrefix": "01q",
    "tableType": "system_metadata",
    "category": "auth",
    "description": "Record sharing rules",
    "requiredWritePermission": "ManageSharing",
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.sharing-rules" }
        ]
      },
	      "writeValidation": {
	        "canonicalizers": [
	          { "phase": "before_create", "capability": "platform.security.write.sharing-rule-canonicalization" },
	          { "phase": "before_update", "capability": "platform.security.write.sharing-rule-canonicalization" },
	          { "phase": "before_restore", "capability": "platform.security.write.sharing-rule-canonicalization" }
	        ],
	        "validators": [
	          { "phase": "before_create", "capability": "platform.security.write.sharing-rule-owner-references" },
	          { "phase": "before_create", "capability": "platform.security.write.sharing-rule-shape" },
          { "phase": "before_update", "capability": "platform.security.write.sharing-rule-owner-references" },
          { "phase": "before_update", "capability": "platform.security.write.sharing-rule-shape" },
          { "phase": "before_restore", "capability": "platform.security.write.sharing-rule-owner-references" },
          { "phase": "before_restore", "capability": "platform.security.write.sharing-rule-shape" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Criteria",
        "type": "TEXT",
        "nullable": true,
        "label": "Criteria"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Access Level"
      },
      {
        "name": "SharedFromRoleId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Shared From Role Id"
      },
      {
        "name": "SharedFromGroupId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Shared From Group Id"
      },
      {
        "name": "ShareWithRoleId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With Role Id"
      },
      {
        "name": "ShareWithGroupId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With Group Id"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "name": "idx_sharingrule_shared_from_role_id",
        "columns": [
          "Sharedfromroleid"
        ]
      },
      {
        "name": "idx_sharingrule_shared_from_group_id",
        "columns": [
          "Sharedfromgroupid"
        ]
      },
      {
        "name": "idx_sharingrule_share_with_role_id",
        "columns": [
          "Sharewithroleid"
        ]
      },
      {
        "name": "idx_sharingrule_share_with_group_id",
        "columns": [
          "Sharewithgroupid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "SharedFromRoleId",
        "references": "UserRole(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "SharedFromGroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "ShareWithRoleId",
        "references": "UserRole(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "ShareWithGroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_RecycleBin",
    "tableType": "system_core",
    "category": "data",
    "description": "Recycle bin for soft-deleted records",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Name"
      },
      {
        "name": "DeletedBy",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "Deleted By"
      },
      {
        "name": "DeletedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Deleted By Id"
      },
      {
        "name": "DeletedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Deleted Date"
      },
      {
        "name": "DeleteOperationId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Delete Operation Id"
      },
      {
        "name": "DeleteRootObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Delete Root Object Api Name"
      },
      {
        "name": "DeleteRootRecordId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Delete Root Record Id"
      },
      {
        "name": "CascadeParentObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Cascade Parent Object Api Name"
      },
      {
        "name": "CascadeParentRecordId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Cascade Parent Record Id"
      },
      {
        "name": "CascadeFieldApiName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Cascade Field Api Name"
      },
      {
        "name": "CascadeDepth",
        "type": "INT",
        "nullable": true,
        "label": "Cascade Depth"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Deleteddate"
        ]
      },
      {
        "columns": [
          "Deleteoperationid"
        ]
      }
    ]
  },
  {
    "tableName": "ProfileLayout",
    "keyPrefix": "00h",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Profile to layout assignments",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ProfileId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Profile Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "LayoutId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Layout Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Profileid",
          "Objectapiname"
        ],
        "unique": true
      },
      {
        "name": "idx_profilelayout_layout_id",
        "columns": [
          "Layoutid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "retainOnSoftDelete": true,
        "onDelete": "CASCADE"
      },
      {
        "column": "LayoutId",
        "references": "_System_PageLayout(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_SetupPage",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Setup page definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Icon",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Icon"
      },
      {
        "name": "ComponentName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Component Name"
      },
      {
        "name": "Category",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Category"
      },
      {
        "name": "PageOrder",
        "type": "INT",
        "default": "99",
        "label": "Page Order"
      },
      {
        "name": "PermissionRequired",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Permission Required"
      },
      {
        "name": "IsEnabled",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Is Enabled"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "Path",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Path"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Category"
        ]
      },
      {
        "columns": [
          "Componentname"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "ObjectPermissions",
    "permissionSetDefinitionRelation": {
      "role": "modeled_grant",
      "parentField": "ParentId",
      "onRootDelete": "cascade"
    },
    "keyPrefix": "110",
    "tableType": "system_core",
    "category": "auth",
    "description": "Object permissions for profiles",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.object-permission.v1",
      "semanticFields": ["ParentId", "SobjectType", "PermissionsRead", "PermissionsCreate", "PermissionsEdit", "PermissionsDelete", "PermissionsViewAllRecords", "PermissionsModifyAllRecords", "IsDeleted"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permissions" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.object-permissions" },
          { "phase": "before_update", "capability": "platform.security.write.object-permissions" },
          { "phase": "before_restore", "capability": "platform.security.write.object-permissions" },
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_delete", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_purge", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ParentId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] }, { "hops": [ { "viaField": "ParentId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "Reference to Profile or PermissionSet (Salesforce wire-compatible)",
        "label": "Parent Id"
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "API name of the object",
        "label": "Sobject Type"
      },
      {
        "name": "PermissionsRead",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Read"
      },
      {
        "name": "PermissionsCreate",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Create"
      },
      {
        "name": "PermissionsEdit",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Edit"
      },
      {
        "name": "PermissionsDelete",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Delete"
      },
      {
        "name": "PermissionsViewAllRecords",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions View All Records"
      },
      {
        "name": "PermissionsModifyAllRecords",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Modify All Records"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ParentId",
          "SobjectType"
        ],
        "unique": true
      }
    ],
    "foreignKeys": []
  },
  {
    "tableName": "FieldPermissions",
    "permissionSetDefinitionRelation": {
      "role": "modeled_grant",
      "parentField": "ParentId",
      "onRootDelete": "cascade"
    },
    "keyPrefix": "01k",
    "tableType": "system_core",
    "category": "auth",
    "description": "Field permissions for profiles",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.field-permission.v1",
      "semanticFields": ["ParentId", "SobjectType", "Field", "PermissionsRead", "PermissionsEdit", "IsDeleted"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permissions" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.field-permissions" },
          { "phase": "before_update", "capability": "platform.security.write.field-permissions" },
          { "phase": "before_restore", "capability": "platform.security.write.field-permissions" },
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_delete", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_purge", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ParentId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] }, { "hops": [ { "viaField": "ParentId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "Reference to Profile or PermissionSet (Salesforce wire-compatible)",
        "label": "Parent Id"
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "API name of the object",
        "label": "Sobject Type"
      },
      {
        "name": "Field",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "API name of the field (Salesforce format: ObjectName.FieldName)",
        "label": "Field"
      },
      {
        "name": "PermissionsRead",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Read"
      },
      {
        "name": "PermissionsEdit",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Edit"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ParentId",
          "SobjectType",
          "Field"
        ],
        "unique": true
      }
    ],
    "foreignKeys": []
  },
  {
    "tableName": "_System_Comment",
    "tableType": "system_core",
    "keyPrefix": "!cm",
    "category": "data",
    "description": "User comments on records",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "Body",
        "type": "TEXT",
        "nullable": false,
        "label": "Body"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "ParentCommentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Parent Comment Id"
      },
      {
        "name": "IsResolved",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Resolved"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "columns": [
          "CreatedById"
        ]
      },
      {
        "columns": [
          "Parentcommentid"
        ]
      }
    ]
  },
  {
    "tableName": "_System_AuditLog",
    "tableType": "system_core",
    "category": "audit",
    "description": "Field history tracking",
    "requiredReadPermission": "ViewAllData,ModifyAllData",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "FieldName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Name"
      },
      {
        "name": "OldValue",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Old Value"
      },
      {
        "name": "NewValue",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "New Value"
      },
      {
        "name": "ChangedById",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Changed By Id"
      },
      {
        "name": "ChangedAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Changed At"
      },
      {
        "name": "EventAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Event At",
        "description": "Database transaction time retained for display and diagnostics; it does not determine temporal eligibility."
      },
      {
        "name": "HistorySequence",
        "type": "BIGINT",
        "nullable": true,
        "label": "History Sequence",
        "description": "Transactionally reserved per-field ordering token used for temporal eligibility; legacy NULL values fail closed."
      },
      {
        "name": "FieldHistoryEligible",
        "type": "TINYINT(1)",
        "nullable": true,
        "label": "Field History Eligible",
        "description": "History-tracking eligibility copied from the immutable mutation metadata view that produced this field diff; NULL denotes unstamped legacy provenance."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "Entrypoint",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Entrypoint"
      },
      {
        "name": "Action",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Action"
      },
      {
        "name": "ChangesJSON",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Changes JSON"
      },
      {
        "name": "TraceId",
        "type": "CHAR(32)",
        "nullable": true,
        "label": "Trace Id"
      },
      {
        "name": "ClientIp",
        "type": "VARCHAR(45)",
        "nullable": true,
        "label": "Client Ip"
      },
      {
        "name": "SessionId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Session Id"
      },
      {
        "name": "OutboxRowId",
        "type": "BIGINT",
        "nullable": true,
        "label": "Outbox Row Id"
      },
      {
        "name": "EntrypointDetail",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Entrypoint Detail"
      },
      {
        "name": "RequestId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Request Id"
      },
      {
        "name": "ParentRequestId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Parent Request Id"
      },
      {
        "name": "ActualUserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Actual User Id"
      },
      {
        "name": "UserAgent",
        "type": "VARCHAR(512)",
        "nullable": true,
        "label": "User Agent"
      },
      {
        "name": "Outcome",
        "type": "VARCHAR(16)",
        "nullable": true,
        "label": "Outcome"
      },
      {
        "name": "ErrorCode",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Error Code"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "columns": [
          "Changedat"
        ]
      },
      {
        "name": "idx_request",
        "columns": [
          "RequestId",
          "ChangedAt"
        ]
      },
      {
        "name": "uk_outbox",
        "columns": [
          "OutboxRowId",
          "FieldName",
          "ChangedAt"
        ],
        "unique": true
      },
      {
        "name": "idx_history_temporal_eligibility",
        "columns": [
          "ObjectApiName",
          "RecordId",
          "FieldName",
          "HistorySequence"
        ]
      },
      {
        "name": "idx_history_changed_at",
        "columns": [
          "ObjectApiName",
          "RecordId",
          "FieldName",
          "ChangedAt"
        ]
      },
      {
        "name": "idx_audit_retention_changed_at",
        "columns": [
          "ChangedAt",
          "Id"
        ]
      }
    ],
    "retentionMaxAgeMonths": 78
  },
  {
    "tableName": "_System_AuditOutbox",
    "tableType": "system_core",
    "category": "audit",
    "label": "Audit Outbox",
    "description": "Async audit field-diff fan-out queue. Sync path writes a header row to _System_AuditLog + a payload row here inside the business txn; a background worker expands Payload into N field-level _System_AuditLog rows (design doc §2.4). No consumers in C2 — outbox writer lands in C5, worker in C6.",
    "columns": [
      {
        "name": "Id",
        "type": "BIGINT",
        "primaryKey": true,
        "autoIncrement": true,
        "label": "Id"
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": false,
        "label": "Payload"
      },
      {
        "name": "EnqueuedAt",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Enqueued At"
      },
      {
        "name": "ProcessedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Processed At"
      },
      {
        "name": "Attempts",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Attempts"
      },
      {
        "name": "LeaseHolderId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Lease Holder Id"
      },
      {
        "name": "LeaseExpiresAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Lease Expires At"
      },
      {
        "name": "LastError",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Last Error"
      },
      {
        "name": "PoisonClass",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Poison Class"
      },
      {
        "name": "OwnershipEpoch",
        "type": "DECIMAL(20,0)",
        "nullable": false,
        "default": "0",
        "label": "Work Ownership Epoch"
      },
      {
        "name": "RepairCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Repair Count"
      },
      {
        "name": "LastRepairId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Repair Id"
      },
      {
        "name": "LastRepairReason",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Last Repair Reason"
      },
      {
        "name": "LastRepairedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Last Repaired At"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessedAt",
          "PoisonClass",
          "EnqueuedAt"
        ]
      },
      {
        "columns": [
          "LeaseHolderId",
          "LeaseExpiresAt"
        ]
      }
    ]
  },
  {
    "tableName": "_System_FlowAuditLog",
    "tableType": "system_core",
    "category": "automation",
    "label": "Flow Audit Log",
    "description": "Per-element execution audit rows emitted by the Flow runtime (Pillar 5). L0 platform observability — no Salesforce analogue. Rows are written asynchronously by the audit.Writer. Retention is controlled by the audit_retention.Retention runner (row-count-cap or max-age). All object references use IDs (ObjectMetadataId BIGINT), never ObjectAPIName, per CLAUDE.md strong-reading.",
    "requiredReadPermission": "ViewAllData,ModifyAllData",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FlowExecutionId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Flow Execution Id"
      },
      {
        "name": "FlowDefinitionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Flow Definition Id"
      },
      {
        "name": "FlowVersionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Flow Version Id"
      },
      {
        "name": "ElementId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Element Id"
      },
      {
        "name": "ElementType",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Element Type"
      },
      {
        "name": "Status",
        "type": "VARCHAR(16)",
        "nullable": false,
        "label": "Status"
      },
      {
        "name": "DurationMs",
        "type": "INT",
        "nullable": false,
        "label": "Duration Ms"
      },
      {
        "name": "InputJSON",
        "type": "TEXT",
        "nullable": true,
        "label": "Input JSON"
      },
      {
        "name": "OutputJSON",
        "type": "TEXT",
        "nullable": true,
        "label": "Output JSON"
      },
      {
        "name": "ErrorPayload",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Payload"
      },
      {
        "name": "ObjectMetadataId",
        "type": "BIGINT",
        "nullable": true,
        "label": "Object Metadata Id"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Record Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_lookup",
        "columns": [
          "FlowExecutionId",
          "ElementId"
        ]
      },
      {
        "name": "idx_created_date",
        "columns": [
          "CreatedDate"
        ]
      },
      {
        "name": "idx_flow",
        "columns": [
          "FlowDefinitionId",
          "FlowVersionId"
        ]
      }
    ],
    "retentionMaxRows": 1000000,
    "retentionMaxAgeSeconds": 7776000
  },
  {
    "tableName": "_System_ScheduledRunReservation",
    "tableType": "system_core",
    "category": "automation",
    "label": "Scheduled Run Reservation",
    "description": "Internal once-per-window authority for scheduled Flow execution. The existing occurrence identity remains authoritative; the independent Runtime Worker atomically persists bounded canonical inputs for every selected record before discovery advances, then uses exact immutable metadata binding, attempt lease, and ownership epoch. Launch-approved DB-only Flow effects and the terminal COMPLETED disposition commit in the same transaction, so an abandoned RESERVED row is safe to reclaim after lease expiry. Direct-SQL automation substrate only; not a CRUD/query surface. During the stopped-upgrade bridge, the retained legacy writer maps its existing Flow/version/window/input identity into the same digest column without inventing AppInstallation authority; active legacy rows fence the ownership switch.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "OrgId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Organization Id"
      },
      {
        "name": "AppInstallationId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "App Installation Id"
      },
      {
        "name": "RuntimeCapabilityId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Runtime Capability Id"
      },
      {
        "name": "OccurrenceIdentityDigest",
        "type": "CHAR(64)",
        "nullable": true,
        "collationName": "utf8mb4_bin",
        "label": "Scoped Occurrence Identity Digest"
      },
      {
        "name": "BatchIdentityDigest",
        "type": "CHAR(64)",
        "nullable": true,
        "collationName": "utf8mb4_bin",
        "label": "Scoped Schedule Batch Identity Digest",
        "description": "Derived index projection of the exact Runtime scope, Flow definition/version, and schedule window. Explicit columns remain authority."
      },
      {
        "name": "FlowDefinitionId",
        "type": "VARCHAR(191)",
        "nullable": false,
        "label": "Flow Definition Id"
      },
      {
        "name": "FlowVersionId",
        "type": "VARCHAR(191)",
        "nullable": false,
        "label": "Flow Version Id"
      },
      {
        "name": "ScheduleWindowKey",
        "type": "VARCHAR(191)",
        "nullable": false,
        "label": "Schedule Window Key"
      },
      {
        "name": "WindowToken",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Window Token"
      },
      {
        "name": "InputKey",
        "type": "VARCHAR(191)",
        "nullable": false,
        "label": "Input Key"
      },
      {
        "name": "State",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'RESERVED'",
        "label": "State"
      },
      {
        "name": "Status",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Status"
      },
      {
        "name": "Attempt",
        "type": "INT",
        "nullable": false,
        "default": "1",
        "label": "Attempt"
      },
      {
        "name": "LeaseToken",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Lease Token"
      },
      {
        "name": "LeaseExpiresAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Lease Expires At"
      },
      {
        "name": "EntryElement",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Timed Flow Entry Element"
      },
      {
        "name": "DueAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Timed Flow Due At"
      },
      {
        "name": "OwnershipEpoch",
        "type": "DECIMAL(20,0)",
        "nullable": true,
        "label": "Ownership Epoch"
      },
      {
        "name": "MetadataBinding",
        "type": "MEDIUMTEXT",
        "nullable": true,
        "label": "Immutable Runtime Metadata Binding"
      },
      {
        "name": "InputPayloadFormatVersion",
        "type": "BIGINT",
        "nullable": true,
        "label": "Scheduled Input Payload Format Version"
      },
      {
        "name": "InputPayload",
        "type": "MEDIUMBLOB",
        "nullable": true,
        "label": "Canonical Scheduled Inputs"
      },
      {
        "name": "ReservedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Reserved At"
      },
      {
        "name": "CompletedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Completed At"
      },
      {
        "name": "LastError",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Last Error"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uq_scheduled_run_reservation_identity",
        "columns": [
          "OccurrenceIdentityDigest"
        ],
        "unique": true
      },
      {
        "name": "idx__System_ScheduledRunReservation_state",
        "columns": [
          "State"
        ]
      },
      {
        "name": "idx_scheduled_run_reservation_claim",
        "columns": [
          "Status",
          "LeaseExpiresAt",
          "Id"
        ]
      },
      {
        "name": "idx_scheduled_run_reservation_due",
        "columns": [
          "Status",
          "DueAt",
          "Id"
        ]
      },
      {
        "name": "idx_scheduled_run_reservation_scope_claim",
        "columns": [
          "OrgId",
          "AppInstallationId",
          "RuntimeCapabilityId",
          "Status",
          "LeaseExpiresAt"
        ]
      },
      {
        "name": "idx_scheduled_run_reservation_scope_due",
        "columns": [
          "OrgId",
          "AppInstallationId",
          "RuntimeCapabilityId",
          "Status",
          "DueAt"
        ]
      },
      {
        "name": "idx_scheduled_run_reservation_batch",
        "columns": [
          "BatchIdentityDigest"
        ]
      }
    ]
  },
  {
    "tableName": "_System_RequestCapture",
    "tableType": "system_core",
    "category": "audit",
    "label": "Request Capture",
    "description": "Replay/capture of inbound HTTP requests for behavior-equivalence validation (design §14.2). Joined to _System_AuditLog by RequestId. Bodies are always scrubbed per §14.3 before insert (no raw PII stored). No middleware writer in C13 — capture middleware lands in C14; default-off response-body capture is Phase 2C. §14.2 specifies LONGBLOB + composite PK + partitioning; C13 ships LONGTEXT + single-column PK (RequestId is a UUID) as a pragmatic subset matching the current DDL validator. Binary-body handling per §14.3 already substitutes a text sentinel, so LONGTEXT does not lose information.",
    "requiredReadPermission": "ViewAllData,ModifyAllData",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "RequestId",
        "type": "VARCHAR(64)",
        "primaryKey": true,
        "nullable": false,
        "label": "Request Id"
      },
      {
        "name": "ReceivedAt",
        "type": "DATETIME(6)",
        "nullable": false,
        "label": "Received At"
      },
      {
        "name": "Method",
        "type": "VARCHAR(10)",
        "nullable": false,
        "label": "HTTP Method"
      },
      {
        "name": "Path",
        "type": "VARCHAR(512)",
        "nullable": false,
        "label": "Path"
      },
      {
        "name": "Query",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Query String"
      },
      {
        "name": "Headers",
        "type": "JSON",
        "nullable": true,
        "label": "Headers (scrubbed)"
      },
      {
        "name": "Body",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Request Body (scrubbed)"
      },
      {
        "name": "BodySize",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Body Size (raw, pre-scrub)"
      },
      {
        "name": "BodyTruncated",
        "type": "BOOLEAN",
        "nullable": false,
        "default": "FALSE",
        "label": "Body Truncated"
      },
      {
        "name": "ResponseStatus",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Response Status"
      },
      {
        "name": "ResponseBody",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Response Body (default-off, §14.4)"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "User Id"
      },
      {
        "name": "SessionId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Session Id"
      },
      {
        "name": "ClientIp",
        "type": "VARCHAR(45)",
        "nullable": true,
        "label": "Client Ip"
      },
      {
        "name": "Entrypoint",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'REST_API'",
        "label": "Entrypoint"
      },
      {
        "name": "LatencyMs",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Latency Ms"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_time",
        "columns": [
          "ReceivedAt"
        ]
      },
      {
        "name": "idx_user",
        "columns": [
          "UserId",
          "ReceivedAt"
        ]
      },
      {
        "name": "idx_path",
        "columns": [
          "Path",
          "ReceivedAt"
        ]
      }
    ]
  },
  {
    "tableName": "_System_SystemLog",
    "tableType": "system_core",
    "category": "utility",
    "description": "System operation logs",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Timestamp",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Timestamp"
      },
      {
        "name": "Level",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Level"
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Source"
      },
      {
        "name": "Message",
        "type": "TEXT",
        "nullable": false,
        "label": "Message"
      },
      {
        "name": "Details",
        "type": "TEXT",
        "nullable": true,
        "label": "Details"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "Notification",
    "tableType": "system_core",
    "category": "system",
    "description": "User notifications",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "recipient_id",
        "type": "VARCHAR(255)",
        "nullable": false,
        "physicalName": "`RecipientId`",
        "label": "Recipient Id"
      },
      {
        "name": "title",
        "type": "VARCHAR(255)",
        "nullable": false,
        "physicalName": "`Title`",
        "label": "Title"
      },
      {
        "name": "body",
        "type": "TEXT",
        "physicalName": "`Body`",
        "label": "Body"
      },
      {
        "name": "link",
        "type": "TEXT",
        "physicalName": "`Link`",
        "label": "Link"
      },
      {
        "name": "is_read",
        "type": "TINYINT(1)",
        "default": "0",
        "physicalName": "`IsRead`",
        "label": "Is Read"
      },
      {
        "name": "notification_type",
        "type": "VARCHAR(255)",
        "physicalName": "`NotificationType`",
        "label": "Notification Type"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "recipient_id"
        ]
      },
      {
        "columns": [
          "is_read"
        ]
      }
    ]
  },
  {
    "tableName": "_System_File",
    "tableType": "system_core",
    "keyPrefix": "!q0",
    "category": "system",
    "description": "File attachments",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Id"
      },
      {
        "name": "ParentObjectApiName",
        "type": "VARCHAR(128)",
        "nullable": false,
        "default": "'Unknown'",
        "label": "Parent Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "OriginalFileName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Original File Name"
      },
      {
        "name": "Extension",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Extension"
      },
      {
        "name": "MimeType",
        "type": "VARCHAR(255)",
        "label": "Mime Type"
      },
      {
        "name": "SizeBytes",
        "type": "BIGINT",
        "default": "0",
        "label": "Size Bytes"
      },
      {
        "name": "StoragePath",
        "type": "TEXT",
        "label": "Storage Path"
      },
      {
        "name": "StorageProvider",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'s3'",
        "label": "Storage Provider"
      },
      {
        "name": "StorageBucket",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Storage Bucket"
      },
      {
        "name": "StorageKey",
        "type": "VARCHAR(1024)",
        "nullable": false,
        "default": "''",
        "label": "Storage Key"
      },
      {
        "name": "Status",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'Active'",
        "label": "Status"
      },
      {
        "name": "SourceType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'native'",
        "label": "Source Type"
      },
      {
        "name": "SourceContentDocumentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Content Document Id"
      },
      {
        "name": "SourceContentVersionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Content Version Id"
      },
      {
        "name": "AttachmentKind",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'record'",
        "label": "Attachment Kind"
      },
      {
        "name": "SlotKey",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Slot Key"
      },
      {
        "name": "Checksum",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Checksum"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "DeletedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Deleted By Id"
      },
      {
        "name": "DeletedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Deleted Date"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx__System_File_source_doc",
        "columns": [
          "SourceContentDocumentId",
          "ParentId"
        ]
      },
      {
        "name": "uk__System_File_slot",
        "columns": [
          "ParentObjectApiName",
          "ParentId",
          "SlotKey"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_FileUploadOperation",
    "tableType": "system_core",
    "category": "system",
    "description": "Durable upload operation state for file-service idempotency and recovery",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "IdempotencyKey",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Idempotency Key"
      },
      {
        "name": "RequestHash",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Request Hash"
      },
      {
        "name": "State",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'PREPARED'",
        "label": "State"
      },
      {
        "name": "OwnerToken",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Owner Token",
        "description": "Opaque fencing token for the upload attempt that owns ObjectKey.",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "ObjectKey",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Object Key"
      },
      {
        "name": "StorageProvider",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Storage Provider",
        "description": "Immutable provider authority for the upload-attempt object, retained even when file metadata is absent."
      },
      {
        "name": "StorageBucket",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Storage Bucket",
        "description": "Immutable bucket authority for the upload-attempt object, retained even when file metadata is absent."
      },
      {
        "name": "StorageAuthorityDigest",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Storage Authority Digest",
        "description": "Non-secret digest binding the upload attempt to the deployment storage mapping used when it was created."
      },
      {
        "name": "SystemFileId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "System File Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Id"
      },
      {
        "name": "ParentObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Object Api Name"
      },
      {
        "name": "ErrorCode",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Error Code"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "RetryCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Retry Count"
      },
      {
        "name": "RepairId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Repair Id"
      },
      {
        "name": "RepairReason",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Repair Reason"
      },
      {
        "name": "RepairCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Repair Count"
      },
      {
        "name": "LastRepairAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Last Repair At"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Expires At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uk__System_FileUploadOperation_idempotency",
        "columns": [
          "IdempotencyKey"
        ],
        "unique": true
      },
      {
        "name": "idx__System_FileUploadOperation_expires",
        "columns": [
          "ExpiresAt"
        ]
      },
      {
        "name": "idx__System_FileUploadOperation_lifecycle",
        "columns": [
          "State",
          "ExpiresAt",
          "Id"
        ]
      }
    ]
  },
  {
    "tableName": "Group",
    "keyPrefix": "00G",
    "tableType": "system_core",
    "category": "auth",
    "description": "Groups and Queues",
    "requiredWritePermission": "ManageSharing",
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.group-user-role-reference" },
          { "phase": "before_update", "capability": "platform.security.write.group-user-role-reference" },
          { "phase": "before_delete", "capability": "platform.security.write.soft-delete-reference-guard" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Salesforce-compatible API name (alphanumeric + underscores)",
        "label": "Developer Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "default": "'Regular'",
        "label": "Type"
      },
      {
        "name": "Email",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Email"
      },
      {
        "name": "UserRoleId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "UserRole"
        ],
        "label": "User Role"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "foreignKeys": [
      {
        "column": "UserRoleId",
        "references": "UserRole(Id)",
        "onDelete": "RESTRICT"
      }
    ]
  },
  {
    "tableName": "GroupMember",
    "keyPrefix": "011",
    "tableType": "system_core",
    "category": "auth",
    "description": "Group membership",
    "requiredWritePermission": "ManageSharing",
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.role-backed-group-member" },
          { "phase": "before_update", "capability": "platform.security.write.role-backed-group-member" },
          { "phase": "before_delete", "capability": "platform.security.write.role-backed-group-member" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "GroupId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Group Id"
      },
      {
        "name": "UserOrGroupId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "User Or Group Id",
        "logicalType": "reference",
        "referenceTo": ["User", "Group"],
        "isPolymorphic": true
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Groupid",
          "Userorgroupid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "GroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_GroupMembershipClosure",
    "tableType": "system_core",
    "category": "auth",
    "description": "Transitive group membership closure derived from GroupMember",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "GroupId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Group Id"
      },
      {
        "name": "MemberId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Member Id"
      },
      {
        "name": "MemberType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Member Type"
      },
      {
        "name": "Depth",
        "type": "INT",
        "nullable": false,
        "default": "1",
        "label": "Depth"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uq_gmc_group_member",
        "columns": [
          "GroupId",
          "MemberType",
          "MemberId"
        ],
        "unique": true
      },
      {
        "name": "idx_gmc_member_group",
        "columns": [
          "MemberType",
          "MemberId",
          "GroupId"
        ]
      },
      {
        "name": "idx_gmc_group_type",
        "columns": [
          "GroupId",
          "MemberType"
        ]
      }
    ]
  },
  {
    "tableName": "QueueSobject",
    "tableType": "system_core",
    "category": "auth",
    "description": "Mapping of Queues to supported Object types",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "QueueId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Queue Id"
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Sobject Type"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Queueid",
          "Sobjecttype"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "QueueId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSet",
    "permissionSetDefinitionRelation": {
      "role": "root"
    },
    "keyPrefix": "0PS",
    "tableType": "system_core",
    "category": "auth",
    "description": "Additive permission sets",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set.v1",
      "semanticFields": ["ProfileId", "IsOwnedByProfile", "IsDeleted"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permissions" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.soft-delete-reference-guard" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_delete", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_purge", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "self": true, "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsCustom",
        "label": "Is Custom",
        "type": "TINYINT(1)",
        "default": "1",
        "description": "Salesforce: Indicates if permission set was created by admin (true) vs system (false)"
      },
      {
        "name": "AuthoringRevision",
        "type": "DECIMAL(20,0)",
        "nullable": false,
        "default": "1",
        "label": "Permission Authoring Revision",
        "writeProtectionPolicy": "trusted_only",
        "description": "Permissions-owned optimistic concurrency revision for the complete PermissionSet authoring aggregate"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "ProfileId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Profile ID",
        "description": "Reference to Profile when IsOwnedByProfile=true (Salesforce standard)"
      },
      {
        "name": "IsOwnedByProfile",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Owned By Profile",
        "description": "True if this PermissionSet is the implicit one backing a Profile"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Pack",
        "writeProtectionPolicy": "trusted_only",
        "description": "Pack that owns this Permission Set definition; null for administrator-owned Permission Sets"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProfileId"
        ],
        "unique": false
      },
      {
        "name": "idx_profile_owned_permset",
        "columns": [
          "ProfileId",
          "IsOwnedByProfile"
        ],
        "unique": true
      },
      {
        "name": "idx_permission_set_owner_pack",
        "columns": [
          "OwnerPack"
        ],
        "unique": false
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetAssignmentPolicyClaim",
    "assignmentPolicyStoreRole": "claim",
    "permissionSetDefinitionRelation": {
      "role": "negative_edge",
      "parentField": "PermissionSetId"
    },
    "tableType": "system_core",
    "category": "auth",
    "description": "Exclusive continuous assignment-policy authority for one Permission Set definition",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED",
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" }
        ]
      }
    },
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Record ID" },
      { "name": "PermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Permission Set ID" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack" },
      { "name": "PolicyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Policy Key" },
      { "name": "PayloadHash", "type": "BINARY(32)", "nullable": false, "label": "Payload Hash" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      {
        "name": "uq_ps_assignment_policy_target",
        "columns": ["PermissionSetId"],
        "unique": true
      },
      {
        "name": "uq_ps_assignment_policy_source",
        "columns": ["OwnerPack", "PolicyKey"],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "RESTRICT"
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetAssignmentPolicyReleaseReceipt",
    "tableType": "system_core",
    "category": "auth",
    "description": "Deprecated non-authoritative pre-activation release receipt shape retained for additive schema compatibility",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Record ID" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack" },
      { "name": "PolicyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Policy Key" },
      { "name": "TargetDomain", "type": "VARCHAR(255)", "nullable": false, "label": "Target Domain" },
      { "name": "PhysicalKey", "type": "VARBINARY(1024)", "nullable": false, "label": "Physical Key" },
      { "name": "PermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Released Permission Set ID" },
      { "name": "ReleasedGeneration", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Released Generation" },
      { "name": "ExactEmptyDigest", "type": "BINARY(32)", "nullable": false, "label": "Exact Empty Digest" },
      { "name": "ReleasedAt", "type": "DATETIME(6)", "nullable": false, "label": "Released At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      {
        "name": "uq_ps_assignment_policy_release_source",
        "columns": ["OwnerPack", "PolicyKey"],
        "unique": true
      },
      {
        "name": "idx_ps_assignment_policy_release_target",
        "columns": ["TargetDomain", "PhysicalKey"]
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetAssignmentPolicyTargetReleaseReceipt",
    "assignmentPolicyStoreRole": "release_receipt",
    "tableType": "system_core",
    "category": "auth",
    "description": "Bounded proof that one continuous assignment policy released one exact physical target after exact-empty reconciliation",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Record ID" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack" },
      { "name": "PolicyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Policy Key" },
      { "name": "TargetDomain", "type": "VARCHAR(255)", "nullable": false, "label": "Target Domain" },
      { "name": "PhysicalKey", "type": "VARBINARY(1024)", "nullable": false, "label": "Physical Key" },
      { "name": "PermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Released Permission Set ID" },
      { "name": "ReleasedGeneration", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Released Generation" },
      { "name": "ExactEmptyDigest", "type": "BINARY(32)", "nullable": false, "label": "Exact Empty Digest" },
      { "name": "ReleasedAt", "type": "DATETIME(6)", "nullable": false, "label": "Released At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      {
        "name": "uq_ps_assignment_policy_release_source_target",
        "columns": ["OwnerPack", "PolicyKey", "PermissionSetId"],
        "unique": true
      },
      {
        "name": "idx_ps_assignment_policy_release_target",
        "columns": ["TargetDomain", "PhysicalKey"]
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetAssignmentPolicySelector",
    "assignmentPolicyStoreRole": "profile_selector",
    "tableType": "system_core",
    "category": "auth",
    "description": "Normalized Profile-name selectors for one continuous Permission Set assignment policy",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Record ID" },
      { "name": "PermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Permission Set ID" },
      { "name": "ProfileName", "type": "VARCHAR(255)", "nullable": false, "label": "Profile Name" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      {
        "name": "uq_ps_assignment_policy_profile",
        "columns": ["PermissionSetId", "ProfileName"],
        "unique": true
      },
      {
        "name": "idx_ps_assignment_policy_profile_target",
        "columns": ["ProfileName", "PermissionSetId"]
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetAssignmentPolicyTombstoneReceipt",
    "assignmentPolicyStoreRole": "tombstone_receipt",
    "tableType": "system_core",
    "category": "auth",
    "description": "Exact positive provenance for one assignment row soft-deleted by continuous assignment policy authority",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Record ID" },
      { "name": "AssignmentId", "type": "VARCHAR(255)", "nullable": false, "label": "Permission Set Assignment ID" },
      { "name": "PermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Permission Set ID" },
      { "name": "AssigneeId", "type": "VARCHAR(255)", "nullable": false, "label": "Assignee ID" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack" },
      { "name": "PolicyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Policy Key" },
      { "name": "TombstonedGeneration", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Tombstoned Generation" },
      { "name": "TombstonedAt", "type": "DATETIME(6)", "nullable": false, "label": "Tombstoned At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      {
        "name": "uq_ps_assignment_policy_tombstone_assignment",
        "columns": ["AssignmentId"],
        "unique": true
      },
      {
        "name": "uq_ps_assignment_policy_tombstone_pair",
        "columns": ["PermissionSetId", "AssigneeId"],
        "unique": true
      },
      {
        "name": "idx_ps_assignment_policy_tombstone_policy",
        "columns": ["OwnerPack", "PolicyKey"]
      }
    ],
    "foreignKeys": [
      {
        "column": "AssignmentId",
        "references": "PermissionSetAssignment(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetAssignmentPolicyTargetState",
    "assignmentPolicyStoreRole": "target_state",
    "tableType": "system_core",
    "category": "auth",
    "description": "Durable target-scoped generation, retry, selector-resolution, and suspension state retained across assignment-policy release",
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Record ID" },
      { "name": "TargetDomain", "type": "VARCHAR(255)", "nullable": false, "label": "Target Domain" },
      { "name": "PhysicalKey", "type": "VARBINARY(1024)", "nullable": false, "label": "Physical Key" },
      { "name": "PermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Permission Set ID" },
      { "name": "Suspended", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Suspended" },
      { "name": "SuspensionActor", "type": "VARCHAR(255)", "nullable": true, "label": "Suspension Actor" },
      { "name": "SuspensionReason", "type": "VARCHAR(1024)", "nullable": true, "label": "Suspension Reason" },
      { "name": "SuspendedAt", "type": "DATETIME(6)", "nullable": true, "label": "Suspended At" },
      { "name": "WorkGeneration", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Work Generation" },
      { "name": "AppliedGeneration", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Applied Generation" },
      { "name": "NextAttemptAt", "type": "DATETIME(6)", "nullable": true, "label": "Next Attempt At" },
      { "name": "RetryCount", "type": "INT", "nullable": false, "default": "0", "label": "Retry Count" },
      { "name": "LastFailureCode", "type": "VARCHAR(64)", "nullable": true, "label": "Last Failure Code" },
      { "name": "LastFailureDigest", "type": "BINARY(32)", "nullable": true, "label": "Last Failure Digest" },
      { "name": "ResolutionState", "type": "VARCHAR(32)", "nullable": false, "default": "'unclaimed'", "label": "Resolution State" },
      { "name": "ResolutionDigest", "type": "BINARY(32)", "nullable": true, "label": "Resolution Digest" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      {
        "name": "uq_ps_assignment_policy_physical_target",
        "columns": ["TargetDomain", "PhysicalKey"],
        "unique": true
      },
      {
        "name": "uq_ps_assignment_policy_definition",
        "columns": ["PermissionSetId"],
        "unique": true
      },
      {
        "name": "idx_ps_assignment_policy_due",
        "columns": ["NextAttemptAt", "TargetDomain", "PhysicalKey"]
      },
      {
        "name": "idx_ps_assignment_policy_suspended",
        "columns": ["Suspended", "TargetDomain", "PhysicalKey"]
      }
    ]
  },
  {
    "tableName": "PermissionSetAssignment",
    "permissionSetDefinitionRelation": {
      "role": "separate_assignment",
      "parentField": "PermissionSetId"
    },
    "keyPrefix": "0Pa",
    "tableType": "system_core",
    "category": "auth",
    "description": "Assignment of permission sets to users",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-assignment.v1",
      "semanticFields": ["AssigneeId", "PermissionSetId", "IsDeleted"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permission-set-assignment-users" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.permission-set-assignment-target" },
          { "phase": "before_update", "capability": "platform.security.write.permission-set-assignment-target" },
          { "phase": "before_delete", "capability": "platform.security.write.permission-set-assignment-target" },
          { "phase": "before_restore", "capability": "platform.security.write.permission-set-assignment-target" },
          { "phase": "before_purge", "capability": "platform.security.write.permission-set-assignment-target" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "AssigneeId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Assignee Id"
      },
      {
        "name": "PermissionSetId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Permission Set Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_psa_assignee_permset",
        "columns": [
          "Assigneeid",
          "Permissionsetid"
        ],
        "unique": true
      },
      {
        "name": "idx_psa_permset_assignee",
        "columns": [
          "Permissionsetid",
          "Assigneeid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "AssigneeId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_RecordShare",
    "tableType": "system_core",
    "keyPrefix": "!r0",
    "category": "auth",
    "requiredWritePermission": "ManageSharing",
    "description": "Manual record sharing with users or groups",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "ShareWithUserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With User Id"
      },
      {
        "name": "ShareWithGroupId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With Group Id"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Read'",
        "label": "Access Level"
      },
      {
        "name": "Reason",
        "type": "VARCHAR(255)",
        "default": "'Manual'",
        "label": "Reason"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_recordshare_record",
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "name": "idx_recordshare_user",
        "columns": [
          "Sharewithuserid"
        ]
      },
      {
        "name": "idx_recordshare_group",
        "columns": [
          "Sharewithgroupid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ShareWithUserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "ShareWithGroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_TeamMember",
    "tableType": "system_core",
    "category": "auth",
    "description": "Generic record team members",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "User Id"
      },
      {
        "name": "TeamRole",
        "type": "VARCHAR(255)",
        "default": "'Team Member'",
        "label": "Team Role"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Read'",
        "label": "Access Level"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_teammember_record",
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "name": "idx_teammember_user",
        "columns": [
          "Userid"
        ]
      },
      {
        "name": "idx_teammember_unique",
        "columns": [
          "Objectapiname",
          "Recordid",
          "Userid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_ApprovalProcess",
    "tableType": "system_core",
    "category": "automation",
    "description": "Approval process definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "EntryCriteria",
        "type": "TEXT",
        "nullable": true,
        "label": "Entry Criteria"
      },
      {
        "name": "ApproverType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'User'",
        "label": "Approver Type"
      },
      {
        "name": "ApproverId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Approver Id"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false,
        "label": "Is Active"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_approvalprocess_object",
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "name": "idx_approvalprocess_name",
        "columns": [
          "Name"
        ],
        "unique": true
      },
      {
        "name": "idx_approvalprocess_created_date",
        "columns": [
          "Createddate"
        ]
      },
      {
        "name": "idx_approvalprocess_last_modified_date",
        "columns": [
          "Lastmodifieddate"
        ]
      }
    ],
    "foreignKeys": []
  },
  {
    "tableName": "_System_ApprovalWorkItem",
    "tableType": "system_core",
    "category": "automation",
    "description": "Pending approval work items",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ProcessId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Process Id"
      },
      {
        "name": "FlowInstanceId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Flow Instance Id"
      },
      {
        "name": "FlowStepId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Flow Step Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Pending'",
        "label": "Status"
      },
      {
        "name": "SubmittedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Submitted By Id"
      },
      {
        "name": "SubmittedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Submitted Date"
      },
      {
        "name": "ApproverId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Approver Id"
      },
      {
        "name": "ApprovedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Approved By Id"
      },
      {
        "name": "ApprovedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Approved Date"
      },
      {
        "name": "Comments",
        "type": "TEXT",
        "nullable": true,
        "label": "Comments"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_approvalworkitem_process",
        "columns": [
          "Processid"
        ]
      },
      {
        "name": "idx_approvalworkitem_record",
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "name": "idx_approvalworkitem_status",
        "columns": [
          "Status"
        ]
      },
      {
        "name": "idx_approvalworkitem_approver",
        "columns": [
          "Approverid"
        ]
      },
      {
        "name": "idx_approvalworkitem_submitted_by_id",
        "columns": [
          "Submittedbyid"
        ]
      },
      {
        "name": "idx_approvalworkitem_created_date",
        "columns": [
          "Createddate"
        ]
      },
      {
        "name": "idx_approvalworkitem_last_modified_date",
        "columns": [
          "Lastmodifieddate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessId",
        "references": "_System_ApprovalProcess(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "SubmittedById",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "ApproverId",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_ApprovalActionOutbox",
    "tableType": "system_core",
    "category": "automation",
    "label": "Approval Action Outbox",
    "description": "Durable approval lifecycle action replay queue. Recall FieldUpdate rows are inserted in the same transaction as the approval runtime state transition and drained by the approval action replay worker.",
    "requiredReadPermission": "ViewAllData,ModifyAllData",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "BIGINT",
        "primaryKey": true,
        "autoIncrement": true,
        "label": "Id"
      },
      {
        "name": "LifecycleEvent",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Lifecycle Event"
      },
      {
        "name": "ProcessInstanceId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Process Instance Id"
      },
      {
        "name": "TargetObjectId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Target Object Id"
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": false,
        "label": "Payload"
      },
      {
        "name": "Status",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'pending'",
        "label": "Status"
      },
      {
        "name": "Attempts",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Attempts"
      },
      {
        "name": "NextAttemptAt",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Next Attempt At"
      },
      {
        "name": "LeaseHolderId",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Lease Holder Id"
      },
      {
        "name": "LeaseExpiresAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Lease Expires At"
      },
      {
        "name": "LastError",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Last Error"
      },
      {
        "name": "ProcessedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Processed At"
      },
      {
        "name": "FailedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Failed At"
      },
      {
        "name": "AlertedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Alerted At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_approval_action_outbox_due",
        "columns": [
          "Status",
          "NextAttemptAt",
          "CreatedDate"
        ]
      },
      {
        "name": "idx_approval_action_outbox_lease",
        "columns": [
          "Status",
          "LeaseExpiresAt"
        ]
      },
      {
        "name": "idx_approval_action_outbox_process",
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "name": "idx_approval_action_outbox_target",
        "columns": [
          "TargetObjectId"
        ]
      }
    ]
  },
  {
    "tableName": "_System_ApprovalActionLog",
    "tableType": "system_core",
    "category": "automation",
    "label": "Approval Action Log",
    "description": "Terminal outcome of each approval action request (approve / reject / recall / reassign / submit), written out of band so the row survives the rollback it describes. One row per transaction ATTEMPT of one approval action request, not per action execution: the unit whose outcome was previously unrecoverable is the enclosing transaction, and every element inside it is already covered by _System_FlowAuditLog. A pessimistic retry re-enters the transaction and emits another row, so a request needing three attempts leaves three rows sharing one RequestId - which is itself the lock-contention evidence, and is why rows are grouped by RequestId rather than assumed unique per request. Outcome mirrors the platform's four terminal transaction outcomes (committed, rolled_back, commit_error, rollback_error); the last two are ambiguous by construction, because an error is not proof that rollback completed, and collapsing them onto rolled_back would assert a rollback that may never have happened. FailureCause carries the transaction error text, normalized for encoding and length but NOT redacted: an arbitrary error string has no structure a writer could redact without guessing, and this platform withholds value-bearing detail where the error is CONSTRUCTED instead (see approval_criteria.go, 'engine detail withheld: it may embed field values'). Exposure is bounded by the read gate rather than by the writer, which is why requiredReadPermission is the privileged-data tier per docs/design/system-tables-permissions.md. Identifier columns are never shortened - a truncated identifier names something else - so an id that does not fit as given is stored as NULL. MaterializedActionCount records how many ProcessAction rows the event actually resolved, so 'no actions were configured' stays distinguishable from 'authored actions were never materialized' (NX#4150 Class C). Rows are written by ApprovalService through its own database handle outside the caller transaction, synchronously and best-effort - never at-most-once, because an absent row must mean the request never reached the boundary.",
    "requiredReadPermission": "ViewAllData,ModifyAllData",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ActionEvent",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Action Event"
      },
      {
        "name": "WorkItemId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Work Item Id"
      },
      {
        "name": "ProcessInstanceId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Process Instance Id"
      },
      {
        "name": "ProcessDefinitionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Process Definition Id"
      },
      {
        "name": "TargetObjectId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Target Object Id"
      },
      {
        "name": "ActorId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Actor Id",
        "description": "Loose reference to the User who requested the action; no FK constraint (synthetic system actors have no persisted User row)."
      },
      {
        "name": "RequestedStatus",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Requested Status"
      },
      {
        "name": "Outcome",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Outcome"
      },
      {
        "name": "FailureClass",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Failure Class"
      },
      {
        "name": "FailureCause",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Failure Cause"
      },
      {
        "name": "MaterializedActionCount",
        "type": "INT",
        "nullable": true,
        "label": "Materialized Action Count",
        "description": "Number of ProcessAction rows the event resolved. NULL means the request failed before resolution was reached; 0 means the event resolved no actions at all."
      },
      {
        "name": "DurationMs",
        "type": "INT",
        "nullable": false,
        "label": "Duration Ms"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id",
        "description": "Loose reference to the User who created this record; no FK constraint (synthetic system actors have no persisted User row)."
      },
      {
        "name": "RequestId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Request Id",
        "description": "Correlation identifier from middleware.RequestID (X-Request-ID). VARCHAR(64) to match _System_AuditLog.RequestId and _System_RequestCapture.RequestId exactly - a wider column here would accept ids those tables cannot store, producing rows that look correlated and join to nothing. so a rolled-back approval can be joined to the request that issued it - a rollback leaves no other link."
      },
      {
        "name": "TraceId",
        "type": "CHAR(32)",
        "nullable": true,
        "label": "Trace Id",
        "description": "W3C trace-id extracted from the traceparent. CHAR(32) to match _System_AuditLog.TraceId exactly; the trace-id is 32 hex characters by specification, and a divergent width would break the join these columns exist for."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_approval_action_log_target",
        "columns": [
          "TargetObjectId",
          "CreatedDate"
        ]
      },
      {
        "name": "idx_approval_action_log_instance",
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "name": "idx_approval_action_log_outcome",
        "columns": [
          "Outcome",
          "CreatedDate"
        ]
      },
      {
        "name": "idx_approval_action_log_request",
        "columns": [
          "RequestId"
        ]
      },
      {
        "name": "idx_approval_action_log_created",
        "columns": [
          "CreatedDate"
        ]
      }
    ]
  },
  {
    "tableName": "_System_ApprovalSubmitLineage",
    "tableType": "system_core",
    "category": "automation",
    "label": "Approval Submit Lineage",
    "description": "Per-causal-chain approval submit dedup facts: one row per (after-save chain, target record, process definition), inserted inside the approval submit transaction so the fact is atomic with the approval state and visible to every later dispatch in the same chain regardless of outbox topology. Read by the SubmitForApproval flow actionCall's idempotency probe; rows are pruned opportunistically on write.",
    "requiredReadPermission": "ViewAllData,ModifyAllData",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "BIGINT",
        "primaryKey": true,
        "autoIncrement": true,
        "label": "Id"
      },
      {
        "name": "ChainId",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Chain Id"
      },
      {
        "name": "TargetObjectId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Target Object Id"
      },
      {
        "name": "ProcessDefinitionId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Process Definition Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uq_approval_submit_lineage",
        "columns": [
          "ChainId",
          "TargetObjectId",
          "ProcessDefinitionId"
        ],
        "unique": true
      },
      {
        "name": "idx_approval_submit_lineage_created",
        "columns": [
          "CreatedDate"
        ]
      }
    ]
  },
  {
    "tableName": "_System_UIComponent",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Registered UI components",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "default": "'page'",
        "label": "Type"
      },
      {
        "name": "IsEmbeddable",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Embeddable"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "ComponentPath",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Component Path"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Isembeddable"
        ]
      }
    ]
  },
  {
    "tableName": "_System_OutboxEvent",
    "tableType": "system_core",
    "category": "infrastructure",
    "description": "Transactional event outbox for guaranteed delivery",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "EventType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Type"
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": false,
        "label": "Payload"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'pending'",
        "label": "Status"
      },
      {
        "name": "RetryCount",
        "type": "INT",
        "default": "0",
        "label": "Retry Count"
      },
      {
        "name": "RecordKey",
        "type": "VARCHAR(512)",
        "nullable": true,
        "label": "Record Key",
        "description": "Stable object/record identity key used by outbox pull workers to preserve same-record FIFO ordering"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "ProcessedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Processed Date"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      },
      {
        "name": "metadata_json",
        "type": "JSON",
        "nullable": true,
        "label": "Metadata Json"
      }
    ],
    "indices": [
      {
        "columns": [
          "Status",
          "CreatedDate"
        ],
        "name": "idx_outbox_pending"
      },
      {
        "columns": [
          "RecordKey",
          "CreatedDate"
        ],
        "name": "idx_outbox_record_fifo"
      }
    ]
  },
  {
    "tableName": "_System_RecordEventOutbox",
    "tableType": "system_core",
    "category": "infrastructure",
    "description": "Dedicated transactional outbox for record-trigger events. Mirrors _System_OutboxEvent in the MVP so record-trigger write pressure can be isolated without changing publish/retry semantics.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "EventType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Type"
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": false,
        "label": "Payload"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'pending'",
        "label": "Status"
      },
      {
        "name": "ClaimToken",
        "type": "VARCHAR(36)",
        "nullable": true,
        "label": "Claim Token",
        "description": "Opaque identity of the current independently deployed worker claim; rotated on every reclaim",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "RetryCount",
        "type": "INT",
        "default": "0",
        "label": "Retry Count"
      },
      {
        "name": "RecordKey",
        "type": "VARCHAR(512)",
        "nullable": true,
        "label": "Record Key",
        "description": "Stable object/record identity key used by record-event outbox pull workers to preserve same-record FIFO ordering"
      },
      {
        "name": "OrgId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Org Id",
        "description": "Queryable routing projection of the immutable Runtime work binding; required for independently produced work"
      },
      {
        "name": "AppInstallationId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "App Installation Id",
        "description": "Installed App scope used only to select the owning Runtime Worker queue partition"
      },
      {
        "name": "RuntimeCapabilityId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Runtime Capability Id",
        "description": "Runtime capability scope used only to select the owning Runtime Worker queue partition"
      },
      {
        "name": "ExecutionScopeDigest",
        "type": "CHAR(64)",
        "nullable": true,
        "label": "Worker Execution Scope Digest",
        "description": "Bounded derived identity of OrgId, AppInstallationId, and RuntimeCapabilityId used to index the exact Runtime Worker queue partition"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "ProcessedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Processed Date"
      },
      {
        "name": "RepairId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Repair Id"
      },
      {
        "name": "RepairReason",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Repair Reason"
      },
      {
        "name": "RepairCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Repair Count"
      },
      {
        "name": "LastRepairAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Last Repair At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      },
      {
        "name": "metadata_json",
        "type": "JSON",
        "nullable": true,
        "label": "Metadata Json"
      }
    ],
    "indices": [
      {
        "columns": [
          "Status",
          "CreatedDate"
        ],
        "name": "idx_record_event_outbox_pending"
      },
      {
        "columns": [
          "RecordKey",
          "CreatedDate"
        ],
        "name": "idx_record_event_outbox_record_fifo"
      },
      {
        "columns": [
          "OrgId",
          "AppInstallationId",
          "RuntimeCapabilityId",
          "CreatedDate"
        ],
        "name": "idx_record_event_outbox_runtime_scope"
      },
      {
        "columns": [
          "ExecutionScopeDigest",
          "Status",
          "CreatedDate",
          "Id"
        ],
        "name": "idx_record_event_outbox_claim"
      }
    ]
  },
  {
    "tableName": "_System_Webhook",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "External webhook configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Url",
        "type": "TEXT",
        "nullable": false,
        "label": "Url"
      },
      {
        "name": "Method",
        "type": "VARCHAR(255)",
        "default": "'POST'",
        "label": "Method"
      },
      {
        "name": "Headers",
        "type": "TEXT",
        "label": "Headers"
      },
      {
        "name": "AuthType",
        "type": "VARCHAR(255)",
        "label": "Auth Type"
      },
      {
        "name": "AuthConfig",
        "type": "TEXT",
        "label": "Auth Config",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_NamedCredential",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Named credential definitions for outbound connector callouts (definition only; secret values live in _System_NamedCredentialSecret)",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Developer Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Endpoint",
        "type": "TEXT",
        "nullable": false,
        "label": "Endpoint"
      },
      {
        "name": "PrincipalType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Principal Type"
      },
      {
        "name": "AuthType",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Auth Type"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "label": "Owner Pack"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_NamedCredentialSecret",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Envelope-encrypted (AES-256-GCM) secret values bound to a NamedCredential. Excluded from pack payload hash material; storage column holds versioned ciphertext, never plaintext.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "NamedCredentialId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Named Credential Id"
      },
      {
        "name": "SecretKind",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Secret Kind"
      },
      {
        "name": "SecretValue",
        "type": "TEXT",
        "nullable": false,
        "label": "Secret Value"
      },
      {
        "name": "MaskedHint",
        "type": "VARCHAR(64)",
        "label": "Masked Hint"
      },
      {
        "name": "RotatedAt",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Rotated At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "NamedCredentialId",
          "SecretKind"
        ],
        "name": "ux_namedcred_secret_kind",
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "NamedCredentialId",
        "references": "_System_NamedCredential(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ConnectorRateLimit",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Per-(OwnerPack, EndpointClass) outbound rate-limit policy authored by connector packs (NCRM-INT-04B). Read by features/connector/throttle.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Owner Pack"
      },
      {
        "name": "EndpointClass",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Endpoint Class"
      },
      {
        "name": "RequestsPerSecond",
        "type": "DOUBLE",
        "nullable": false,
        "label": "Requests Per Second"
      },
      {
        "name": "Burst",
        "type": "INT",
        "nullable": false,
        "label": "Burst"
      },
      {
        "name": "Description",
        "type": "VARCHAR(255)",
        "label": "Description"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "OwnerPack",
          "EndpointClass"
        ],
        "name": "ux_connector_rate_limit_endpoint",
        "unique": true
      }
    ],
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ConnectorCalloutProfile",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Per-(InstalledPackId, ProfileName) outbound-callout profile snapshot authored by connector packs (NCRM-INT-10). Worker startup reads by exact installed-pack incarnation.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Installed Pack ID",
        "description": "PackInstallId — incarnation-scoped so inbound workers read the exact connector pack version that authored this profile."
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Owner Pack"
      },
      {
        "name": "ProfileName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Profile Name"
      },
      {
        "name": "CredentialRef",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Credential Ref"
      },
      {
        "name": "EndpointClass",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Endpoint Class"
      },
      {
        "name": "RetryPolicy",
        "type": "LONGTEXT",
        "nullable": false,
        "label": "Retry Policy"
      },
      {
        "name": "PageSpec",
        "type": "LONGTEXT",
        "nullable": false,
        "label": "Page Spec"
      },
      {
        "name": "BatchSpec",
        "type": "LONGTEXT",
        "nullable": false,
        "label": "Batch Spec"
      },
      {
        "name": "ObjectPathMap",
        "type": "LONGTEXT",
        "nullable": false,
        "label": "Object Path Map"
      },
      {
        "name": "Description",
        "type": "VARCHAR(255)",
        "label": "Description"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "OwnerPack",
          "ProfileName"
        ],
        "name": "idx_connector_callout_profile_owner"
      },
      {
        "columns": [
          "InstalledPackId",
          "ProfileName"
        ],
        "name": "ux_connector_callout_profile",
        "unique": true
      }
    ],
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_EmailTemplate",
    "keyPrefix": "00X",
    "tableType": "system_metadata",
    "category": "communication",
    "description": "Email templates for notifications",
    "sharingModel": "FolderContentSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Subject",
        "type": "VARCHAR(255)",
        "label": "Subject"
      },
      {
        "name": "HtmlValue",
        "type": "TEXT",
        "label": "Html Value"
      },
      {
        "name": "Body",
        "type": "TEXT",
        "label": "Body"
      },
      {
        "name": "FolderId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Folder Id"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "TemplateType",
        "type": "VARCHAR(255)",
        "default": "'custom'",
        "label": "Template Type"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "label": "Developer Name"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Pack",
        "description": "Source-backed app pack that owns this template. NULL/empty means historical or admin-authored inventory, not pack-owned behavior."
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "OwnerPack",
          "DeveloperName"
        ],
        "name": "ux_email_template_owner_developer_name",
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "FolderId",
        "references": "ReportFolder(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "CreatedById",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_FeedItem",
    "tableType": "system_metadata",
    "category": "collaboration",
    "description": "Feed items for chatter and notifications",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Id"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Type"
      },
      {
        "name": "Body",
        "type": "TEXT",
        "label": "Body"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_ConnectedApp",
    "keyPrefix": "!m0",
    "tableType": "system",
    "category": "security",
    "description": "OAuth Connected Apps",
    "requiredWritePermission": "CustomizeApplication",
    "deleteMode": "hard",
    "accessPolicy": {
      "writeValidation": {
        "canonicalizers": [
          {
            "phase": "before_create",
            "capability": "platform.security.write.connected-app-policy-canonicalization"
          },
          {
            "phase": "before_update",
            "capability": "platform.security.write.connected-app-policy-canonicalization"
          }
        ],
        "validators": [
          {
            "phase": "before_create",
            "capability": "platform.security.write.connected-app-policy"
          },
          {
            "phase": "before_update",
            "capability": "platform.security.write.connected-app-policy"
          }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "ConsumerKey",
        "label": "Consumer Key",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "writeProtectionPolicy": "immutable_after_create"
      },
      {
        "name": "ConsumerSecret",
        "label": "Consumer Secret",
        "type": "VARCHAR(255)",
        "nullable": true,
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "ConsumerSecretHash",
        "label": "Consumer Secret Hash",
        "type": "VARCHAR(255)",
        "nullable": true,
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "CallbackUrl",
        "label": "Callback URL",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "RedirectUris",
        "label": "Redirect URIs",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Scopes",
        "label": "Scopes",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "ClientType",
        "label": "Client Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'confidential'"
      },
      {
        "name": "RequirePkce",
        "label": "Require PKCE",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "TokenEndpointAuthMethod",
        "label": "Token Endpoint Auth Method",
        "type": "VARCHAR(80)",
        "nullable": true,
        "default": "'client_secret_post'"
      },
      {
        "name": "AllowedGrantTypes",
        "label": "Allowed Grant Types",
        "type": "TEXT",
        "nullable": true,
        "default": "'authorization_code password client_credentials'"
      },
      {
        "name": "ConsentPolicy",
        "label": "Consent Policy",
        "type": "VARCHAR(80)",
        "nullable": true,
        "default": "'prompt'"
      },
      {
        "name": "ConsentVersion",
        "label": "Consent Version",
        "type": "INT",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "IssueRefreshTokens",
        "label": "Issue Refresh Tokens",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "PublisherName",
        "label": "Publisher Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "SupportUrl",
        "label": "Support URL",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "RunAsUserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Run As User Id"
      },
      {
        "name": "PermittedUsers",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'AllUsers'",
        "label": "Permitted Users"
      },
      {
        "name": "SessionIssuerClass",
        "label": "Session Issuer Class",
        "type": "VARCHAR(80)",
        "nullable": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "DailyApiLimit",
        "label": "Daily API Limit",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "HourlyApiLimit",
        "label": "Hourly API Limit",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ApiToken",
    "tableType": "system_core",
    "category": "auth",
    "description": "Personal access tokens for programmatic API / MCP access (self-service, per-user)",
    "requiredWritePermission": "BLOCKED",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "Owner Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "TokenHash",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "readProtectionPolicy": "blocked",
        "label": "Token Hash"
      },
      {
        "name": "TokenPrefix",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Token Prefix"
      },
      {
        "name": "Scopes",
        "type": "TEXT",
        "nullable": true,
        "label": "Scopes"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Expires At"
      },
      {
        "name": "LastUsedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Last Used Date"
      },
      {
        "name": "IsRevoked",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Revoked"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "OwnerId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "OwnerId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "BLOCKED"
  },
  {
    "tableName": "_System_ConnectedAppAccess",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.connected-app-access.v1",
      "semanticFields": ["ConnectedAppId", "ProfileId", "PermissionSetId"]
    },
    "permissionSetDefinitionRelation": {
      "role": "negative_edge",
      "parentField": "PermissionSetId"
    },
    "keyPrefix": "!n0",
    "tableType": "system",
    "category": "security",
    "description": "Connected App access grants - which profiles/permsets can use which apps",
    "deleteMode": "hard",
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] }, { "hops": [ { "viaField": "PermissionSetId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ConnectedAppId",
        "label": "Connected App ID",
        "type": "VARCHAR(255)",
        "nullable": false,
        "referenceTo": ["_System_ConnectedApp"],
        "deleteRule": "Cascade"
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME"
      }
    ],
    "indices": [
      {
        "columns": [
          "ConnectedAppId"
        ]
      },
      {
        "columns": [
          "ProfileId"
        ]
      },
      {
        "columns": [
          "PermissionSetId"
        ]
      }
    ],
    "requiredWritePermission": "CustomizeApplication",
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_OAuthRefreshToken",
    "tableType": "system_core",
    "category": "auth",
    "description": "OAuth refresh tokens (hashed, rotating) issued to Connected App sessions",
    "requiredWritePermission": "BLOCKED",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "TokenHash",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "readProtectionPolicy": "blocked",
        "label": "Token Hash"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "User Id"
      },
      {
        "name": "ConnectedAppId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Connected App Id"
      },
      {
        "name": "FamilyId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Family Id"
      },
      {
        "name": "ConsentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Authorization Grant Id"
      },
      {
        "name": "Scope",
        "type": "TEXT",
        "nullable": true,
        "label": "Scope"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Expires At"
      },
      {
        "name": "IsRevoked",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Revoked"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId"
        ]
      },
      {
        "columns": [
          "FamilyId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "BLOCKED"
  },
  {
    "tableName": "_System_OAuthCustomScope",
    "tableType": "system",
    "category": "security",
    "description": "Custom OAuth scope definitions mapped to custom permissions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Scope Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CustomPermissionId",
        "label": "Custom Permission ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AllowedClientTypes",
        "label": "Allowed Client Types",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "AllowedMethods",
        "label": "Allowed HTTP Methods",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "RoutePatterns",
        "label": "Route Patterns",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ResourceLinks",
        "label": "Resource Links",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "OwnerPack",
        "label": "Owner Pack",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME"
      }
    ],
    "indices": [
      {
        "columns": [
          "Name"
        ],
        "unique": true
      }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "Dashboard",
    "keyPrefix": "01Z",
    "tableType": "system",
    "category": "analytics",
    "label": "Dashboard",
    "description": "Dashboard Definitions",
    "sharingModel": "FolderContentSharing",
    "requiredWritePermission": "ManageDashbdsInPubFolders",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "FolderId",
        "label": "Folder",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ReportFolder"
        ]
      },
      {
        "name": "LayoutType",
        "label": "Layout Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Grid'"
      },
      {
        "name": "FilterMode",
        "label": "Filter Mode",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LayoutMode",
        "label": "Layout Mode",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "StartDate",
        "label": "Start Date",
        "type": "DATE",
        "nullable": true
      },
      {
        "name": "EndDate",
        "label": "End Date",
        "type": "DATE",
        "nullable": true
      },
      {
        "name": "DateRangeType",
        "label": "Date Range Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "DashboardType",
        "label": "Dashboard Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'LoggedInUser'"
      },
      {
        "name": "RunningUserId",
        "label": "Running User",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "DashboardComponent",
    "keyPrefix": "01a",
    "tableType": "system",
    "category": "analytics",
    "label": "Dashboard Component",
    "description": "Dashboard Widgets",
    "sharingModel": "ControlledByParent",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "DashboardId",
        "label": "Dashboard",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Dashboard"
        ]
      },
      {
        "name": "ReportId",
        "label": "Report",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "Report"
        ]
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Title",
        "label": "Title",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Config",
        "label": "Configuration",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "_System_OAuthCode",
    "tableType": "system",
    "category": "security",
    "description": "OAuth Authorization Codes for the OAuth 2.0 flow",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Code",
        "label": "Authorization Code",
        "type": "VARCHAR(255)",
        "nullable": true,
        "unique": true,
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "CodeHash",
        "label": "Authorization Code Hash",
        "type": "VARCHAR(255)",
        "nullable": true,
        "unique": true,
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "ClientId",
        "label": "Client ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "RedirectUri",
        "label": "Redirect URI",
        "type": "TEXT",
        "nullable": false
      },
      {
        "name": "Scope",
        "label": "Scope",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "UserId",
        "label": "User ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Nonce",
        "label": "Nonce",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ExpiresAt",
        "label": "Expires At",
        "type": "DATETIME",
        "nullable": false
      },
      {
        "name": "Used",
        "label": "Used",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "CodeChallenge",
        "label": "Code Challenge",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CodeChallengeMethod",
        "label": "Code Challenge Method",
        "type": "VARCHAR(50)",
        "nullable": true
      },
      {
        "name": "AuthTime",
        "label": "Auth Time",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "Issuer",
        "label": "Issuer",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ConsentId",
        "label": "Consent ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ClientTypeAtIssue",
        "label": "Client Type At Issue",
        "type": "VARCHAR(50)",
        "nullable": true
      },
      {
        "name": "Resource",
        "label": "Protected Resource",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "CodeHash"
        ]
      },
      {
        "columns": [
          "ClientId"
        ]
      },
      {
        "columns": [
          "ExpiresAt"
        ]
      }
    ],
    "requiredReadPermission": "BLOCKED"
  },
  {
    "tableName": "_System_OAuthAuthorizeRequest",
    "tableType": "system",
    "category": "security",
    "description": "Pre-login OAuth authorize request snapshots for browser login/resume",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "HandleHash",
        "label": "Authorize Handle Hash",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "ClientId",
        "label": "Client ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "RedirectUri",
        "label": "Redirect URI",
        "type": "TEXT",
        "nullable": false
      },
      {
        "name": "Scope",
        "label": "Scope",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "State",
        "label": "OAuth State",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CodeChallenge",
        "label": "Code Challenge",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CodeChallengeMethod",
        "label": "Code Challenge Method",
        "type": "VARCHAR(50)",
        "nullable": false
      },
      {
        "name": "Issuer",
        "label": "Issuer",
        "type": "TEXT",
        "nullable": false
      },
      {
        "name": "Resource",
        "label": "Protected Resource",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ExpiresAt",
        "label": "Expires At",
        "type": "DATETIME",
        "nullable": false
      },
      {
        "name": "Used",
        "label": "Used",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "HandleHash"
        ]
      },
      {
        "columns": [
          "ClientId"
        ]
      },
      {
        "columns": [
          "ExpiresAt"
        ]
      }
    ]
  },
  {
    "tableName": "_System_OAuthConsent",
    "tableType": "system",
    "category": "security",
    "description": "OAuth user consent grants for connected applications",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "ViewSetup",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "UserId",
        "label": "User ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "ConnectedAppId",
        "label": "Connected App ID",
        "type": "VARCHAR(255)",
        "nullable": false,
        "referenceTo": ["_System_ConnectedApp"],
        "deleteRule": "Cascade"
      },
      {
        "name": "Scope",
        "label": "Scope",
        "type": "TEXT",
        "nullable": false
      },
      {
        "name": "ConsentVersion",
        "label": "Consent Version",
        "type": "INT",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "ApprovedAt",
        "label": "Approved At",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastUsedAt",
        "label": "Last Used At",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "RevokedAt",
        "label": "Revoked At",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "RevokedBy",
        "label": "Revoked By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId",
          "ConnectedAppId",
          "ConsentVersion"
        ]
      },
      {
        "columns": [
          "ConnectedAppId"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Permission",
    "tableType": "system_core",
    "category": "auth",
    "description": "Discrete system permissions (Salesforce UserPermissions equivalent)",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-catalog.v1",
      "semanticFields": ["ApiName", "IsActive", "RequiresPermission"]
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Category",
        "label": "Category",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsSystem",
        "label": "Is System",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "RequiresPermission",
        "label": "Requires Permission",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "OwnerPack",
        "label": "Owner Pack",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ApiName"
        ],
        "unique": true
      },
      {
        "columns": [
          "Category"
        ]
      },
      {
        "columns": [
          "OwnerPack"
        ]
      }
    ]
  },
  {
    "tableName": "_System_ProfilePermission",
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageProfilesPermSets",
    "description": "Junction table linking profiles to system permissions",
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionApiName",
        "label": "Permission API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsEnabled",
        "label": "Is Enabled",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_perm",
        "columns": [
          "ProfileId",
          "PermissionApiName"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "retainOnSoftDelete": true,
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetPermission",
    "permissionSetDefinitionRelation": {
      "role": "modeled_grant",
      "parentField": "PermissionSetId",
      "onRootDelete": "cascade"
    },
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageProfilesPermSets",
    "description": "Junction table linking permission sets to system permissions",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-system-grant.v1",
      "semanticFields": ["PermissionSetId", "PermissionApiName", "IsEnabled"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permissions" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_delete", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_purge", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "PermissionSetId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionApiName",
        "label": "Permission API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsEnabled",
        "label": "Is Enabled",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_perm",
        "columns": [
          "PermissionSetId",
          "PermissionApiName"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetGroup",
    "keyPrefix": "0PG",
    "tableType": "system_core",
    "category": "auth",
    "description": "Group of permission sets (Salesforce PermissionSetGroup)",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-group.v1",
      "semanticFields": ["IsActive", "IsDeleted"]
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      }
    ]
  },
  {
    "tableName": "PermissionSetGroupComponent",
    "permissionSetDefinitionRelation": {
      "role": "negative_edge",
      "parentField": "PermissionSetId"
    },
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: Group -> Permission Set",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-group-component.v1",
      "semanticFields": ["GroupId", "PermissionSetId"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permission-set-group-component-users" }
        ]
      },
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "GroupId",
        "label": "Group ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_group_permset",
        "columns": [
          "Groupid",
          "Permissionsetid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "GroupId",
        "references": "PermissionSetGroup(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetGroupAssignment",
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: User -> Permission Set Group",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-group-assignment.v1",
      "semanticFields": ["AssigneeId", "GroupId", "IsDeleted"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.permission-set-group-assignment-users" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "AssigneeId",
        "label": "Assignee ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "GroupId",
        "label": "Group ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_user_group",
        "columns": [
          "Assigneeid",
          "Groupid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "AssigneeId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "GroupId",
        "references": "PermissionSetGroup(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "MutingPermissionSet",
    "tableType": "system_core",
    "category": "auth",
    "description": "Permission set that revokes permissions from a group",
    "requiredWritePermission": "ManageProfilesPermSets",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.muting-permission-set.v1",
      "semanticFields": ["GroupId"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.muting-permission-set-users" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "GroupId",
        "label": "Group ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "foreignKeys": [
      {
        "column": "GroupId",
        "references": "PermissionSetGroup(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_MutingPermissionSetPermission",
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageProfilesPermSets",
    "description": "Permissions to mute (revoke) from the group",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.muting-system-permission.v1",
      "semanticFields": ["MutingPermissionSetId", "PermissionApiName"]
    },
    "accessPolicy": {
      "cacheInvalidation": {
        "handlers": [
          { "capability": "platform.security.cache.muting-permission-set-permission-users" }
        ]
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "MutingPermissionSetId",
        "label": "Muting Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionApiName",
        "label": "Permission API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_muting_perm",
        "columns": [
          "Mutingpermissionsetid",
          "Permissionapiname"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "MutingPermissionSetId",
        "references": "MutingPermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_CustomPermission",
    "tableType": "system_core",
    "category": "auth",
    "description": "User-defined permissions (for use in Flows/validation rules)",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.custom-permission-catalog.v1",
      "semanticFields": ["ApiName", "IsActive", "IsDeleted"]
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "ConnectedAppId",
        "label": "Connected App ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "IsCustomized",
        "label": "Customized",
        "description": "Admin ownership flag. When set to 1, bootstrap upsert passes (including pack updates) must NOT overwrite this row's content. Standard invariant used across all pack-seeded _System_* tables — see ResetPackOwnedColumnsSQL in bootstrap/standard_actions.go. Required column for IsActive admin-toggle preservation.",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "OwnerPack",
        "label": "Owner Pack",
        "description": "Pack owner for package-authored custom permissions. Empty string means org/admin authored or legacy unknown. Pack apply and verify must use this explicit owner instead of inferring ownership from ApiName or synthetic Id.",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "''"
      }
    ]
  },
  {
    "tableName": "ProfileCustomPermission",
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: Profile -> Custom Permission",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.profile-custom-permission.v1",
      "semanticFields": ["ProfileId", "CustomPermissionId"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CustomPermissionId",
        "label": "Custom Permission ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_custperm",
        "columns": [
          "Profileid",
          "Custompermissionid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "retainOnSoftDelete": true,
        "onDelete": "CASCADE"
      },
      {
        "column": "CustomPermissionId",
        "references": "_System_CustomPermission(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetCustomPermission",
    "permissionSetDefinitionRelation": {
      "role": "modeled_grant",
      "parentField": "PermissionSetId",
      "onRootDelete": "cascade"
    },
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: Permission Set -> Custom Permission",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-custom-permission.v1",
      "semanticFields": ["PermissionSetId", "CustomPermissionId"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_delete", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_purge", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "PermissionSetId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CustomPermissionId",
        "label": "Custom Permission ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_custperm",
        "columns": [
          "Permissionsetid",
          "Custompermissionid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "CustomPermissionId",
        "references": "_System_CustomPermission(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetRecordTypeVisibility",
    "permissionSetDefinitionRelation": {
      "role": "negative_edge",
      "parentField": "PermissionSetId",
      "onRootDelete": "cascade"
    },
    "tableType": "system_core",
    "category": "auth",
    "description": "Record type visibility per permission set",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.record-type-visibility.v1",
      "semanticFields": ["PermissionSetId", "RecordTypeId", "IsVisible"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "PermissionSetId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "RecordTypeId",
        "label": "Record Type ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Visible",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_recordtype",
        "columns": [
          "Permissionsetid",
          "Recordtypeid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "RecordTypeId",
        "references": "_System_RecordType(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "ProfileTabSetting",
    "tableType": "system_core",
    "category": "auth",
    "description": "Tab visibility per profile",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.profile-tab-setting.v1",
      "semanticFields": ["ProfileId", "TabName", "Visibility"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "TabName",
        "label": "Tab Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Visibility",
        "label": "Visibility",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'DefaultOn'"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_tab",
        "columns": [
          "Profileid",
          "Tabname"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "retainOnSoftDelete": true,
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetTabSetting",
    "permissionSetDefinitionRelation": {
      "role": "negative_edge",
      "parentField": "PermissionSetId",
      "onRootDelete": "cascade"
    },
    "tableType": "system_core",
    "category": "auth",
    "description": "Tab visibility per permission set",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-tab-setting.v1",
      "semanticFields": ["PermissionSetId", "TabName", "Visibility"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "PermissionSetId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "TabName",
        "label": "Tab Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Visibility",
        "label": "Visibility",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Available'"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_tab",
        "columns": [
          "Permissionsetid",
          "Tabname"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "ProfileAppVisibility",
    "tableType": "system_core",
    "category": "auth",
    "description": "App visibility per profile",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.profile-app-visibility.v1",
      "semanticFields": ["ProfileId", "AppId", "IsVisible", "IsDefault"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "AppId",
        "label": "App ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Is Visible",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "IsDefault",
        "label": "Is Default",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_app",
        "columns": [
          "Profileid",
          "Appid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "retainOnSoftDelete": true,
        "onDelete": "CASCADE"
      },
      {
        "column": "AppId",
        "references": "_System_App(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetAppVisibility",
    "permissionSetDefinitionRelation": {
      "role": "negative_edge",
      "parentField": "PermissionSetId",
      "onRootDelete": "cascade"
    },
    "tableType": "system_core",
    "category": "auth",
    "description": "App visibility per permission set",
    "permissionStateMutation": {
      "surfaceId": "platform.permission-state.permission-set-app-visibility.v1",
      "semanticFields": ["PermissionSetId", "AppId", "IsVisible"]
    },
    "accessPolicy": {
      "writeValidation": {
        "validators": [
          { "phase": "before_create", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_update", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_delete", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_restore", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_purge", "capability": "platform.security.write.system-profile-owned-immutable" },
          { "phase": "before_create", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_update", "capability": "platform.security.write.managed-permission-set-definition" },
          { "phase": "before_restore", "capability": "platform.security.write.managed-permission-set-definition" }
        ],
        "ownerResolution": { "paths": [ { "hops": [ { "viaField": "PermissionSetId", "toObject": "PermissionSet", "gate": { "field": "IsOwnedByProfile", "is": true } }, { "viaField": "ProfileId", "toObject": "Profile", "systemWhen": { "field": "IsSystem", "is": true } } ] } ] }
      }
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "AppId",
        "label": "App ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Is Visible",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_app",
        "columns": [
          "Permissionsetid",
          "Appid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "AppId",
        "references": "_System_App(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_UserObjectInteraction",
    "tableType": "system_metadata",
    "category": "mru",
    "label": "User Object Interaction",
    "description": "Tracks user object interaction frequency for search scope ordering",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "UserId",
        "label": "User",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "ObjectApiName",
        "label": "Object API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "InteractionCount",
        "label": "Interaction Count",
        "type": "INT",
        "default": "1"
      },
      {
        "name": "LastAccessedAt",
        "label": "Last Accessed",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsPinned",
        "label": "Pinned",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId",
          "ObjectApiName"
        ],
        "unique": true
      },
      {
        "columns": [
          "UserId",
          "InteractionCount"
        ]
      }
    ]
  },
  {
    "tableName": "_System_UserRecentItem",
    "tableType": "system_metadata",
    "category": "mru",
    "label": "User Recent Item",
    "description": "Tracks user recent items for relevantItems API (MRU)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "UserId",
        "label": "User",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "ObjectApiName",
        "label": "Object API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "RecordId",
        "label": "Record",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "AccessedAt",
        "label": "Accessed At",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "UpdateCounter",
        "label": "Update Counter",
        "type": "BIGINT",
        "default": "1"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId",
          "ObjectApiName",
          "RecordId"
        ],
        "unique": true
      },
      {
        "columns": [
          "UserId",
          "ObjectApiName",
          "AccessedAt"
        ]
      }
    ]
  },
  {
    "tableName": "FlowDefinition",
    "keyPrefix": "300",
    "tableType": "system_automation",
    "category": "automation",
    "requiredWritePermission": "ManageFlows",
    "label": "Flow Definition",
    "description": "Salesforce-compatible flow definitions (Tooling API)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "isNameField": true
      },
      {
        "name": "MasterLabel",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ProcessType",
        "label": "Process Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'AutoLaunchedFlow'"
      },
      {
        "name": "TriggerType",
        "label": "Trigger Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "TriggerObjectOrEvent",
        "label": "Trigger Object",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ActiveVersionId",
        "label": "Active Version",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LatestVersionId",
        "label": "Latest Version",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "IsCustomized",
        "label": "Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerPack",
        "label": "Owner Pack",
        "type": "VARCHAR(128)",
        "nullable": false,
        "default": "''",
        "description": "Installed app pack that owns this managed FlowDefinition. Empty rows are legacy/admin-authored until adopted by a pack apply."
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessType"
        ]
      },
      {
        "columns": [
          "TriggerType"
        ]
      },
      {
        "columns": [
          "ActiveVersionId"
        ]
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "Flow",
    "keyPrefix": "301",
    "tableType": "system_automation",
    "category": "automation",
    "requiredWritePermission": "ManageFlows",
    "label": "Flow Version",
    "description": "Salesforce-compatible flow versions (Tooling API)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "DefinitionId",
        "label": "Flow Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "FlowDefinition"
        ]
      },
      {
        "name": "MasterLabel",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": true,
        "isNameField": true
      },
      {
        "name": "VersionNumber",
        "label": "Version Number",
        "type": "INT",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "Status",
        "label": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Draft'"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ProcessType",
        "label": "Process Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'AutoLaunchedFlow'"
      },
      {
        "name": "Metadata",
        "label": "Flow Metadata",
        "type": "LONGTEXT",
        "nullable": true,
        "description": "JSON containing flow canvas elements"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "Source",
        "label": "Source",
        "type": "VARCHAR(16)",
        "nullable": false,
        "default": "'custom'",
        "description": "Provenance bit: 'standard' = pack-seeded by standard_flows/* and never mutated in place; 'custom' = admin-authored or admin-edited. Drives the seeder's upgrade-path auto-advance logic — a pack upgrade auto-activates new metadata ONLY when the current ActiveVersionId still points to a Source='standard' row. Any in-place metadata edit via the tooling API flips the row to 'custom' (adopting a standard flow makes the admin its owner). Column default is 'custom' so non-seeder inserts remain conservative even if a writer forgets to set it; only standard_flows.go is permitted to write 'standard'."
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "DefinitionId"
        ]
      },
      {
        "columns": [
          "Status"
        ]
      },
      {
        "columns": [
          "DefinitionId",
          "VersionNumber"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "DefinitionId",
        "references": "FlowDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "FlowInterview",
    "keyPrefix": "0Fo",
    "tableType": "system_automation",
    "category": "automation",
    "label": "Flow Interview",
    "description": "Running and paused flow instances",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "FlowVersionId",
        "label": "Flow Version",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Flow"
        ]
      },
      {
        "name": "InterviewLabel",
        "label": "Interview Label",
        "type": "VARCHAR(255)",
        "nullable": true,
        "isNameField": true
      },
      {
        "name": "InterviewStatus",
        "label": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Running'"
      },
      {
        "name": "CurrentElement",
        "label": "Current Element",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ContextData",
        "label": "Context Data",
        "type": "LONGTEXT",
        "nullable": true,
        "description": "JSON containing flow variable values"
      },
      {
        "name": "PausedDate",
        "label": "Paused Date",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "PausedUntil",
        "label": "Paused Until",
        "type": "TIMESTAMP",
        "nullable": true,
        "description": "When the scheduler should resume this paused interview (Wait element target time)"
      },
      {
        "name": "ClaimedBy",
        "label": "Claimed By Node",
        "type": "VARCHAR(64)",
        "nullable": true,
        "description": "Hostname/UUID of the scheduler node that claimed this interview for resume"
      },
      {
        "name": "ClaimedAt",
        "label": "Claimed At",
        "type": "TIMESTAMP",
        "nullable": true,
        "description": "When the interview was claimed for resume (stale claims older than 10 minutes are recovered)"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "FlowVersionId"
        ]
      },
      {
        "columns": [
          "InterviewStatus"
        ]
      },
      {
        "columns": [
          "OwnerId"
        ]
      },
      {
        "name": "idx_flow_interview_paused_scan",
        "columns": [
          "InterviewStatus",
          "PausedUntil"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "FlowVersionId",
        "references": "Flow(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessDefinition",
    "keyPrefix": "04a",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Process",
    "description": "Approval process definitions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Process Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "State",
        "label": "State",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Active'"
      },
      {
        "name": "TableEnumOrId",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "LockType",
        "label": "Lock Type",
        "type": "VARCHAR(50)",
        "nullable": true
      },
      {
        "name": "EntryFilter",
        "label": "Entry Criteria",
        "type": "TEXT",
        "nullable": true,
        "description": "Formula expression for record entry criteria (e.g. Status == 'Draft' && Amount > 1000)"
      },
      {
        "name": "FinalApprovalRecordLock",
        "label": "Lock Record on Final Approval",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "FinalRejectionRecordLock",
        "label": "Lock Record on Final Rejection",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "AllowRecall",
        "label": "Allow Submitters to Recall",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "IsActive",
        "label": "Active",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "Metadata",
        "label": "Approval Process Metadata",
        "type": "LONGTEXT",
        "nullable": true,
        "description": "JSON containing the XML definition of the Approval Process"
      },
      {
        "name": "ProcessOrder",
        "label": "Process Order",
        "type": "INT",
        "nullable": true,
        "description": "Numerical order for evaluation sequence when multiple active processes exist for the same object"
      },
      {
        "name": "OwnerPack",
        "label": "Owner Pack",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "''",
        "description": "Source-backed pack owner for package-authored approval processes. Empty string means org/admin authored or legacy unknown. ProcessNode and ProcessAction ownership is inherited from the parent ProcessDefinition."
      }
    ],
    "indices": [
      {
        "columns": [
          "State"
        ]
      },
      {
        "columns": [
          "TableEnumOrId"
        ]
      },
      {
        "columns": [
          "IsActive"
        ]
      },
      {
        "columns": [
          "OwnerPack"
        ]
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessNode",
    "keyPrefix": "04b",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Step",
    "description": "Defined steps within an approval process",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Step Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ProcessDefinitionId",
        "label": "Process Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessDefinition"
        ],
        "onDelete": "CASCADE"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "ApproverType",
        "label": "Approver Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'User'"
      },
      {
        "name": "ApproverUserId",
        "label": "Approver User",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "ApproverRelatedField",
        "label": "Approver Related Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AllowComments",
        "label": "Allow Comments",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "RequireComments",
        "label": "Require Comments",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "StepOrder",
        "label": "Step Order",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "RejectBehavior",
        "label": "Reject Behavior",
        "type": "VARCHAR(50)",
        "nullable": true
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessDefinitionId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessDefinitionId",
        "references": "ProcessDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstance",
    "keyPrefix": "04g",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Instance",
    "description": "Runtime approval instances for submitted records",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessDefinitionId",
        "label": "Process Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessDefinition"
        ]
      },
      {
        "name": "TargetObjectId",
        "label": "Target Record",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Status",
        "label": "Status",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Pending'"
      },
      {
        "name": "SubmittedById",
        "label": "Submitted By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CompletedDate",
        "label": "Completed Date",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessDefinitionId"
        ]
      },
      {
        "columns": [
          "TargetObjectId"
        ]
      },
      {
        "columns": [
          "Status"
        ]
      },
      {
        "columns": [
          "SubmittedById"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      },
      {
        "columns": [
          "LastModifiedDate"
        ]
      },
      {
        "columns": [
          "TargetObjectId",
          "CreatedDate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessDefinitionId",
        "references": "ProcessDefinition(Id)",
        "logicalOnly": true
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstanceHistory",
    "keyPrefix": "04h",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "accessPolicy": {
      "rowRead": {
        "kind": "targetRecordRead",
        "targetObjectField": "TargetObjectType",
        "targetRecordField": "TargetObjectId"
      }
    },
    "category": "approval",
    "label": "Approval History",
    "description": "Read-only approval action history for submitted records. Durable rows use the 04h keyPrefix; live pending rows intentionally reuse their ProcessInstanceWorkitem 04i Id so the legacy pending-workitem bridge and pending-history row are one runtime fact.",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessInstanceId",
        "label": "Process Instance",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessInstance"
        ],
        "childRelationshipName": "StepsAndWorkitems",
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "StepNodeId",
        "label": "Step Node",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessInstanceNode"
        ],
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "ProcessNodeId",
        "label": "Process Node",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessNode"
        ],
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "TargetObjectId",
        "label": "Target Record",
        "type": "VARCHAR(255)",
        "nullable": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "TargetObjectType",
        "label": "Target Object Type",
        "type": "VARCHAR(255)",
        "nullable": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "StepStatus",
        "label": "Step Status",
        "type": "VARCHAR(50)",
        "nullable": false,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "ActorId",
        "label": "Actor",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User",
          "Group"
        ],
        "isPolymorphic": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "OriginalActorId",
        "label": "Original Actor",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User",
          "Group"
        ],
        "isPolymorphic": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "Comments",
        "label": "Comments",
        "type": "TEXT",
        "nullable": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "IsPending",
        "label": "Is Pending",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "writeProtectionPolicy": "trusted_only"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "columns": [
          "ProcessInstanceId",
          "CreatedDate"
        ]
      },
      {
        "columns": [
          "StepStatus"
        ]
      },
      {
        "columns": [
          "ActorId"
        ]
      },
      {
        "columns": [
          "TargetObjectType",
          "TargetObjectId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessInstanceId",
        "references": "ProcessInstance(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "StepNodeId",
        "references": "ProcessInstanceNode(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "ProcessNodeId",
        "references": "ProcessNode(Id)",
        "logicalOnly": true
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstanceWorkitem",
    "keyPrefix": "04i",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Work Item",
    "description": "Pending work items assigned to approvers",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessInstanceId",
        "label": "Process Instance",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessInstance"
        ],
        "relationshipName": "StepsAndWorkitems",
        "childRelationshipName": "PendingWorkitems",
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "ActorId",
        "label": "Assigned Approver",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User",
          "Group"
        ],
        "isPolymorphic": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "OriginalActorId",
        "label": "Original Approver",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User",
          "Group"
        ],
        "isPolymorphic": true,
        "writeProtectionPolicy": "trusted_only"
      },
      {
        "name": "Comments",
        "label": "Comments",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "columns": [
          "ActorId"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      },
      {
        "columns": [
          "ActorId",
          "CreatedDate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessInstanceId",
        "references": "ProcessInstance(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstanceNode",
    "keyPrefix": "0OO",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Step Instance",
    "description": "Runtime step execution records for approval instances",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessInstanceId",
        "label": "Process Instance",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessInstance"
        ]
      },
      {
        "name": "ProcessNodeId",
        "label": "Process Node",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessNode"
        ]
      },
      {
        "name": "ProcessNodeName",
        "label": "Step Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "NodeStatus",
        "label": "Status",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Pending'"
      },
      {
        "name": "CompletedDate",
        "label": "Completed Date",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "LastActorId",
        "label": "Last Actor",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "Comments",
        "label": "Comments",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "columns": [
          "ProcessNodeId"
        ]
      },
      {
        "columns": [
          "NodeStatus"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessInstanceId",
        "references": "ProcessInstance(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessAction",
    "keyPrefix": "!p0",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Process Action",
    "description": "Actions executed at specific points in the approval lifecycle (Submit, Final Approve, Final Reject, Recall, Step Approve, Step Reject)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Action Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true
      },
      {
        "name": "ProcessDefinitionId",
        "label": "Process Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessDefinition"
        ],
        "onDelete": "CASCADE"
      },
      {
        "name": "ProcessNodeId",
        "label": "Process Step (Node)",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessNode"
        ],
        "onDelete": "CASCADE",
        "description": "null = process-level action; set = step-level action"
      },
      {
        "name": "ActionType",
        "label": "Action Type",
        "type": "VARCHAR(50)",
        "nullable": false,
        "description": "FieldUpdate, Alert, RecordLock"
      },
      {
        "name": "ActionEvent",
        "label": "Action Event",
        "type": "VARCHAR(50)",
        "nullable": false,
        "description": "Submit, StepApproval, FinalApproval, FinalRejection, Recall, Reassign, StepRejection"
      },
      {
        "name": "FieldApiName",
        "label": "Field API Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "For FieldUpdate: the field to update"
      },
      {
        "name": "FieldValue",
        "label": "Field Value",
        "type": "TEXT",
        "nullable": true,
        "description": "For FieldUpdate: the value to set"
      },
      {
        "name": "EmailTemplateId",
        "label": "Email Template",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "_System_EmailTemplate"
        ],
        "description": "For Alert: the email template to send"
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Developer name linking to the underlying automation object (e.g. _System_WorkflowAlert.Name for Alert actions)"
      },
      {
        "name": "Order",
        "label": "Action Order",
        "type": "INT",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessDefinitionId"
        ]
      },
      {
        "columns": [
          "ProcessNodeId"
        ]
      },
      {
        "columns": [
          "ActionEvent"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessDefinitionId",
        "references": "ProcessDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "_System_LayoutAssignment",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Layout routing rules \u2014 maps (Role x Profile x RecordType) to a PageLayout. Replaces ProfileLayout with multi-dimensional specificity-based resolution.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Record ID"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(191)",
        "nullable": false,
        "label": "Object API Name"
      },
      {
        "name": "LayoutId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Layout ID"
      },
      {
        "name": "RoleId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Role ID",
        "description": "Organizational position. NULL = any role. Inherits via Role Hierarchy."
      },
      {
        "name": "ProfileId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Profile ID",
        "description": "Permission role. NULL = any profile. Salesforce compatibility dimension."
      },
      {
        "name": "RecordTypeId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Record Type ID",
        "description": "Business process type. NULL = any record type."
      },
      {
        "name": "Specificity",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Specificity",
        "description": "Count of non-NULL routing dimensions. Computed by application on write."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By"
      },
      {
        "name": "RouteSource",
        "type": "VARCHAR(32)",
        "logicalType": "internal",
        "nullable": true,
        "label": "Route Source",
        "description": "Routing provenance. NULL = unresolved legacy row; runtime_fallback, managed_seed, admin_authored = classified route intent."
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Owner Pack",
        "description": "Installed pack name when owned by a source-backed pack. NULL for admin/platform-authored layout assignments."
      }
    ],
    "indices": [
      {
        "name": "idx_la_object",
        "columns": [
          "ObjectApiName"
        ]
      },
      {
        "name": "idx_la_specificity",
        "columns": [
          "ObjectApiName",
          "Specificity"
        ]
      },
      {
        "name": "idx_la_layout",
        "columns": [
          "LayoutId"
        ]
      },
      {
        "name": "uq_la_dimensions",
        "columns": [
          "ObjectApiName",
          "RoleId",
          "ProfileId",
          "RecordTypeId"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "LayoutId",
        "references": "_System_PageLayout(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_PageLayoutHistory",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Content version history for page layouts. Append-only audit trail supporting undo/rollback.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Record ID"
      },
      {
        "name": "LayoutId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Layout ID"
      },
      {
        "name": "VersionNumber",
        "type": "INT",
        "nullable": false,
        "label": "Version Number"
      },
      {
        "name": "Config",
		"type": "MEDIUMTEXT",
        "nullable": false,
        "label": "Layout Config Snapshot"
      },
      {
        "name": "ChangedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Changed By",
        "description": "NULL = system/auto-generate"
      },
      {
        "name": "ChangeReason",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Change Reason",
        "description": "auto_generate, auto_regenerate_v{N}, admin_edit, field_added, restored_from_v{N}"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "uq_plh_layout_version",
        "columns": [
          "LayoutId",
          "VersionNumber"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "LayoutId",
        "references": "_System_PageLayout(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_TriggerSubscription",
    "keyPrefix": "!o0",
    "tableType": "system_core",
    "category": "automation",
    "description": "Shadow-state registry of active record-trigger subscriptions derived from authoritative FlowDefinition + active Flow metadata. Runtime dispatch does not read this table until the later cutover PR.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "KeyPrefix",
        "type": "CHAR(3)",
        "collationName": "utf8mb4_bin",
        "nullable": false,
        "label": "Key Prefix"
      },
      {
        "name": "EventType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Event Type"
      },
      {
        "name": "RecordTriggerType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Record Trigger Type"
      },
      {
        "name": "FlowDefinitionId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Flow Definition Id"
      },
      {
        "name": "FlowVersionId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Flow Version Id"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Active"
      },
      {
        "name": "ConditionShapeHash",
        "type": "CHAR(64)",
        "nullable": true,
        "label": "Condition Shape Hash"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uq_trigger_subscription_identity",
        "columns": [
          "FlowDefinitionId",
          "KeyPrefix",
          "EventType",
          "RecordTriggerType"
        ],
        "unique": true
      },
      {
        "name": "idx_trigger_subscription_dispatch",
        "columns": [
          "KeyPrefix",
          "EventType",
          "RecordTriggerType",
          "IsActive"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Migration",
    "tableType": "system_metadata",
    "category": "system",
    "description": "Tracks applied data migrations. Used to ensure idempotent one-time migrations.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Migration ID"
      },
      {
        "name": "Version",
        "type": "INT",
        "nullable": false,
        "label": "Version"
      },
      {
        "name": "AppliedAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Applied At"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "_System_LoginHistory",
    "tableType": "system_core",
    "category": "auth",
    "description": "Login history for user authentication events",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "User Id"
      },
      {
        "name": "LoginTime",
        "type": "DATETIME",
        "nullable": false,
        "label": "Login Time"
      },
      {
        "name": "LoginType",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Login Type"
      },
      {
        "name": "SourceIp",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Ip"
      },
      {
        "name": "Browser",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Browser"
      },
      {
        "name": "Platform",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Platform"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Status"
      },
      {
        "name": "Application",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Application"
      },
      {
        "name": "SessionId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Session Id"
      },
      {
        "name": "LogoutTime",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Logout Time"
      },
      {
        "name": "LogoutReason",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Logout Reason"
      },
      {
        "name": "AuthenticationMethod",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Authentication Method"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId"
        ]
      },
      {
        "columns": [
          "LoginTime"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_SetupAuditTrail",
    "tableType": "system_core",
    "category": "audit",
    "description": "Admin setup configuration change audit trail",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Action",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Action"
      },
      {
        "name": "Section",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Section"
      },
      {
        "name": "Display",
        "type": "MEDIUMTEXT",
        "nullable": true,
        "label": "Display"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "DelegateUser",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Delegate User"
      },
      {
        "name": "ResponsibleNamespacePrefix",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Responsible Namespace Prefix"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "CreatedById"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      }
    ],
    "requiredReadPermission": "ViewSetupAuditTrail,ViewAllData,ModifyAllData"
  },
  {
    "tableName": "_System_ObjectFieldMapping",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Cross-object field mapping rules for metadata-authored record conversion operations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "SourceObject",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Source Object"
      },
      {
        "name": "TargetObject",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Target Object"
      },
      {
        "name": "ActionType",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Action Type"
      },
      {
        "name": "SourceField",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Source Field"
      },
      {
        "name": "TargetField",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Target Field"
      },
      {
        "name": "SourceLookupField",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Source Lookup Field"
      },
      {
        "name": "DefaultValue",
        "type": "TEXT",
        "nullable": true,
        "label": "Default Value"
      },
      {
        "name": "ValueMap",
        "type": "TEXT",
        "nullable": true,
        "label": "Value Map",
        "description": "Optional connector value translation table encoded as a JSON object. Maps scalar source values to scalar target values before the connector mapping writes the target field. Ignored by the legacy record-conversion path."
      },
      {
        "name": "SortOrder",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Sort Order"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized"
      },
      {
        "name": "Source",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'legacy'",
        "label": "Source",
        "description": "Authoring owner and identity scope for tuple reconciliation. Existing rows are conservatively introduced as 'legacy' until a writer claims matching business keys before reconcile. 'standard' rows are owned by the platform standard field-mapping pack; tenant overlays use tenant-scoped values so partial overlays reconcile only their own rows and never delete standard mappings."
      },
      {
        "name": "Direction",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'legacy'",
        "label": "Direction",
        "description": "Connector sync direction for non-legacy rows: inbound / outbound / bidirectional. 'legacy' (the default) identifies a record-conversion row (Lead Convert, Flow RecordCreate); the legacy read path filters Direction='legacy' so legacy and connector rows are disjoint. Part of uq_ofm_mapping so a single field can have distinct inbound/outbound mappings."
      },
      {
        "name": "TransformExpression",
        "type": "TEXT",
        "nullable": true,
        "label": "Transform Expression",
        "description": "Optional expression applied to the source value before writing to the target field. Evaluated by the connector apply runtime; ignored by the legacy record-conversion path."
      },
      {
        "name": "ConflictPolicy",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Conflict Policy",
        "description": "Connector conflict-resolution strategy: overwrite / skip_if_set / error. Null means the runtime applies its default policy. Ignored by the legacy record-conversion path."
      },
      {
        "name": "OnUnmappedValue",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "On Unmapped Value",
        "description": "Connector valueMap miss policy: error / skip / passthrough. Null or empty means error (fail-closed default). Controls runtime behavior when a ValueMap has no translation for a source value. Ignored by the legacy record-conversion path."
      },
      {
        "name": "ProjectionOnly",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Projection Only",
        "description": "When true, this inbound row contributes SourceObject and SourceField to connector enrichment projection inventory but is excluded from every field-mapping execution reader. Projection-only rows must not declare target-write semantics."
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uq_ofm_mapping",
        "columns": [
          "Source",
          "SourceObject",
          "TargetObject",
          "ActionType",
          "SourceField",
          "Direction"
        ],
        "unique": true
      },
      {
        "name": "idx_ofm_lookup",
        "columns": [
          "SourceObject",
          "TargetObject",
          "ActionType"
        ]
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_StandardAction",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Registry of metadata-authored invocable actions. Each row points at a seeded Flow that implements the action.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "Name", "type": "VARCHAR(128)", "nullable": false, "label": "Action Name" },
      { "name": "Label", "type": "VARCHAR(255)", "nullable": false, "label": "Label" },
      { "name": "Description", "type": "TEXT", "nullable": true, "label": "Description" },
      { "name": "FlowDeveloperName", "type": "VARCHAR(128)", "nullable": false, "label": "Flow Developer Name" },
      { "name": "Category", "type": "VARCHAR(64)", "nullable": true, "label": "Category" },
      { "name": "RequiredPermissions", "type": "TEXT", "nullable": true, "label": "Required Permissions (JSON array)" },
      { "name": "IsAtomic", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Run Flow Atomically" },
      { "name": "SortOrder", "type": "INT", "nullable": false, "default": "0", "label": "Sort Order" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "OwnerPack", "type": "VARCHAR(64)", "nullable": false, "default": "''", "label": "Owner Pack",
        "description": "Pack owner for package-authored standard actions. Empty string means org/admin authored or legacy unknown. Pack apply and verify must use this explicit owner instead of inferring ownership from Name or synthetic Id." },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "TargetObjects", "type": "TEXT", "nullable": true, "label": "Target Objects",
        "description": "JSON array of object API names this standard action applies to. Drives metadata-driven button discovery in the UI: GET /actions/standard returns this field and the frontend filters actions by membership. Admin edits to this column MUST also set IsCustomized=1 to survive pack updates (Label-style pack-content semantics, NOT IsActive-style runtime state)." },
      { "name": "RendererId", "type": "VARCHAR(255)", "nullable": true, "label": "Frontend Renderer Id",
        "description": "Opaque namespaced frontend renderer id declared by the owning app pack. Generic frontend code treats this as metadata and performs only registry lookup; it must not infer renderers from action names." },
      { "name": "VisibilityCondition", "type": "TEXT", "nullable": true, "label": "Visibility Condition",
        "description": "Client-side expression evaluated against the current record before the action button is rendered. Evaluated by the frontend evaluateExpression helper. NULL or empty means always visible. Authored by L1 app packs; platform code is an evaluator only." },
      { "name": "PreviewFlowDeveloperName", "type": "VARCHAR(128)", "nullable": true, "label": "Preview Flow Developer Name",
        "description": "Optional Flow developer name that produces preview output values for this action (e.g. campaign attribution before lead convert). NULL means the action has no preview producer. Used by the frontend to optionally fetch preview data before rendering the action modal." },
      { "name": "HeaderFallbackEligible", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Header Fallback Eligible",
        "description": "Whether this action may participate in generic unauthored record-header fallback surfaces. Missing pack declarations default to true for backward compatibility; set false when the action should appear only through authored placement metadata." },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_sa_name", "columns": ["Name"], "unique": true },
      { "name": "idx_sa_active", "columns": ["IsActive", "IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_FlowActionCallHandler",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Globally keyed app-pack declarations for Flow actionCall handler types, with OwnerPack as the single owning pack attribution. Runtime engines read this as metadata; handler implementations are resolved through opaque capability references.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack" },
      { "name": "ActionType", "type": "VARCHAR(128)", "nullable": false, "label": "Flow Action Type",
        "description": "Lower-trimmed Flow actionCall actionType. Globally unique because runtime dispatch resolves by actionType only." },
      { "name": "HandlerRef", "type": "VARCHAR(255)", "nullable": false, "label": "Handler Reference",
        "description": "Opaque namespaced host capability reference. Platform code treats it as data and does not infer application behavior from the action type." },
      { "name": "AtomicPolicy", "type": "VARCHAR(32)", "nullable": false, "default": "'reject'", "label": "Atomic Policy" },
      { "name": "PreviewPolicy", "type": "VARCHAR(64)", "nullable": false, "default": "'reject'", "label": "Preview Policy" },
      { "name": "RequiresContext", "type": "VARCHAR(64)", "nullable": false, "default": "'none'", "label": "Required Runtime Context" },
      { "name": "SendsEmail", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Sends Email" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_flow_action_call_handler_action", "columns": ["ActionType"], "unique": true },
      { "name": "idx_flow_action_call_handler_active", "columns": ["OwnerPack", "IsActive", "IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ActionSchema",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Input and output field descriptors for rows in _System_StandardAction.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "Direction", "type": "VARCHAR(32)", "nullable": false, "label": "Direction (input/output)" },
      { "name": "APIName", "type": "VARCHAR(128)", "nullable": false, "label": "API Name" },
      { "name": "DataType", "type": "VARCHAR(64)", "nullable": false, "label": "Data Type" },
      { "name": "ReferenceTo", "type": "VARCHAR(128)", "nullable": true, "label": "Reference To" },
      { "name": "Label", "type": "VARCHAR(255)", "nullable": true, "label": "Label",
        "description": "Optional action-input label override. Field-bound inputs normally resolve their label from target field metadata." },
      { "name": "UISection", "type": "VARCHAR(128)", "nullable": true, "label": "UI Section",
        "description": "Generic UI grouping key for standard action inputs, for example the target object section rendered by a modal." },
      { "name": "UIMode", "type": "VARCHAR(32)", "nullable": true, "label": "UI Mode",
        "description": "Generic UI mode for an action input, such as create, reuse, skip, or hidden." },
      { "name": "TargetObject", "type": "VARCHAR(128)", "nullable": true, "label": "Target Object",
        "description": "Target SObject API name for field-bound or lookup inputs." },
      { "name": "TargetFieldAPIName", "type": "VARCHAR(128)", "nullable": true, "label": "Target Field API Name",
        "description": "Target field API name for create-panel field inputs. Null for mode controls and lookup inputs." },
      { "name": "PrefillSourceFieldAPIName", "type": "VARCHAR(128)", "nullable": true, "label": "Prefill Source Field API Name",
        "description": "Optional source field API name on the current record used to seed a hidden action input before submit. This is the metadata-owned authority when a UI caller must carry record context through the standard-action contract without inferring field bindings from action name or local page logic." },
      { "name": "RequiredPicklistTag", "type": "VARCHAR(128)", "nullable": true, "label": "Required Picklist Tag",
        "description": "Optional PicklistOption.Tags value that a supplied action input must carry on the bound target field metadata." },
      { "name": "MappingSourceObject", "type": "VARCHAR(128)", "nullable": true, "label": "Mapping Source Object",
        "description": "Optional source SObject API name used with TargetObject, TargetFieldAPIName, and MappingActionType to project prefill source metadata from _System_ObjectFieldMapping." },
      { "name": "MappingActionType", "type": "VARCHAR(64)", "nullable": true, "label": "Mapping Action Type",
        "description": "Optional _System_ObjectFieldMapping action type used to derive prefill source metadata for a create-panel input." },
      { "name": "IsCollection", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Collection",
        "description": "Whether the action input or output is a collection of DataType values." },
      { "name": "IsRequired", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Required" },
      { "name": "Description", "type": "TEXT", "nullable": true, "label": "Description" },
      { "name": "SortOrder", "type": "INT", "nullable": false, "default": "0", "label": "Sort Order" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_as_field", "columns": ["StandardActionId", "Direction", "APIName"], "unique": true },
      { "name": "idx_as_order", "columns": ["StandardActionId", "Direction", "SortOrder"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ActionFieldDefault",
    "tableType": "system_metadata",
    "category": "metadata",
    "label": "Action Field Default",
    "description": "Default-value formulas applied by a standard action AFTER Flow inputAssignments run, and only to fields still absent from the record map (stage 3 of the recordCreate pipeline documented in executor_record_ops.go). Priority resolves conflicts when multiple rows match within (TargetObject, FieldAPIName); higher Priority wins.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "TargetObject", "type": "VARCHAR(128)", "nullable": false, "label": "Target Object" },
      { "name": "FieldAPIName", "type": "VARCHAR(128)", "nullable": false, "label": "Field API Name" },
      { "name": "ValueFormula", "type": "TEXT", "nullable": false, "label": "Value Formula" },
      { "name": "Condition", "type": "TEXT", "nullable": true, "label": "Condition Formula" },
      { "name": "Priority", "type": "INT", "nullable": false, "default": "0", "label": "Priority" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_afd_key", "columns": ["StandardActionId", "TargetObject", "FieldAPIName", "Priority"], "unique": true },
      { "name": "idx_afd_target", "columns": ["StandardActionId", "TargetObject"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ActionInputGuard",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Conditional permission and object CRUD guards evaluated by the generic standard-action dispatcher before invoking the Flow. Replaces hardcoded per-action permission branching.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "Condition", "type": "VARCHAR(255)", "nullable": false, "label": "Condition Formula" },
      { "name": "GuardKey", "type": "VARCHAR(255)", "nullable": false, "default": "", "label": "Guard Key",
        "description": "Synthetic stable key for the guard target, for example permission:<PermissionName> or object:<ObjectApiName>:<Operation>. Used only for idempotent pack upsert/reconcile identity." },
      { "name": "RequiredPermission", "type": "VARCHAR(128)", "nullable": true, "label": "Required Permission" },
      { "name": "RequiredObject", "type": "VARCHAR(128)", "nullable": true, "label": "Required Object" },
      { "name": "RequiredOperation", "type": "VARCHAR(32)", "nullable": true, "label": "Required Operation" },
      { "name": "ErrorMessage", "type": "TEXT", "nullable": true, "label": "Error Message" },
      { "name": "GatedInput", "type": "VARCHAR(128)", "nullable": true, "label": "Gated Input",
        "description": "APIName of the action input or mode-control input this guard targets. Used by GET /actions/standard to expose a per-caller verdict for rendering the matching input path. If blank, the guard is a whole-action precondition rather than an input-rendering verdict." },
      { "name": "SortOrder", "type": "INT", "nullable": false, "default": "0", "label": "Sort Order" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_aig_rule", "columns": ["StandardActionId", "Condition", "GuardKey"], "unique": true },
      { "name": "idx_aig_action", "columns": ["StandardActionId", "IsActive", "IsDeleted", "SortOrder"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_StandardActionInternalAccessScope",
    "tableType": "system_metadata",
    "category": "metadata",
    "label": "Standard Action Internal Access Scope",
    "description": "Metadata-owned access scopes for standard-action bookkeeping reads and writes. The generic dispatcher stamps active rows on the action context; query and persistence paths may widen read/RLS visibility or bypass user object CRUD/FLS only for the matching action, object, and operation.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "ObjectApiName", "type": "VARCHAR(128)", "nullable": false, "label": "Object API Name" },
      { "name": "Operation", "type": "VARCHAR(32)", "nullable": false, "label": "Operation" },
      { "name": "Reason", "type": "TEXT", "nullable": true, "label": "Reason" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_saias_scope", "columns": ["StandardActionId", "ObjectApiName", "Operation"], "unique": true },
      { "name": "idx_saias_action", "columns": ["StandardActionId", "IsActive", "IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ConnectorRemoteLink",
    "keyPrefix": "!rl",
    "tableType": "system_core",
    "category": "integration",
    "description": "Durable finalized remote-link state for outbound connector push v2. This is the SSoT for remote identity; record fields are compatibility mirrors only.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "LinkKey", "type": "VARCHAR(255)", "nullable": false, "label": "Link Key" },
      { "name": "Status", "type": "VARCHAR(32)", "nullable": false, "default": "'finalized'", "label": "Status", "description": "One of finalized, suspended_drift, owner_deleted_pending_recovery, retired. owner_deleted_pending_recovery retains RemoteLocatorActiveKey but is non-authoritative until evidence-verified recovery or retirement." },
      { "name": "RemoteId", "type": "VARCHAR(512)", "nullable": false, "label": "Remote Id" },
      { "name": "RemoteLocatorHash", "type": "VARCHAR(64)", "nullable": false, "label": "Remote Locator Hash" },
      { "name": "RemoteLocatorActiveKey", "type": "VARCHAR(64)", "nullable": true, "label": "Remote Locator Active Key", "description": "Equals RemoteLocatorHash for non-retired rows and NULL after retirement, giving MySQL/TiDB a hard unique key for active remote ownership without partial-index semantics." },
      { "name": "ConnectorOwnerKey", "type": "VARCHAR(255)", "nullable": false, "label": "Connector Owner Key" },
      { "name": "ActionSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Action Slot Id" },
      { "name": "ActionType", "type": "VARCHAR(128)", "nullable": false, "label": "Action Type" },
      { "name": "SourceObject", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "DestinationSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Destination Slot Id" },
      { "name": "RequesterOwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Requester Owner Pack" },
      { "name": "ProfileOwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Profile Owner Pack" },
      { "name": "ConnectorNamespace", "type": "VARCHAR(255)", "nullable": true, "label": "Connector Namespace" },
      { "name": "FlowDeveloperName", "type": "VARCHAR(255)", "nullable": true, "label": "Flow Developer Name" },
      { "name": "FlowActionName", "type": "VARCHAR(255)", "nullable": true, "label": "Flow Action Name" },
      { "name": "TargetObject", "type": "VARCHAR(255)", "nullable": false, "label": "Target Object" },
      { "name": "ProfileName", "type": "VARCHAR(255)", "nullable": false, "label": "Profile Name" },
      { "name": "CreatedPackInstallId", "type": "VARCHAR(255)", "nullable": true, "label": "Created Pack Install Id" },
      { "name": "LastValidatedPackInstallId", "type": "VARCHAR(255)", "nullable": true, "label": "Last Validated Pack Install Id" },
      { "name": "CredentialRef", "type": "VARCHAR(255)", "nullable": false, "label": "Credential Ref" },
      { "name": "EndpointClass", "type": "VARCHAR(255)", "nullable": false, "label": "Endpoint Class" },
      { "name": "RetryPolicy", "type": "LONGTEXT", "nullable": false, "label": "Retry Policy" },
      { "name": "ProfileContractHash", "type": "VARCHAR(64)", "nullable": false, "label": "Profile Contract Hash" },
      { "name": "CreatePathTemplate", "type": "VARCHAR(1024)", "nullable": false, "label": "Create Path Template" },
      { "name": "UpdatePathTemplate", "type": "VARCHAR(1024)", "nullable": false, "label": "Update Path Template" },
      { "name": "ResponseIdPath", "type": "VARCHAR(255)", "nullable": false, "label": "Response Id Path" },
      { "name": "RemoteIdField", "type": "VARCHAR(255)", "nullable": true, "label": "Remote Id Field" },
      { "name": "RemoteIdProvenanceField", "type": "VARCHAR(255)", "nullable": true, "label": "Remote Id Provenance Field" },
      { "name": "MappingFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "Mapping Fingerprint" },
      { "name": "BodyFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "Body Fingerprint" },
      { "name": "LastMappingRevalidationOperationId", "type": "VARCHAR(255)", "nullable": true, "label": "Last Mapping Revalidation Operation Id", "description": "Operation id of the append-only receipt that last authorized the current MappingFingerprint and BodyFingerprint. NULL means the creation snapshot is still current." },
      { "name": "CompatibilityMirrorStatus", "type": "VARCHAR(64)", "nullable": true, "label": "Compatibility Mirror Status", "description": "Last observed materialized-mirror comparison (pending, synced, or drifted). It is a reconciliation hint, never remote-identity authority; authoritative reads must compare the current record field to this link." },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uniq_connector_remote_link_key", "columns": ["LinkKey"], "unique": true },
      { "name": "uniq_connector_remote_locator_active", "columns": ["RemoteLocatorActiveKey"], "unique": true },
      { "name": "idx_connector_remote_link_locator", "columns": ["RemoteLocatorHash"] },
      { "name": "idx_connector_remote_link_source", "columns": ["SourceObject", "SourceRecordId"] },
      { "name": "idx_connector_remote_link_status", "columns": ["Status", "LastModifiedDate"] }
    ]
  },
  {
    "tableName": "_System_ConnectorPushLinkRevalidationReceipt",
    "label": "Connector Push Link Revalidation Receipt",
    "keyPrefix": "!rr",
    "tableType": "system_core",
    "category": "integration",
    "description": "Append-only member evidence for an explicitly approved finalized-link mapping/body generation transition. It is audit and rollback evidence, not a second PATCH read path.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "OperationId", "type": "VARCHAR(255)", "nullable": false, "label": "Operation Id" },
      { "name": "LinkKey", "type": "VARCHAR(255)", "nullable": false, "label": "Link Key" },
      { "name": "ManifestDigest", "type": "VARCHAR(64)", "nullable": false, "label": "Manifest Digest" },
      { "name": "ApprovalDigest", "type": "VARCHAR(64)", "nullable": false, "label": "Approval Digest" },
      { "name": "FromMappingFingerprintVersion", "type": "VARCHAR(64)", "nullable": false, "label": "From Mapping Fingerprint Version" },
      { "name": "FromMappingFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "From Mapping Fingerprint" },
      { "name": "FromBodyFingerprintVersion", "type": "VARCHAR(64)", "nullable": false, "label": "From Body Fingerprint Version" },
      { "name": "FromBodyFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "From Body Fingerprint" },
      { "name": "FromPackInstallId", "type": "VARCHAR(255)", "nullable": false, "label": "From Pack Install Id" },
      { "name": "ToMappingFingerprintVersion", "type": "VARCHAR(64)", "nullable": false, "label": "To Mapping Fingerprint Version" },
      { "name": "ToMappingFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "To Mapping Fingerprint" },
      { "name": "ToBodyFingerprintVersion", "type": "VARCHAR(64)", "nullable": false, "label": "To Body Fingerprint Version" },
      { "name": "ToBodyFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "To Body Fingerprint" },
      { "name": "ToPackInstallId", "type": "VARCHAR(255)", "nullable": false, "label": "To Pack Install Id" },
      { "name": "FromLinkSnapshotDigest", "type": "VARCHAR(64)", "nullable": false, "label": "From Link Snapshot Digest" },
      { "name": "ToLinkSnapshotDigest", "type": "VARCHAR(64)", "nullable": false, "label": "To Link Snapshot Digest" },
      { "name": "Reason", "type": "TEXT", "nullable": false, "label": "Reason" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uniq_connector_push_link_revalidation_member", "columns": ["OperationId", "LinkKey"], "unique": true },
      { "name": "idx_connector_push_link_revalidation_link", "columns": ["LinkKey", "CreatedDate"] },
      { "name": "idx_connector_push_link_revalidation_manifest", "columns": ["ManifestDigest", "LinkKey"] }
    ]
  },
  {
    "tableName": "_System_ConnectorRemoteIdentityLane",
    "label": "Connector Remote Identity Lane",
    "tableType": "system_core",
    "category": "integration",
    "description": "Runtime-owned serialization guard shared by connector remote-identity register, finalize, recovery, and deleted-owner create fencing; never remote-identity authority.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "RemoteLocatorHash", "type": "VARCHAR(64)", "primaryKey": true, "label": "Remote Locator Hash" },
      { "name": "OwnerDeleted", "type": "BOOLEAN", "nullable": false, "default": "FALSE", "label": "Owner Deleted", "description": "Set only for the owner-fence hash after an owner delete commits; blocks new outbound creates for that owner." },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ]
  },
  {
    "tableName": "_System_ConnectorPushAttempt",
    "keyPrefix": "!pa",
    "tableType": "system_core",
    "category": "integration",
    "description": "Durable outbound connector attempt state for PushToConnector v2. Owns pending create/PATCH, idempotency, frozen association dispatch, remote-effect recovery, and writeback recovery.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "LinkKey", "type": "VARCHAR(255)", "nullable": false, "label": "Link Key" },
      { "name": "AttemptOccupancyKey", "type": "VARCHAR(255)", "nullable": true, "label": "Attempt Occupancy Key", "description": "Equals LinkKey while the attempt blocks another create, including unsuperseded terminal_failed; NULL for finalized/superseded rows." },
      { "name": "Status", "type": "VARCHAR(32)", "nullable": false, "default": "'pending'", "label": "Status", "description": "One of pending, processing, post_sent, ambiguous_remote_effect, writeback_pending, finalized, terminal_failed, superseded" },
      { "name": "DispatchLane", "type": "VARCHAR(64)", "nullable": false, "default": "'configured'", "label": "Dispatch Lane", "description": "Worker eligibility lane. configured follows the operator-enabled worker; deferred_association is safe for the always-on pre-dispatch lane." },
      { "name": "AttemptOrdinal", "type": "INT", "nullable": false, "default": "1", "label": "Attempt Ordinal" },
      { "name": "RemoteId", "type": "VARCHAR(512)", "nullable": true, "label": "Remote Id" },
      { "name": "ConnectorOwnerKey", "type": "VARCHAR(255)", "nullable": false, "label": "Connector Owner Key" },
      { "name": "ActionSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Action Slot Id" },
      { "name": "ActionType", "type": "VARCHAR(128)", "nullable": false, "label": "Action Type" },
      { "name": "SourceObject", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "DestinationSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Destination Slot Id" },
      { "name": "RequesterOwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Requester Owner Pack" },
      { "name": "ProfileOwnerPack", "type": "VARCHAR(255)", "nullable": false, "label": "Profile Owner Pack" },
      { "name": "ConnectorNamespace", "type": "VARCHAR(255)", "nullable": true, "label": "Connector Namespace" },
      { "name": "FlowDeveloperName", "type": "VARCHAR(255)", "nullable": true, "label": "Flow Developer Name" },
      { "name": "FlowActionName", "type": "VARCHAR(255)", "nullable": true, "label": "Flow Action Name" },
      { "name": "TargetObject", "type": "VARCHAR(255)", "nullable": false, "label": "Target Object" },
      { "name": "ProfileName", "type": "VARCHAR(255)", "nullable": false, "label": "Profile Name" },
      { "name": "CreatedPackInstallId", "type": "VARCHAR(255)", "nullable": true, "label": "Created Pack Install Id" },
      { "name": "CredentialRef", "type": "VARCHAR(255)", "nullable": false, "label": "Credential Ref" },
      { "name": "EndpointClass", "type": "VARCHAR(255)", "nullable": false, "label": "Endpoint Class" },
      { "name": "RetryPolicy", "type": "LONGTEXT", "nullable": false, "label": "Retry Policy" },
      { "name": "ProfileContractHash", "type": "VARCHAR(64)", "nullable": false, "label": "Profile Contract Hash" },
      { "name": "CreatePathTemplate", "type": "VARCHAR(1024)", "nullable": false, "label": "Create Path Template" },
      { "name": "UpdatePathTemplate", "type": "VARCHAR(1024)", "nullable": false, "label": "Update Path Template" },
      { "name": "ResponseIdPath", "type": "VARCHAR(255)", "nullable": false, "label": "Response Id Path" },
      { "name": "RemoteIdField", "type": "VARCHAR(255)", "nullable": true, "label": "Remote Id Field" },
      { "name": "RemoteIdProvenanceField", "type": "VARCHAR(255)", "nullable": true, "label": "Remote Id Provenance Field" },
      { "name": "RemoteIdMirrorExpectedValue", "type": "LONGTEXT", "nullable": true, "label": "Remote Id Mirror Expected Value" },
      { "name": "RemoteIdMirrorCurrentValue", "type": "LONGTEXT", "nullable": true, "label": "Remote Id Mirror Current Value" },
      { "name": "RemoteIdProvenanceMirrorExpectedValue", "type": "LONGTEXT", "nullable": true, "label": "Remote Id Provenance Mirror Expected Value" },
      { "name": "RemoteIdProvenanceMirrorCurrentValue", "type": "LONGTEXT", "nullable": true, "label": "Remote Id Provenance Mirror Current Value" },
      { "name": "MappingFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "Mapping Fingerprint" },
      { "name": "BodyFingerprint", "type": "VARCHAR(255)", "nullable": false, "label": "Body Fingerprint" },
      { "name": "CreateConflictResolutionFingerprint", "type": "VARCHAR(255)", "nullable": false, "default": "''", "label": "Create Conflict Resolution Fingerprint" },
      { "name": "CreateConflictPatchIntentJSON", "type": "JSON", "nullable": true, "label": "Create Conflict Patch Intent JSON" },
      { "name": "PatchDispatchIntentJSON", "type": "JSON", "nullable": true, "label": "Patch Dispatch Intent JSON", "description": "Exact worker-frozen PATCH body hash and rendered idempotent association requests; persisted before remote I/O and reused after lease recovery." },
      { "name": "OriginatingUserId", "type": "VARCHAR(255)", "nullable": false, "label": "Originating User Id" },
      { "name": "OriginatingUserSessionJSON", "type": "JSON", "nullable": true, "label": "Originating User Session JSON" },
      { "name": "AllowedSourceFieldsJSON", "type": "JSON", "nullable": true, "label": "Allowed Source Fields JSON" },
      { "name": "AssociationSourceRecordIdsJSON", "type": "JSON", "nullable": true, "label": "Association Source Record IDs JSON" },
      { "name": "RequestIdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Request Idempotency Key" },
      { "name": "RequestMethod", "type": "VARCHAR(16)", "nullable": false, "label": "Request Method" },
      { "name": "RequestRelativePath", "type": "VARCHAR(1024)", "nullable": false, "label": "Request Relative Path" },
      { "name": "RequestHeaders", "type": "JSON", "nullable": true, "label": "Request Headers" },
      { "name": "RequestBodyBase64", "type": "LONGTEXT", "nullable": true, "label": "Request Body Base64" },
      { "name": "RequestBodyHash", "type": "VARCHAR(255)", "nullable": false, "label": "Request Body Hash" },
      { "name": "ResponseStatusCode", "type": "INT", "nullable": true, "label": "Response Status Code" },
      { "name": "ResponseHeaders", "type": "JSON", "nullable": true, "label": "Response Headers" },
      { "name": "ResponseBodyBase64", "type": "LONGTEXT", "nullable": true, "label": "Response Body Base64" },
      { "name": "ResponseBodyHash", "type": "VARCHAR(255)", "nullable": true, "label": "Response Body Hash" },
      { "name": "CompatibilityMirrorStatus", "type": "VARCHAR(64)", "nullable": true, "label": "Compatibility Mirror Status" },
      { "name": "RetryCount", "type": "INT", "nullable": false, "default": "0", "label": "Retry Count" },
      { "name": "LastError", "type": "TEXT", "nullable": true, "label": "Last Error" },
      { "name": "LastErrorAt", "type": "DATETIME", "nullable": true, "label": "Last Error At" },
      { "name": "ClaimedBy", "type": "VARCHAR(255)", "nullable": true, "label": "Claimed By" },
      { "name": "ClaimToken", "type": "VARCHAR(255)", "nullable": true, "label": "Claim Token" },
      { "name": "ClaimedAt", "type": "DATETIME", "nullable": true, "label": "Claimed At" },
      { "name": "LeaseExpiresAt", "type": "DATETIME", "nullable": true, "label": "Lease Expires At" },
      { "name": "RemoteIOStartedAt", "type": "DATETIME", "nullable": true, "label": "Remote I/O Started At", "description": "Conservative worker checkpoint persisted immediately before remote I/O. Expired processing claims are replay-safe only while this is NULL." },
      { "name": "SupersededByAttemptId", "type": "VARCHAR(255)", "nullable": true, "label": "Superseded By Attempt Id" },
      { "name": "SupersededAt", "type": "DATETIME", "nullable": true, "label": "Superseded At" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uniq_connector_push_attempt_occupancy", "columns": ["AttemptOccupancyKey"], "unique": true },
      { "name": "uniq_connector_push_attempt_ordinal", "columns": ["LinkKey", "AttemptOrdinal"], "unique": true },
      { "name": "uniq_connector_push_attempt_idempotency", "columns": ["RequestIdempotencyKey"], "unique": true },
      { "name": "idx_connector_push_attempt_gate", "columns": ["LinkKey", "Status"] },
      { "name": "idx_connector_push_attempt_claim", "columns": ["Status", "ClaimedAt", "CreatedDate"] },
      { "name": "idx_connector_push_attempt_lane_claim", "columns": ["Status", "DispatchLane", "LeaseExpiresAt", "CreatedDate"] },
      { "name": "idx_connector_push_attempt_source", "columns": ["SourceObject", "SourceRecordId"] }
    ]
  },
  {
    "tableName": "_System_ConnectorIngressReceipt",
    "label": "Connector Ingress Receipt",
    "keyPrefix": "!ir",
    "tableType": "system_core",
    "category": "integration",
    "description": "Durable L0 generic verified inbound connector receipt inbox. Captures a signature-verified delivery before parser/event enqueue work; receipt dedupe is ingress-only and does not replace downstream business idempotency.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "Namespace", "type": "VARCHAR(255)", "nullable": false, "label": "Namespace", "description": "Connector-pack namespace resolved at verification time." },
      { "name": "InstalledPackId", "type": "VARCHAR(255)", "nullable": false, "label": "Installed Pack Id", "description": "Connector pack incarnation identity snapshotted at verification time." },
      { "name": "PackVersion", "type": "VARCHAR(255)", "nullable": true, "label": "Pack Version" },
      { "name": "SecretName", "type": "VARCHAR(255)", "nullable": false, "label": "Secret Name", "description": "Webhook secret component name used to verify the request. Secret values are never stored here." },
      { "name": "SecretAlgorithm", "type": "VARCHAR(128)", "nullable": false, "label": "Secret Algorithm" },
      { "name": "VerifierCapabilityKind", "type": "VARCHAR(128)", "nullable": false, "label": "Verifier Capability Kind" },
      { "name": "ParserCapabilityKind", "type": "VARCHAR(128)", "nullable": false, "label": "Parser Capability Kind" },
      { "name": "RequestMethod", "type": "VARCHAR(16)", "nullable": false, "label": "Request Method" },
      { "name": "RequestTargetHash", "type": "VARCHAR(64)", "nullable": false, "label": "Request Target Hash", "description": "SHA-256 over method plus raw request target/full URL. The raw target is encrypted because query strings can carry signatures or credentials." },
      { "name": "RequestTargetCiphertext", "type": "LONGTEXT", "nullable": false, "label": "Request Target Ciphertext", "description": "Encrypted JSON containing the raw request URI and reconstructed URL for the internal receipt router." },
      { "name": "ReceiptKey", "type": "VARCHAR(255)", "nullable": false, "label": "Receipt Key", "description": "Ingress receipt dedupe key derived from a pack-owned verified delivery identity. This is not the final business/event exactly-once key." },
      { "name": "BodyHash", "type": "VARCHAR(64)", "nullable": false, "label": "Body Hash" },
      { "name": "BodySizeBytes", "type": "INT", "nullable": false, "default": "0", "label": "Body Size Bytes", "description": "Raw body byte length captured at verified ingress time; safe metadata for admin list/detail without decrypting the body." },
      { "name": "BodyCiphertext", "type": "LONGTEXT", "nullable": false, "label": "Body Ciphertext", "description": "Encrypted raw request body payload. No generic CRUD/read path should expose this column." },
      { "name": "AllowedHeadersCiphertext", "type": "LONGTEXT", "nullable": false, "label": "Allowed Headers Ciphertext", "description": "Encrypted JSON containing only pack-declared receipt header allowlist values. Empty allowlist stores an empty object." },
      { "name": "Status", "type": "VARCHAR(32)", "nullable": false, "default": "'pending'", "label": "Status", "description": "One of pending, processing, retry, pending_config, enqueued, dead, config_terminal." },
      { "name": "AttemptCount", "type": "INT", "nullable": false, "default": "0", "label": "Attempt Count" },
      { "name": "NextAttemptAt", "type": "DATETIME", "nullable": true, "label": "Next Attempt At" },
      { "name": "ClaimedBy", "type": "VARCHAR(255)", "nullable": true, "label": "Claimed By" },
      { "name": "ClaimToken", "type": "VARCHAR(255)", "nullable": true, "label": "Claim Token" },
      { "name": "ClaimedAt", "type": "DATETIME", "nullable": true, "label": "Claimed At" },
      { "name": "LeaseExpiresAt", "type": "DATETIME", "nullable": true, "label": "Lease Expires At" },
      { "name": "EnqueuedEventIds", "type": "JSON", "nullable": true, "label": "Enqueued Event Ids" },
      { "name": "EnqueueMetadata", "type": "JSON", "nullable": true, "label": "Enqueue Metadata" },
      { "name": "LastError", "type": "TEXT", "nullable": true, "label": "Last Error" },
      { "name": "LastErrorAt", "type": "DATETIME", "nullable": true, "label": "Last Error At" },
      { "name": "PurgeAfter", "type": "DATETIME", "nullable": true, "label": "Purge After", "description": "Rows older than this timestamp may be eligible for operator-managed purge." },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uniq_connector_ingress_receipt_key", "columns": ["ReceiptKey"], "unique": true },
      { "name": "idx_connector_ingress_receipt_claim", "columns": ["Status", "NextAttemptAt", "CreatedDate", "Id"] },
      { "name": "idx_connector_ingress_receipt_namespace", "columns": ["Namespace", "InstalledPackId", "Status"] },
      { "name": "idx_connector_ingress_receipt_purge", "columns": ["PurgeAfter", "Status"] }
    ]
  },
  {
    "tableName": "_System_ConnectorInboundRemoteIDEvidence",
    "label": "Connector Inbound Remote ID Evidence",
    "keyPrefix": "!ie",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Inbound Remote ID Evidence",
    "description": "Authorship provenance record: the connector authored remote-id RemoteId onto field RemoteIDField of an engine-confirmed local record (SourceObject, SourceRecordId). SSoT is authorship only; remote identity ownership lives in _System_ConnectorRemoteLink. This table is additive (evidence-backed connector-push adoption 1/3, epic #2028, issue #2040).",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "ConnectorOwnerKey", "type": "VARCHAR(255)", "nullable": false, "label": "Connector Owner Key" },
      { "name": "ConnectorNamespace", "type": "VARCHAR(255)", "nullable": false, "label": "Connector Namespace" },
      { "name": "SourceObject", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "RemoteIDField", "type": "VARCHAR(255)", "nullable": false, "label": "Remote ID Field" },
      { "name": "RemoteId", "type": "VARCHAR(512)", "nullable": false, "label": "Remote Id" },
      { "name": "EvidenceStatus", "type": "VARCHAR(32)", "nullable": false, "default": "'authored'", "label": "Evidence Status", "description": "One of authored, consumed, retired" },
      { "name": "ConsumedByLinkKey", "type": "VARCHAR(255)", "nullable": true, "label": "Consumed By Link Key", "description": "Set when EvidenceStatus transitions to consumed; references the _System_ConnectorRemoteLink.LinkKey that absorbed this evidence." },
      { "name": "ActiveKey", "type": "VARCHAR(255)", "nullable": true, "label": "Active Key", "description": "Deterministic hash of (ConnectorOwnerKey, SourceObject, SourceRecordId, RemoteIDField) while EvidenceStatus='authored'; NULL after retire or consume, giving MySQL/TiDB a hard unique key for the active authored record per (connector, source record, remote-id field) without partial-index semantics." },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uniq_connector_inbound_evidence_active", "columns": ["ActiveKey"], "unique": true },
      { "name": "idx_connector_inbound_evidence_remote", "columns": ["ConnectorNamespace", "RemoteId"] }
    ]
  },
  {
    "tableName": "_System_RollupDelta",
    "label": "Rollup Delta",
    "keyPrefix": "!rd",
    "tableType": "system_core",
    "category": "analytics",
    "description": "Durable async maintenance queue for insert-only COUNT rollup summary deltas. The rollup field remains a queryable materialized aggregate mirror; this table moves safe relative delta maintenance out of the child write transaction and drains by parent record.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "SourceObject", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "ParentObject", "type": "VARCHAR(255)", "nullable": false, "label": "Parent Object" },
      { "name": "ParentRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Parent Record Id" },
      { "name": "RollupField", "type": "VARCHAR(255)", "nullable": false, "label": "Rollup Field" },
      { "name": "Delta", "type": "BIGINT", "nullable": false, "label": "Delta" },
      { "name": "DedupeKey", "type": "VARCHAR(64)", "nullable": false, "label": "Dedupe Key", "description": "SHA-256 over source object, source record, parent object, parent record, rollup field, insert operation, and (for independently produced work) the complete immutable Runtime metadata binding. Enqueue is idempotent within one exact definition lineage without suppressing obligations from a newer Catalog revision." },
      { "name": "ScopeDigest", "type": "CHAR(64)", "collationName": "utf8mb4_bin", "nullable": true, "label": "Runtime Scope Digest", "description": "Bounded derived identity of OrgId, AppInstallationId, and RuntimeCapabilityId for exact Runtime worker queue selection. Explicit scope columns remain authority; legacy unscoped rows remain NULL." },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": true, "label": "Org Id", "description": "Runtime execution scope that authored the marker; required for independently produced work." },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": true, "label": "App Installation Id", "description": "Installed App scope of the immutable Runtime metadata view." },
      { "name": "RuntimeCapabilityId", "type": "VARCHAR(255)", "nullable": true, "label": "Runtime Capability Id" },
      { "name": "CatalogRevision", "type": "DECIMAL(20,0)", "nullable": true, "label": "Catalog Revision" },
      { "name": "SchemaGeneration", "type": "DECIMAL(20,0)", "nullable": true, "label": "Schema Generation" },
      { "name": "EngineGeneration", "type": "DECIMAL(20,0)", "nullable": true, "label": "Engine Generation" },
      { "name": "CatalogSnapshotDigest", "type": "CHAR(71)", "nullable": true, "label": "Catalog Snapshot Digest" },
      { "name": "RuntimeMetadataViewDigest", "type": "CHAR(71)", "nullable": true, "label": "Runtime Metadata View Digest" },
      { "name": "Status", "type": "VARCHAR(32)", "nullable": false, "default": "'pending'", "label": "Status", "description": "One of pending, processed, failed. Failed rows are durable poison work and require an exact operator repair before replay." },
      { "name": "RetryCount", "type": "INT", "nullable": false, "default": "0", "label": "Retry Count" },
      { "name": "LastError", "type": "TEXT", "nullable": true, "label": "Last Error" },
      { "name": "LastErrorAt", "type": "DATETIME", "nullable": true, "label": "Last Error At" },
      { "name": "NextAttemptAt", "type": "DATETIME", "nullable": true, "label": "Next Attempt At" },
      { "name": "ProcessedAt", "type": "DATETIME", "nullable": true, "label": "Processed At" },
      { "name": "RepairId", "type": "VARCHAR(255)", "nullable": true, "label": "Repair Id" },
      { "name": "RepairReason", "type": "VARCHAR(1024)", "nullable": true, "label": "Repair Reason" },
      { "name": "RepairCount", "type": "INT", "nullable": false, "default": "0", "label": "Repair Count" },
      { "name": "LastRepairAt", "type": "DATETIME(6)", "nullable": true, "label": "Last Repair At" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uniq_rollup_delta_dedupe", "columns": ["DedupeKey"], "unique": true },
      { "name": "idx_rollup_delta_claim", "columns": ["Status", "NextAttemptAt", "CreatedDate", "Id"] },
      { "name": "idx_rollup_delta_scope_claim", "columns": ["ScopeDigest", "Status", "NextAttemptAt", "CreatedDate", "Id"] },
      { "name": "idx_rollup_delta_scope_parent_lane", "columns": ["ScopeDigest", "ParentObject", "ParentRecordId", "Status", "NextAttemptAt", "CreatedDate"] },
      { "name": "idx_rollup_delta_parent_lane", "columns": ["Status", "ParentObject", "ParentRecordId", "NextAttemptAt", "CreatedDate"] },
      { "name": "idx_rollup_delta_source", "columns": ["SourceObject", "SourceRecordId"] }
    ]
  },
  {
    "tableName": "_System_ParentLane",
    "label": "Parent Lane",
    "keyPrefix": "!pl",
    "tableType": "system_core",
    "category": "records",
    "description": "Runtime-owned durable admission lane for lock-required parent record keys. Rows are claimed with owner tokens and short leases before business parent-row locks, then released after SQL transaction completion.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "KeyHash", "type": "VARCHAR(64)", "primaryKey": true, "label": "Key Hash", "description": "SHA-256 over the v1 canonical parent-lane key." },
      { "name": "ParentObjectName", "type": "VARCHAR(255)", "nullable": false, "label": "Parent Object Name", "description": "Lowercase canonical parent object API name." },
      { "name": "ParentRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Parent Record Id", "description": "Canonical parent record ID; record ID case is preserved." },
      { "name": "OwnerToken", "type": "VARCHAR(64)", "nullable": false, "label": "Owner Token", "description": "Opaque fencing token required for heartbeat and release." },
      { "name": "LeaseExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Lease Expires At" },
      { "name": "LastHeartbeatAt", "type": "DATETIME(6)", "nullable": false, "label": "Last Heartbeat At" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_parent_lane_lease_expiry", "columns": ["LeaseExpiresAt", "KeyHash"] },
      { "name": "idx_parent_lane_parent_key", "columns": ["ParentObjectName", "ParentRecordId"] }
    ]
  },
  {
    "tableName": "_System_ConnectorCredentialGeneration",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Credential Generation",
    "description": "Connector-owned immutable credential-generation metadata and deterministic owner receipt. L2 authors each exact generation; runtime resolution uses only its exact generation identity and secret-backend version reference. The row stores canonical non-secret transport configuration but never secret bytes, mutable credential names, dispatch eligibility, or a current-generation selector.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Credential Generation Id", "description": "Exact immutable Connector credential-generation identity." },
      { "name": "StableCredentialIdentity", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Stable Credential Identity", "description": "Stable L2-authored credential identity shared by its immutable rotation generations; a mutable developer name is not this identity." },
      { "name": "ProviderScopeId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Provider Scope Id", "description": "Opaque provider-account identity boundary. It contains no provider-specific interpretation in L0." },
      { "name": "ConnectorAccountId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Account Id", "description": "Exact L2 connector-account identity authorized to use this generation." },
      { "name": "SecretBackendProtocol", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Secret Backend Protocol", "description": "Exact versioned protocol selecting the secret-backend resolver. It is not a mutable credential name." },
      { "name": "SecretBackendVersionRef", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Secret Backend Version Ref", "description": "Immutable opaque secret-backend version reference. Runtime must never replace it with a current or newer secret." },
      { "name": "TransportConfiguration", "type": "MEDIUMBLOB", "nullable": false, "label": "Transport Configuration", "description": "Canonical owner-versioned non-secret transport configuration bytes retained with this generation. Secret material is forbidden." },
      { "name": "TransportConfigurationDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Transport Configuration Digest", "description": "Owner-protocol digest of the exact retained non-secret transport configuration bytes." },
      { "name": "ReceiptProtocolVersion", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Protocol Version", "description": "Exact credential-generation owner-receipt protocol used to reconstruct and validate the immutable fact." },
      { "name": "OwnerReceipt", "type": "MEDIUMBLOB", "nullable": false, "label": "Owner Receipt", "description": "Deterministic byte-stable receipt over every semantic generation field. It contains no secret bytes." },
      { "name": "OwnerReceiptDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Owner Receipt Digest", "description": "Digest of the exact deterministic owner receipt." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector credential-generation repository never updates immutable rows." }
    ],
    "indices": [
      { "name": "idx_connector_credential_generation_identity", "columns": ["StableCredentialIdentity", "Id"] },
      { "name": "idx_connector_credential_generation_scope", "columns": ["ProviderScopeId", "ConnectorAccountId"] }
    ]
  },
  {
    "tableName": "_System_ConnectorCredentialGenerationDispatchGate",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Credential Generation Dispatch Gate",
    "description": "Connector-owned mutable dispatch eligibility for one exact immutable credential generation. The closed enabled/revoked mode and monotonic fence are changed only by the Connector repository under authorized L2 policy. This inert schema grants no DispatchPermit, provider I/O, secret access, or current-generation selection.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "CredentialGenerationId", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Credential Generation Id", "description": "Exact immutable credential-generation identity and sole gate identity; one generation has at most one dispatch gate." },
      { "name": "Mode", "type": "VARCHAR(32)", "nullable": false, "default": "'enabled'", "collationName": "utf8mb4_bin", "label": "Mode", "description": "One of enabled or revoked. The Connector repository rejects every other value or transition." },
      { "name": "FenceToken", "type": "BIGINT", "nullable": false, "default": "0", "label": "Fence Token", "description": "Monotonic compare-and-swap token incremented exactly once by every committed revocation or authorized reenablement and never reset or reused." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository writes it explicitly with each fenced transition." }
    ],
    "foreignKeys": [
      { "column": "CredentialGenerationId", "references": "_System_ConnectorCredentialGeneration(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorServiceConfigurationGeneration",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Service Configuration Generation",
    "description": "Connector-owned immutable whole-service configuration generation and deterministic owner receipt. An external configuration owner supplies generic account, provider-scope, binding-selection, and policy bytes; the Connector repository validates them against one exact Catalog view and exact credential generations before publication. This table exposes no mutable current selector, provider-specific payload, secret bytes, serving transition, or deployment authority.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Configuration Generation Id", "description": "Exact immutable Connector service-configuration generation identity." },
      { "name": "GenerationProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Generation Protocol Version", "description": "Closed Connector-owned canonical generation protocol." },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Org Id", "description": "Exact organization scope derived from the validated IntegrationBindingView." },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "App Installation Id", "description": "Exact application-installation scope derived from the validated IntegrationBindingView." },
      { "name": "AuthorizedWorkloadId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Authorized Workload Id", "description": "Exact Integration workload scope derived from the validated IntegrationBindingView." },
      { "name": "CatalogRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Catalog Revision", "description": "Catalog revision of the complete validated IntegrationBindingView." },
      { "name": "SchemaGeneration", "type": "DECIMAL(20,0)", "nullable": false, "label": "Schema Generation", "description": "Schema generation attested by the complete validated IntegrationBindingView." },
      { "name": "EngineGeneration", "type": "DECIMAL(20,0)", "nullable": false, "label": "Engine Generation", "description": "Engine generation attested by the complete validated IntegrationBindingView." },
      { "name": "SourceSnapshotDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Source Snapshot Digest", "description": "Exact Catalog source-snapshot digest for the validated view." },
      { "name": "CatalogViewDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Catalog View Digest", "description": "Catalog-authored digest of the complete validated IntegrationBindingView. Child binding ordinals are meaningful only under this exact digest and lineage." },
      { "name": "CatalogReceiptProtocolVersion", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Catalog Receipt Protocol Version", "description": "Protocol version from the exact Catalog view receipt." },
      { "name": "CatalogReceiptCapabilityVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Catalog Receipt Capability Version", "description": "Capability version from the exact Catalog view receipt." },
      { "name": "CatalogSecurityEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Catalog Security Epoch", "description": "Security epoch from the exact Catalog view receipt." },
      { "name": "ConfigurationOwnerRevisionId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Configuration Owner Revision Id", "description": "Exact immutable external-owner source revision used to author this generation." },
      { "name": "ConfigurationOwnerRevisionDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Configuration Owner Revision Digest", "description": "Digest of the exact external-owner source revision." },
      { "name": "GenerationDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Generation Digest", "description": "Connector-owned canonical digest over the complete normalized generation and every exact source identity." },
      { "name": "ReceiptProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Protocol Version", "description": "Closed Connector owner-receipt protocol used to reconstruct and validate the immutable generation." },
      { "name": "OwnerReceipt", "type": "MEDIUMBLOB", "nullable": false, "label": "Owner Receipt", "description": "Compact deterministic byte-stable receipt for the complete immutable generation. It contains no configuration payload or secret bytes." },
      { "name": "OwnerReceiptDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Owner Receipt Digest", "description": "Digest of the exact deterministic owner receipt." },
      { "name": "AccountCount", "type": "BIGINT", "nullable": false, "label": "Account Count", "description": "Exact exhaustive account-row count committed by the owner receipt." },
      { "name": "BindingCount", "type": "BIGINT", "nullable": false, "label": "Binding Count", "description": "Exact exhaustive configured-binding-row count committed by the owner receipt." },
      { "name": "CredentialSelectionCount", "type": "BIGINT", "nullable": false, "label": "Credential Selection Count", "description": "Exact exhaustive binding-credential relation count committed by the owner receipt." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector service-configuration repository never updates immutable rows." }
    ],
    "indices": [
      { "name": "idx_connector_service_configuration_catalog_view", "columns": ["CatalogViewDigest", "Id"] }
    ]
  },
  {
    "tableName": "_System_ConnectorServiceConfigurationAccount",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Service Configuration Account",
    "description": "One immutable account member of an exhaustive Connector service-configuration generation. The row retains exact account and provider-scope owner revisions but no provider-specific interpretation, mutable account registry, credential metadata, or secrets.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Configuration Account Id", "description": "Connector-owned immutable row identity used only by normalized child relations." },
      { "name": "ServiceConfigurationGenerationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Service Configuration Generation Id", "description": "Exact immutable parent generation." },
      { "name": "AccountOrdinal", "type": "INT", "nullable": false, "label": "Account Ordinal", "description": "Zero-based position in the generation's canonical account order." },
      { "name": "ConnectorAccountId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Account Id", "description": "Exact externally authored connector-account identity." },
      { "name": "ProviderScopeId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Provider Scope Id", "description": "Opaque provider-organization or account boundary with no provider-specific interpretation in L0." },
      { "name": "AccountRevisionId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Account Revision Id", "description": "Exact immutable source revision for the account configuration." },
      { "name": "AccountRevisionDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Account Revision Digest", "description": "Digest of the exact account source revision." },
      { "name": "ProviderRevisionId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Provider Revision Id", "description": "Exact immutable source revision for the provider-scope configuration." },
      { "name": "ProviderRevisionDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Provider Revision Digest", "description": "Digest of the exact provider-scope source revision." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector service-configuration repository never updates immutable rows." }
    ],
    "indices": [
      { "name": "ux_connector_service_configuration_account_ordinal", "columns": ["ServiceConfigurationGenerationId", "AccountOrdinal"], "unique": true },
      { "name": "ux_connector_service_configuration_account_identity", "columns": ["ServiceConfigurationGenerationId", "ConnectorAccountId"], "unique": true }
    ],
    "foreignKeys": [
      { "column": "ServiceConfigurationGenerationId", "references": "_System_ConnectorServiceConfigurationGeneration(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorServiceConfigurationBinding",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Service Configuration Binding",
    "description": "One immutable enabled binding configuration within an account member. Catalog remains the sole binding-fact owner: this row stores only the binding's ordinal under the parent generation's exact Catalog view plus externally authored canonical configuration bytes and revision. Omission disables a binding; there is no mutable enabled flag.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Configuration Binding Id", "description": "Connector-owned immutable row identity used only by normalized credential-selection relations." },
      { "name": "AccountConfigurationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Account Configuration Id", "description": "Exact immutable parent account member." },
      { "name": "CatalogBindingOrdinal", "type": "INT", "nullable": false, "label": "Catalog Binding Ordinal", "description": "Zero-based position in the complete validated IntegrationBindingView bound by the parent generation. It is never interpreted without that exact view digest and lineage." },
      { "name": "ConfigurationRevisionId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Configuration Revision Id", "description": "Exact immutable external-owner revision for these configuration bytes." },
      { "name": "ConfigurationRevisionDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Configuration Revision Digest", "description": "Digest of the exact configuration source revision." },
      { "name": "ConfigurationFormatVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Configuration Format Version", "description": "Owner-versioned format for the opaque canonical configuration bytes." },
      { "name": "CanonicalConfiguration", "type": "MEDIUMBLOB", "nullable": false, "label": "Canonical Configuration", "description": "Canonical externally authored selection, override, and policy bytes. Empty bytes are a valid value; SQL NULL, L1 binding definitions, credential metadata, provider payloads, and secrets are forbidden." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector service-configuration repository never updates immutable rows." }
    ],
    "indices": [
      { "name": "ux_connector_service_configuration_binding_ordinal", "columns": ["AccountConfigurationId", "CatalogBindingOrdinal"], "unique": true }
    ],
    "foreignKeys": [
      { "column": "AccountConfigurationId", "references": "_System_ConnectorServiceConfigurationAccount(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorServiceConfigurationCredentialSelection",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Service Configuration Credential Selection",
    "description": "One immutable exact relation from a configured Catalog binding CredentialRef to a Connector-owned credential generation. The Connector repository proves completeness and exact account/provider scope before publication. This row never stores secret bytes or permits a mutable/current credential lookup.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Credential Selection Id", "description": "Connector-owned immutable relation-row identity." },
      { "name": "BindingConfigurationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Binding Configuration Id", "description": "Exact immutable parent binding configuration." },
      { "name": "CredentialOrdinal", "type": "INT", "nullable": false, "label": "Credential Ordinal", "description": "Zero-based position in the binding's canonical sorted CredentialRef relation." },
      { "name": "CredentialRef", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Credential Ref", "description": "Exact CredentialRef from the Catalog binding selected by the parent binding ordinal." },
      { "name": "CredentialGenerationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Credential Generation Id", "description": "Exact immutable Connector credential generation selected for this CredentialRef; no current or latest fallback is allowed." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector service-configuration repository never updates immutable rows." }
    ],
    "indices": [
      { "name": "ux_connector_service_configuration_credential_ordinal", "columns": ["BindingConfigurationId", "CredentialOrdinal"], "unique": true },
      { "name": "ux_connector_service_configuration_credential_ref", "columns": ["BindingConfigurationId", "CredentialRef"], "unique": true },
      { "name": "ux_connector_service_configuration_credential_generation", "columns": ["BindingConfigurationId", "CredentialGenerationId"], "unique": true }
    ],
    "foreignKeys": [
      { "column": "BindingConfigurationId", "references": "_System_ConnectorServiceConfigurationBinding(Id)", "onDelete": "RESTRICT" },
      { "column": "CredentialGenerationId", "references": "_System_ConnectorCredentialGeneration(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorServingEpoch",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Serving Epoch",
    "description": "Connector V2 execution-generation authority. The immutable epoch digest binds one exact Catalog consumer scope and lineage, the normalized immutable binding-reference set, and one versioned L2 account-configuration generation and verification receipt. State changes are owned only by the Connector V2 serving repository; this schema adds no production V2 claimant or activation path.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id", "description": "Stable Connector-owned execution-generation identity." },
      { "name": "EpochDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Epoch Digest", "description": "Domain-separated digest of Id and the immutable candidate identity: serving scope, Catalog lineage and ordered references, and exact L2 account-configuration generation." },
      { "name": "ServingScopeDigest", "type": "CHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Scope Digest", "description": "Domain-separated hexadecimal SHA-256 digest of OrgId, AppInstallationId, and AuthorizedWorkloadId. It is the stable scope shared with AccountServingGate." },
      { "name": "ActiveScopeDigest", "type": "CHAR(64)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Active Scope Digest", "description": "Equals ServingScopeDigest only while State='active' and is NULL otherwise. Its unique index prevents two active epochs for one serving scope without partial-index semantics." },
      { "name": "State", "type": "VARCHAR(32)", "nullable": false, "default": "'prepared'", "collationName": "utf8mb4_bin", "label": "State", "description": "One of prepared, verified, rejected, active, draining, retired. The Connector repository rejects every other transition." },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Org Id", "description": "Exact organization scope from the admitted IntegrationBindingView." },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "App Installation Id", "description": "Exact application installation scope from the admitted IntegrationBindingView." },
      { "name": "AuthorizedWorkloadId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Authorized Workload Id", "description": "Exact Integration workload scope from the admitted IntegrationBindingView." },
      { "name": "CatalogRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Catalog Revision" },
      { "name": "SchemaGeneration", "type": "DECIMAL(20,0)", "nullable": false, "label": "Schema Generation" },
      { "name": "EngineGeneration", "type": "DECIMAL(20,0)", "nullable": false, "label": "Engine Generation" },
      { "name": "SourceSnapshotDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Source Snapshot Digest" },
      { "name": "BindingViewDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Binding View Digest", "description": "Catalog-authored digest of the complete admitted IntegrationBindingView." },
      { "name": "ReceiptProtocolVersion", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Protocol Version", "description": "Catalog IntegrationBindingView receipt protocol version." },
      { "name": "ReceiptCapabilityVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Capability Version", "description": "Exact Catalog capability version attested by the IntegrationBindingView receipt." },
      { "name": "SecurityEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Security Epoch", "description": "Security epoch attested by the Catalog receipt for the exact consumer scope." },
      { "name": "L2ConfigurationGenerationRef", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "L2 Configuration Generation Ref", "description": "Profile-tagged L2 generation reference. Absence of a ConnectorServingEpochReproducibility row together with zero binding-owner and credential-generation proof rows marks a legacy candidate; when the header is present, this value is the exact ServiceConfigurationGeneration Id and the reader rejects an unresolved or mismatched generation." },
      { "name": "L2ConfigurationDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "L2 Configuration Digest", "description": "Profile-tagged L2 generation digest. Absence of a ConnectorServingEpochReproducibility row together with zero binding-owner and credential-generation proof rows marks a legacy candidate; when the header is present, this is the exact ServiceConfigurationGeneration owner GenerationDigest, not a Connector-side rehash." },
      { "name": "L2VerificationReceipt", "type": "MEDIUMBLOB", "nullable": false, "label": "L2 Verification Receipt", "description": "Profile-tagged L2 verification receipt with no credential secret bytes. Absence of a ConnectorServingEpochReproducibility row together with zero binding-owner and credential-generation proof rows marks a legacy candidate; when the header is present, these bytes are the exact ServiceConfigurationGeneration OwnerReceipt, not a Connector-side reconstructed receipt." },
      { "name": "L2VerificationReceiptDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "L2 Verification Receipt Digest", "description": "Profile-tagged L2 verification-receipt digest. Absence of a ConnectorServingEpochReproducibility row together with zero binding-owner and credential-generation proof rows marks a legacy candidate; when the header is present, this is the exact ServiceConfigurationGeneration OwnerReceiptDigest, not a Connector-side rehash." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connector_serving_epoch_digest", "columns": ["EpochDigest"], "unique": true },
      { "name": "ux_connector_serving_epoch_active_scope", "columns": ["ActiveScopeDigest"], "unique": true },
      { "name": "idx_connector_serving_epoch_scope_state", "columns": ["ServingScopeDigest", "State", "Id"] }
    ]
  },
  {
    "tableName": "_System_ConnectorServingEpochBinding",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Serving Epoch Binding",
    "description": "Immutable exact-generation reference admitted into one Connector V2 ServingEpoch. Rows retain only Catalog binding identity, exact pack generation, sorted credential-reference bytes, and the optional neutral Runtime command reference. They never copy editable route, mapping, provider payload, or credential secret bytes.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Serving Epoch Binding Id" },
      { "name": "ServingEpochId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id" },
      { "name": "BindingOrdinal", "type": "INT", "nullable": false, "label": "Binding Ordinal", "description": "Zero-based position in the canonical ordered IntegrationBindingView." },
      { "name": "BindingIdentityDigest", "type": "CHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Binding Identity Digest", "description": "Domain-separated hexadecimal SHA-256 digest of Kind, OwnerPack, PackInstallationId, and BusinessKey, used only to enforce one exact binding identity per epoch within TiDB index limits." },
      { "name": "Kind", "type": "VARCHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Binding Kind" },
      { "name": "OwnerPack", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Owner Pack" },
      { "name": "PackInstallationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Pack Installation Id" },
      { "name": "PackPayloadDigest", "type": "CHAR(85)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Pack Payload Digest", "description": "Exact Catalog pack payload identity: nexus-pack-sha256-v1: followed by 64 lowercase hexadecimal characters." },
      { "name": "BusinessKey", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Business Key" },
      { "name": "DefinitionVersion", "type": "DECIMAL(20,0)", "nullable": false, "label": "Definition Version" },
      { "name": "CredentialRefs", "type": "MEDIUMBLOB", "nullable": false, "label": "Credential References", "description": "Canonical ordered bytes for the binding's credential reference identities. No credential value or secret bytes are stored." },
      { "name": "RuntimeCommandKind", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Runtime Command Kind" },
      { "name": "RuntimePayloadFormatVersion", "type": "BIGINT", "nullable": true, "label": "Runtime Payload Format Version" },
      { "name": "RuntimeDefinitionRef", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Runtime Definition Ref" },
      { "name": "RuntimeDefinitionVersion", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Runtime Definition Version" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository never updates immutable binding rows." }
    ],
    "indices": [
      { "name": "ux_connector_epoch_binding_ordinal", "columns": ["ServingEpochId", "BindingOrdinal"], "unique": true },
      { "name": "ux_connector_epoch_binding_identity", "columns": ["ServingEpochId", "BindingIdentityDigest"], "unique": true },
      { "name": "idx_connector_epoch_binding_pack", "columns": ["ServingEpochId", "PackInstallationId", "BindingOrdinal"] }
    ],
    "foreignKeys": [
      { "column": "ServingEpochId", "references": "_System_ConnectorServingEpoch(Id)" }
    ]
  },
  {
    "tableName": "_System_ConnectorServingEpochReproducibility",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Serving Epoch Reproducibility",
    "description": "Immutable digest profile and ServiceConfiguration owner-protocol interpretation for one Connector ServingEpoch. Absence of this row together with zero binding-owner and credential-generation proof rows marks a legacy candidate; any side row without this header is corruption. Presence requires the epoch's existing L2 fields to retain the exact referenced owner generation identity, digest, and receipt under the named profiles. This extension grants no serving transition or execution authority.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "ServingEpochId", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id", "description": "Exact ServingEpoch whose L2 fields receive the profile-tagged owner interpretation." },
      { "name": "ConnectorDigestProfileId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Digest Profile Id", "description": "Closed Connector-owned digest profile for the complete reproducibility envelope." },
      { "name": "ServiceConfigurationGenerationProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Service Configuration Generation Protocol Version", "description": "Exact owner generation protocol under which the referenced ServiceConfiguration generation was canonicalized." },
      { "name": "ServiceConfigurationReceiptProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Service Configuration Receipt Protocol Version", "description": "Exact owner receipt protocol under which the referenced ServiceConfiguration OwnerReceipt was produced." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository never updates immutable reproducibility rows." }
    ],
    "indices": [
      { "name": "idx_connector_epoch_repro_profile", "columns": ["ConnectorDigestProfileId", "ServingEpochId"] }
    ],
    "foreignKeys": [
      { "column": "ServingEpochId", "references": "_System_ConnectorServingEpoch(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorServingEpochBindingOwner",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Serving Epoch Binding Owner",
    "description": "Immutable definition-owner proof for one existing ServingEpoch binding. It binds the exact PackGeneration definition set authorized by Catalog membership and identity, binding-definition owner envelope and receipt protocols, canonical definition digest, and byte-stable owner receipt without copying mutable Catalog authority.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "ServingEpochBindingId", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Serving Epoch Binding Id", "description": "Exact existing ServingEpoch binding receiving this owner proof." },
      { "name": "PackGenerationId", "type": "VARCHAR(255)", "nullable": false, "label": "Pack Generation Id", "description": "Exact immutable PackGeneration definition-set identity. The database-default collation matches the established DefinitionSet parent; repositories additionally select and compare it byte-exactly." },
      { "name": "DefinitionEnvelopeVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Envelope Version", "description": "Exact binding-definition owner envelope protocol for the canonical definition retained by the exact PackGeneration definition set." },
      { "name": "DefinitionReceiptVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Receipt Version", "description": "Exact binding-definition owner receipt protocol for the definition receipt retained by the exact PackGeneration definition set." },
      { "name": "CanonicalDefinitionDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Canonical Definition Digest", "description": "Binding-definition owner-protocol digest of the exact canonical definition bytes retained by the exact PackGeneration definition set." },
      { "name": "DefinitionOwnerReceipt", "type": "MEDIUMBLOB", "nullable": false, "label": "Definition Owner Receipt", "description": "Exact deterministic byte-stable binding-definition owner receipt retained by the exact PackGeneration definition set." },
      { "name": "DefinitionOwnerReceiptDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Owner Receipt Digest", "description": "Digest of the exact retained DefinitionOwnerReceipt bytes." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository never updates immutable binding-owner rows." }
    ],
    "indices": [
      { "name": "idx_connector_epoch_binding_owner_pack", "columns": ["PackGenerationId", "ServingEpochBindingId"] }
    ],
    "foreignKeys": [
      { "column": "ServingEpochBindingId", "references": "_System_ConnectorServingEpochBinding(Id)", "onDelete": "RESTRICT" },
      { "column": "PackGenerationId", "references": "_System_PackGenerationConnectorBindingDefinitionSet(PackGenerationId)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorServingEpochCredentialGeneration",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Serving Epoch Credential Generation",
    "description": "Immutable exhaustive credential-generation owner proof for one profiled ServingEpoch. Canonical ordinal order and uniqueness retain every exact selected credential generation, transport-configuration digest, owner receipt protocol, and owner receipt without secret bytes or a mutable current-generation selector.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "ServingEpochId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id", "description": "Exact profiled ServingEpoch whose credential-generation proof set contains this row." },
      { "name": "CredentialOrdinal", "type": "INT", "nullable": false, "label": "Credential Ordinal", "description": "Zero-based position in the epoch's canonical exhaustive credential-generation order." },
      { "name": "CredentialGenerationId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Credential Generation Id", "description": "Exact immutable Connector credential generation selected by the profiled epoch." },
      { "name": "ReceiptProtocolVersion", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Protocol Version", "description": "Exact credential-generation owner-receipt protocol used for this proof." },
      { "name": "TransportConfigurationDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Transport Configuration Digest", "description": "Exact owner-protocol digest of the referenced generation's retained non-secret transport configuration bytes." },
      { "name": "OwnerReceipt", "type": "MEDIUMBLOB", "nullable": false, "label": "Owner Receipt", "description": "Exact deterministic byte-stable credential-generation owner receipt. It contains no secret bytes." },
      { "name": "OwnerReceiptDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Owner Receipt Digest", "description": "Digest of the exact retained OwnerReceipt bytes." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository never updates immutable credential-generation proof rows." }
    ],
    "indices": [
      { "columns": ["ServingEpochId", "CredentialOrdinal"], "primary": true },
      { "name": "ux_connector_epoch_credential_generation", "columns": ["ServingEpochId", "CredentialGenerationId"], "unique": true },
      { "name": "idx_connector_epoch_credential_generation_ref", "columns": ["CredentialGenerationId", "ServingEpochId"] }
    ],
    "foreignKeys": [
      { "column": "ServingEpochId", "references": "_System_ConnectorServingEpoch(Id)", "onDelete": "RESTRICT" },
      { "column": "CredentialGenerationId", "references": "_System_ConnectorCredentialGeneration(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorAccountServingGate",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Account Serving Gate",
    "description": "Connector V2 per-account protocol and fencing authority. One stable account row binds a closed serving mode, a repository-owned monotonic fence token, and an optional exact active ServingEpoch ID/digest pair. The initial v1_serving row grants no V2 admission, materialization, claim, Runtime submission, outbound authoring, or provider I/O.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Account Serving Gate Id", "description": "Stable Connector-owned gate-row identity." },
      { "name": "ServingScopeDigest", "type": "CHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Scope Digest", "description": "Exact Connector serving scope that owns this account gate." },
      { "name": "ConnectorAccountId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Account Id", "description": "Stable versioned-L2 connector-account identity; the serving-scope unique index permits exactly one gate row for this account." },
      { "name": "Mode", "type": "VARCHAR(32)", "nullable": false, "default": "'v1_serving'", "collationName": "utf8mb4_bin", "label": "Mode", "description": "One of v1_serving, halting_v1, v1_stopped, v1_drained, v2_validating, v2_serving, halting_v2, v2_halted. The Connector repository rejects every other transition." },
      { "name": "FenceToken", "type": "BIGINT", "nullable": false, "default": "0", "label": "Fence Token", "description": "Monotonic compare-and-swap token incremented exactly once by every committed gate transition and never reset or reused." },
      { "name": "ServingEpochId", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id", "description": "Exact active V2 epoch identity. ServingEpochId and ServingEpochDigest are both NULL outside an active V2 generation and both present when the gate is bound to one." },
      { "name": "ServingEpochDigest", "type": "CHAR(71)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Serving Epoch Digest", "description": "Byte-exact digest paired with ServingEpochId; a repository read rejects a partial or mismatched pair." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connector_account_gate_scope_account", "columns": ["ServingScopeDigest", "ConnectorAccountId"], "unique": true },
      { "name": "idx_connector_account_gate_mode", "columns": ["ServingScopeDigest", "Mode", "ConnectorAccountId"] },
      { "name": "idx_connector_account_gate_epoch", "columns": ["ServingEpochId", "Mode", "ConnectorAccountId"] }
    ],
    "foreignKeys": [
      { "column": "ServingEpochId", "references": "_System_ConnectorServingEpoch(Id)" }
    ]
  },
  {
    "tableName": "_System_ConnectorV2Receipt",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector V2 Receipt",
    "description": "Immutable evidence for one accepted Connector V2 transport or replay admission. The row freezes the exact account gate fence, active ServingEpoch, admission authority, encrypted payload carrier, plaintext payload digest, and deterministic component count. It has no claim, retry, execution, or provider-I/O state and grants no production claimant by itself.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Receipt Id", "description": "Stable Connector-owned immutable V2 Receipt identity." },
      { "name": "ReceiptProtocolVersion", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Protocol Version", "description": "Closed canonical receipt protocol used to validate and byte-compare the immutable row." },
      { "name": "ServingScopeDigest", "type": "CHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Scope Digest", "description": "Exact serving scope copied from and byte-compared with the locked account gate and ServingEpoch." },
      { "name": "ConnectorAccountId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Account Id", "description": "Exact stable connector-account identity copied from and byte-compared with the locked account gate." },
      { "name": "AccountServingGateId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Account Serving Gate Id", "description": "Exact stable AccountServingGate row whose fence admitted this Receipt." },
      { "name": "AccountServingFenceToken", "type": "BIGINT", "nullable": false, "label": "Account Serving Fence Token", "description": "Exact nonnegative AccountServingGate fence observed by the admitting transaction." },
      { "name": "ServingEpochId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id", "description": "Exact active ServingEpoch that admitted this Receipt; no current or latest fallback is allowed." },
      { "name": "ServingEpochDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Digest", "description": "Exact digest paired with ServingEpochId and byte-compared with the locked active epoch." },
      { "name": "AdmissionKind", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Admission Kind", "description": "Closed admission kind interpreted by the Connector repository: transport or replay." },
      { "name": "AdmissionAuthorityId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Admission Authority Id", "description": "Exact ReceiptAdmissionKey or ReplayRequest identity that authorized this Receipt. The owning repository validates the kind-specific reverse reference." },
      { "name": "PayloadCiphertextProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Payload Ciphertext Protocol Version", "description": "Closed encryption-envelope protocol for the opaque accepted payload. Plaintext and credential material are never exposed through generic CRUD." },
      { "name": "PayloadCiphertext", "type": "MEDIUMBLOB", "nullable": false, "label": "Payload Ciphertext", "description": "Encrypted immutable accepted payload bytes; Connector enforces the semantic plaintext and ciphertext bounds before persistence." },
      { "name": "PayloadDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Payload Digest", "description": "Owner-protocol plaintext payload digest used for exact duplicate comparison without disclosing payload bytes." },
      { "name": "PayloadSizeBytes", "type": "BIGINT", "nullable": false, "label": "Payload Size Bytes", "description": "Exact plaintext payload byte count validated against PayloadDigest and semantic admission bounds." },
      { "name": "ReceiptComponentCount", "type": "BIGINT", "nullable": false, "label": "Receipt Component Count", "description": "Exact immutable number of deterministic ReceiptComponent rows expected for this Receipt." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connector_v2_receipt_admission", "columns": ["ServingScopeDigest", "ConnectorAccountId", "AdmissionKind", "AdmissionAuthorityId"], "unique": true },
      { "name": "idx_connector_v2_receipt_account", "columns": ["ConnectorAccountId", "Id"] },
      { "name": "idx_connector_v2_receipt_epoch", "columns": ["ServingEpochId", "Id"] },
      { "name": "idx_connector_v2_receipt_gate", "columns": ["AccountServingGateId", "Id"] }
    ],
    "foreignKeys": [
      { "column": "AccountServingGateId", "references": "_System_ConnectorAccountServingGate(Id)", "onDelete": "RESTRICT" },
      { "column": "ServingEpochId", "references": "_System_ConnectorServingEpoch(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorV2ReceiptComponent",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector V2 Receipt Component",
    "description": "Immutable deterministic member of one accepted Connector V2 Receipt. The parent Receipt commits the exact component count; the Connector repository requires a complete contiguous ordinal set and byte-compares every retained component. A component carries only encrypted opaque payload evidence and owns no event, claim, retry, execution, or provider-I/O state.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Receipt Component Id", "description": "Stable Connector-owned immutable ReceiptComponent identity." },
      { "name": "ComponentProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Component Protocol Version", "description": "Closed canonical protocol used to validate and byte-compare this deterministic component." },
      { "name": "ReceiptId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Receipt Id", "description": "Exact immutable V2 Receipt whose complete ordered component set contains this row." },
      { "name": "ComponentOrdinal", "type": "INT", "nullable": false, "label": "Component Ordinal", "description": "Zero-based contiguous position in the parent Receipt's deterministic component set." },
      { "name": "PayloadCiphertextProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Payload Ciphertext Protocol Version", "description": "Closed encryption-envelope protocol for this opaque component payload." },
      { "name": "PayloadCiphertext", "type": "MEDIUMBLOB", "nullable": false, "label": "Payload Ciphertext", "description": "Encrypted immutable component payload bytes; Connector enforces semantic plaintext and ciphertext bounds before persistence." },
      { "name": "PayloadDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Payload Digest", "description": "Owner-protocol plaintext component-payload digest used for exact reconciliation without disclosing payload bytes." },
      { "name": "PayloadSizeBytes", "type": "BIGINT", "nullable": false, "label": "Payload Size Bytes", "description": "Exact plaintext component-payload byte count validated against PayloadDigest and semantic materialization bounds." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository never updates immutable ReceiptComponent rows." }
    ],
    "indices": [
      { "name": "ux_connector_v2_receipt_component_ordinal", "columns": ["ReceiptId", "ComponentOrdinal"], "unique": true }
    ],
    "foreignKeys": [
      { "column": "ReceiptId", "references": "_System_ConnectorV2Receipt(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorV2ReceiptAdmissionKey",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector V2 Receipt Admission Key",
    "description": "Sole Connector transport-idempotency authority across retained V1 acceptance and V2 admission. One exact connector account, ingress channel, and transport key maps either to one immutable V2 Receipt or to one immutable non-executable V1 acceptance tombstone across serving-scope and ServingEpoch changes. ServingScopeDigest remains immutable admission evidence but is deliberately excluded from transport identity. The repository rejects partial or mixed disposition tuples and never materializes V2 descendants from a tombstone.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Receipt Admission Key Id", "description": "Stable Connector-owned immutable admission-key row identity." },
      { "name": "AdmissionKeyProtocolVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Admission Key Protocol Version", "description": "Closed canonical protocol used to validate and byte-compare this transport identity." },
      { "name": "ServingScopeDigest", "type": "CHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Scope Digest", "description": "Exact serving scope observed by the original admission. It is immutable evidence and is not part of the cross-scope transport-idempotency identity." },
      { "name": "ConnectorAccountId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Account Id", "description": "Exact stable connector-account identity in the transport-idempotency tuple." },
      { "name": "AccountServingGateId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Account Serving Gate Id", "description": "Exact stable AccountServingGate row for ServingScopeDigest and ConnectorAccountId. The repository byte-compares all three coordinates." },
      { "name": "IngressChannel", "type": "VARCHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Ingress Channel", "description": "Closed, provider-neutral ingress-channel identity in the transport-idempotency tuple." },
      { "name": "TransportIdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Transport Idempotency Key", "description": "Exact verified transport delivery identity; never reused as a replay identity." },
      { "name": "AuthorizedPayloadDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Authorized Payload Digest", "description": "Exact plaintext payload digest authorized by this transport identity. A duplicate with different bytes fails closed." },
      { "name": "Disposition", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Disposition", "description": "Closed immutable disposition interpreted by the Connector repository: v2_receipt or v1_tombstone." },
      { "name": "ReceiptId", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Receipt Id", "description": "Exact V2 Receipt for disposition v2_receipt; NULL for a retained V1 tombstone." },
      { "name": "PredecessorRefProtocolVersion", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Predecessor Ref Protocol Version", "description": "Closed disclosure-safe V1 predecessor-reference protocol; present only for disposition v1_tombstone." },
      { "name": "PredecessorRef", "type": "MEDIUMBLOB", "nullable": true, "label": "Predecessor Ref", "description": "Immutable disclosure-safe V1 acceptance reference. It is lineage evidence only and grants no V1 or V2 execution authority." },
      { "name": "PredecessorRefDigest", "type": "CHAR(71)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Predecessor Ref Digest", "description": "Exact digest of PredecessorRef under PredecessorRefProtocolVersion; present only as part of a complete tombstone tuple." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connector_v2_receipt_key_transport", "columns": ["ConnectorAccountId", "IngressChannel", "TransportIdempotencyKey"], "unique": true },
      { "name": "ux_connector_v2_receipt_key_receipt", "columns": ["ReceiptId"], "unique": true },
      { "name": "idx_connector_v2_receipt_key_gate", "columns": ["AccountServingGateId", "Disposition", "Id"] }
    ],
    "foreignKeys": [
      { "column": "AccountServingGateId", "references": "_System_ConnectorAccountServingGate(Id)", "onDelete": "RESTRICT" },
      { "column": "ReceiptId", "references": "_System_ConnectorV2Receipt(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorV2Execution",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector V2 Execution",
    "description": "Connector-owned durable identity and fenced claim state for one immutable dependency-free V2 execution generation. The row freezes the exact ServingEpoch, binding-owner PackGeneration, Runtime ExecutionRef coordinates, canonical Runtime inputs, and command identity needed for crash-safe identical resubmission. It records only Runtime result correlation digests and never copies the Runtime-owned application outcome, result payload, or failure fact. This schema grants no production V2 claimant, Runtime submission, or provider-I/O path by itself.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Execution Id", "description": "Stable Connector-owned immutable execution-generation identity reused by every retry." },
      { "name": "ExecutionProtocolVersion", "type": "VARCHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Execution Protocol Version", "description": "Closed Connector-owned protocol used to validate and byte-compare the complete immutable execution identity." },
      { "name": "ServingScopeDigest", "type": "CHAR(64)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Scope Digest", "description": "Exact serving scope copied from and byte-compared with the locked account gate and ServingEpoch." },
      { "name": "ConnectorAccountId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Connector Account Id", "description": "Exact stable connector-account identity copied from and byte-compared with the locked account gate." },
      { "name": "AccountServingGateId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Account Serving Gate Id", "description": "Exact AccountServingGate whose active epoch and fence admitted this execution generation." },
      { "name": "AccountServingFenceToken", "type": "BIGINT", "nullable": false, "label": "Account Serving Fence Token", "description": "Exact nonnegative AccountServingGate fence observed when the execution generation was minted." },
      { "name": "ServingEpochId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Id", "description": "Exact active ServingEpoch under which this execution generation was minted." },
      { "name": "ServingEpochDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Digest", "description": "Exact immutable digest paired with ServingEpochId and carried in the Runtime ExecutionRef." },
      { "name": "ServingEpochBindingId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Serving Epoch Binding Id", "description": "Exact target-local binding with an immutable definition-owner proof. No current or latest binding fallback is allowed." },
      { "name": "PackGenerationId", "type": "VARCHAR(255)", "nullable": false, "label": "Pack Generation Id", "description": "Exact immutable PackGeneration definition-set identity carried in the Runtime ExecutionRef. The database-default collation matches the established parent; repositories select and compare it byte-exactly and verify it against ServingEpochBindingOwner." },
      { "name": "DefinitionRef", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Ref", "description": "Exact neutral Runtime definition reference frozen by the admitted serving-epoch binding." },
      { "name": "DefinitionVersion", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Definition Version", "description": "Exact neutral Runtime definition version frozen by the admitted serving-epoch binding." },
      { "name": "CanonicalInputs", "type": "MEDIUMBLOB", "nullable": false, "label": "Canonical Inputs", "description": "Exact byte-stable Runtime command inputs retained only for identical crash-recovery resubmission. These bytes are not a mutable Projection authority and contain no Runtime result." },
      { "name": "ExternalEffectsMode", "type": "VARCHAR(32)", "nullable": false, "collationName": "utf8mb4_bin", "label": "External Effects Mode", "description": "Exact closed Runtime command mode. The first conformance-only repository admits SUPPRESS_EXTERNAL_EFFECTS and no production provider path." },
      { "name": "InputDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Input Digest", "description": "Runtime-contract digest of CanonicalInputs carried in the immutable ExecutionRef." },
      { "name": "ExecutionRefDigest", "type": "CHAR(71)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Execution Ref Digest", "description": "Runtime-contract digest of the complete immutable ExecutionRef. It is the Connector-to-Runtime result-correlation identity." },
      { "name": "RuntimeCommandId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Runtime Command Id", "description": "Stable Runtime command identity reused by every submission and result query for this execution generation." },
      { "name": "State", "type": "VARCHAR(32)", "nullable": false, "default": "'ready'", "collationName": "utf8mb4_bin", "label": "State", "description": "Closed Connector-owned lifecycle for the dependency-free conformance slice: ready, completed, or quarantined. A worker lease is not a semantic state." },
      { "name": "ClaimFenceToken", "type": "BIGINT", "nullable": false, "default": "0", "label": "Claim Fence Token", "description": "Monotonic compare-and-swap token incremented for each committed claim and never reset or reused." },
      { "name": "ClaimHolderId", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Claim Holder Id", "description": "Current temporary worker holder. NULL when no unexpired claim exists." },
      { "name": "ClaimLeaseUntil", "type": "DATETIME(6)", "nullable": true, "label": "Claim Lease Until", "description": "Database-time lease boundary paired with ClaimHolderId. An expired lease grants no semantic execution authority." },
      { "name": "ResultDigest", "type": "CHAR(71)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Result Digest", "description": "Exact digest returned by Runtime for the immutable ApplicationResult. Connector stores no result payload or outcome." },
      { "name": "RuntimeCommitReceipt", "type": "CHAR(71)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Runtime Commit Receipt", "description": "Exact Runtime-owned receipt binding CommandId, ExecutionRefDigest, outcome, result digest, and failure code. Connector treats it as opaque correlation evidence and does not reconstruct the result fact." },
      { "name": "QuarantineReasonCode", "type": "VARCHAR(64)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Quarantine Reason Code", "description": "Closed Connector-owned typed integrity or admission failure code; never a copied Runtime failure or free-form last error." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connector_v2_execution_ref", "columns": ["ExecutionRefDigest"], "unique": true },
      { "name": "ux_connector_v2_execution_runtime_command", "columns": ["RuntimeCommandId"], "unique": true },
      { "name": "idx_connector_v2_execution_claim", "columns": ["ConnectorAccountId", "State", "ClaimLeaseUntil", "Id"] },
      { "name": "idx_connector_v2_execution_epoch", "columns": ["ServingEpochId", "State", "Id"] },
      { "name": "idx_connector_v2_execution_gate", "columns": ["AccountServingGateId", "State", "Id"] }
    ],
    "foreignKeys": [
      { "column": "AccountServingGateId", "references": "_System_ConnectorAccountServingGate(Id)", "onDelete": "RESTRICT" },
      { "column": "ServingEpochId", "references": "_System_ConnectorServingEpoch(Id)", "onDelete": "RESTRICT" },
      { "column": "ServingEpochBindingId", "references": "_System_ConnectorServingEpochBindingOwner(ServingEpochBindingId)", "onDelete": "RESTRICT" },
      { "column": "PackGenerationId", "references": "_System_PackGenerationConnectorBindingDefinitionSet(PackGenerationId)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorV2ExecutionAttempt",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector V2 Execution Attempt",
    "description": "Append-only operational evidence for one fenced claim of a Connector V2 Execution. It records only the claim ordinal, fence, holder, and lease observed at acquisition; it owns no semantic execution state, Runtime outcome, retry counter, dependency, or provider-I/O fact.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "collationName": "utf8mb4_bin", "label": "Execution Attempt Id", "description": "Stable immutable identity for one committed claim attempt." },
      { "name": "ExecutionId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Execution Id", "description": "Exact immutable execution generation claimed by this attempt." },
      { "name": "AttemptOrdinal", "type": "BIGINT", "nullable": false, "label": "Attempt Ordinal", "description": "One-based monotonic attempt ordinal allocated by the Execution repository." },
      { "name": "ClaimFenceToken", "type": "BIGINT", "nullable": false, "label": "Claim Fence Token", "description": "Exact Execution claim fence acquired by this attempt; never reset or reused." },
      { "name": "ClaimHolderId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Claim Holder Id", "description": "Exact worker holder that acquired this claim." },
      { "name": "LeaseUntil", "type": "DATETIME(6)", "nullable": false, "label": "Lease Until", "description": "Database-time lease boundary committed for this claim attempt." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date", "description": "Generic managed-table temporal field. The Connector repository never updates immutable ExecutionAttempt rows." }
    ],
    "indices": [
      { "name": "ux_connector_v2_execution_attempt_ordinal", "columns": ["ExecutionId", "AttemptOrdinal"], "unique": true },
      { "name": "ux_connector_v2_execution_attempt_fence", "columns": ["ExecutionId", "ClaimFenceToken"], "unique": true },
      { "name": "idx_connector_v2_execution_attempt_holder", "columns": ["ClaimHolderId", "LeaseUntil", "Id"] }
    ],
    "foreignKeys": [
      { "column": "ExecutionId", "references": "_System_ConnectorV2Execution(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectorIngressControl",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Ingress Control",
    "description": "Runtime-owned connector ingress admission gate. Deploy and operator tooling can quiesce or pause new connector ingress before durable enqueue while existing _System_ConnectorEvent rows continue draining. The namespace fence is the durable row scoped by (Namespace, PackInstallId='', Channel='*'); the connector runtime locks that row in the same pessimistic transaction as Event and WorkItem materialization. Expired rows are ignored by the runtime so a failed deploy cannot pause ingress indefinitely.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Namespace",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Namespace",
        "description": "Connector namespace / connector-pack Name, lower-trimmed by the writer."
      },
      {
        "name": "PackInstallId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Pack Install Id",
        "description": "Optional connector pack incarnation scope. Blank means any active incarnation for the namespace."
      },
      {
        "name": "Channel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Channel",
        "description": "Admission channel such as webhook, webhook:<secretName>, or *."
      },
      {
        "name": "Mode",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'active'",
        "label": "Mode",
        "description": "One of active, quiescing, paused. Non-active modes return retryable ingress responses before enqueue."
      },
      {
        "name": "FenceEpoch",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Fence Epoch",
        "description": "Namespace-fence generation. The namespace fence writer increments this value exactly once for every active-to-quiescing transition and never resets or reuses it; a receipt for a quiesced boundary binds this value together with Namespace, PackInstallId='', and Channel='*'. Existing pre-epoch rows start at 0 and are not receipt-safe."
      },
      {
        "name": "RetryAfterSeconds",
        "type": "INT",
        "nullable": false,
        "default": "120",
        "label": "Retry After Seconds"
      },
      {
        "name": "Reason",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Reason"
      },
      {
        "name": "RequestedBy",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Requested By"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Expires At",
        "description": "Runtime ignores expired non-active rows; operator tooling should still resume/delete them for audit clarity."
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      { "name": "uniq_connector_ingress_control_scope", "columns": ["Namespace", "PackInstallId", "Channel"], "unique": true },
      { "name": "idx_connector_ingress_control_lookup", "columns": ["Namespace", "Channel", "IsDeleted", "ExpiresAt"] }
    ]
  },
  {
    "tableName": "_System_ConnectorEvent",
    "tableType": "system_core",
    "category": "integration",
    "description": "Immutable inbound connector delivery and audit fact. WorkItem is the sole current execution authority; ConnectorEvent rows are never scanned or replayed by the WorkItem executor.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Namespace",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Namespace",
        "description": "Connector-pack Name from _System_InstalledPack"
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack Id",
        "description": "Stable installed-pack incarnation identity (_System_InstalledPack.Id) — prevents queue contamination across same-name pack rebirths"
      },
      {
        "name": "EventKind",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Event Kind",
        "description": "Opaque event type string, e.g. webhook.event"
      },
      {
        "name": "IdempotencyKey",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Idempotency Key",
        "description": "Dedup key within (InstalledPackId, IdempotencyKey)"
      },
      {
        "name": "Status",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'pending'",
        "label": "Status",
        "description": "Legacy Event-executor state: pending, processing, processed, skipped, failed, or dead. When ExecutionOwner is work_item, skipped is the fixed old-binary compatibility fence; the WorkItem owns the actual execution outcome."
      },
      {
        "name": "ExecutionOwner",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'event'",
        "label": "Execution Owner",
        "description": "Durable executor authority for this Event generation. event retains the bounded legacy Event claimant; work_item freezes Status as skipped so older binaries lose claim and finalizer CAS while _System_ConnectorWorkItem owns mutable execution state."
      },
      {
        "name": "QueueClass",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'default'",
        "label": "Queue Class",
        "description": "Generic route-declared scheduler class snapshotted at enqueue time. This substrate slice supports the default class only; additional scheduler classes require claim, supervisor, and pressure readers before admission."
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": true,
        "label": "Payload",
        "description": "Opaque event body"
      },
      {
        "name": "RetryCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Retry Count"
      },
      {
        "name": "LastError",
        "type": "TEXT",
        "nullable": true,
        "label": "Last Error"
      },
      {
        "name": "LastErrorAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Last Error At"
      },
      {
        "name": "NextAttemptAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Next Attempt At",
        "description": "Earliest timestamp at which a failed connector event may be claimed again. NULL means immediately claimable."
      },
      {
        "name": "ClaimedBy",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Claimed By",
        "description": "Worker id that currently holds the event"
      },
      {
        "name": "ClaimedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Claimed At"
      },
      {
        "name": "ClaimToken",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Claim Token"
      },
      {
        "name": "ProcessedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Processed At"
      },
      {
        "name": "ReplayedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Replayed At"
      },
      {
        "name": "ReplayOfId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Replay Of Id",
        "description": "Links a replay row to its predecessor dead event"
      },
      {
        "name": "RouteVersion",
        "type": "INT",
        "nullable": true,
        "label": "Route Version",
        "description": "Three-state snapshot of the _System_ConnectorInboundRoute.Version resolved at enqueue time:\n- NULL: legacy row written before this column existed (pre-option-3). The worker fails such rows terminally (no immutable snapshot to resolve); the pre-R22 migration runbook handles draining them.\n- 0: reserved sentinel. The dispatcher no longer enqueues 0 — an undeclared route now returns a retriable 503 at ingest before any row is created — so 0 only appears on pre-R22 legacy or replayed-legacy rows, which the worker also fails terminally. Version numbers start at 1.\n- >= 1: specific immutable route version. Worker calls RouteResolver.ResolveFlowByVersion(InstalledPackId, EventKind, Version) to obtain the exact FlowDeveloperName that was in effect when the event arrived, regardless of subsequent reapply."
      },
      {
        "name": "CompanionPackInstallId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Companion Pack Install Id",
        "description": "Companion app-pack PackInstallId owning the routed flow, frozen at enqueue. NULL = same-pack/legacy event (worker uses provider-side resolution unchanged). Non-NULL = cross-pack: worker re-verifies this incarnation is still installed and executes the exact CompanionFlowVersionId, else failTerminal."
      },
      {
        "name": "CompanionFlowVersionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Companion Flow Version Id",
        "description": "The exact Flow.Id (= FlowDefinition.ActiveVersionId at enqueue) the worker must execute via getFlowVersionById, never getActiveFlowVersion-by-name. Written together with CompanionPackInstallId; both NULL or both set."
      },
      {
        "name": "SourceObjectKind",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Source Object Kind",
        "description": "Raw connector queue-envelope objectKind materialized for source-lane observability and warm-upgrade compatibility. SourceLaneKey is the fixed-width indexed claim key."
      },
      {
        "name": "SourceObjectID",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Source Object Id",
        "description": "Raw connector queue-envelope sourceID materialized for source-lane observability and warm-upgrade compatibility. SourceLaneKey is the fixed-width indexed claim key."
      },
      {
        "name": "SourceLaneKey",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Source Lane Key",
        "description": "SHA-256 key over length-prefixed objectKind + sourceID. ClaimNext uses this fixed-width indexed helper for normal same-source serialization while SourceObjectKind/SourceObjectID preserve full raw envelope values."
      },
      {
        "name": "DeliveryId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Delivery Id",
        "description": "App-assigned per-delivery grouping id minted once by the dispatcher per webhook delivery; all events in one delivery share the same value. NULL = legacy singleton (pre-#2154 rows): the NOT EXISTS guard never fires on NULL so legacy rows drain independently. Used by ClaimNext to serialize execution within one delivery while allowing different deliveries to drain in parallel."
      },
      {
        "name": "DeliverySequence",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Delivery Sequence",
        "description": "Per-delivery ordinal (0,1,2,...) assigned by the connector webhook dispatcher's enqueue loop. With ORDER BY CreatedDate ASC, DeliverySequence ASC it guarantees intra-batch FIFO: events from one webhook delivery are claimed in array order. Legacy rows (pre-column) default to 0."
      },
      {
        "name": "EnqueueOrdinal",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Enqueue Ordinal",
        "description": "Pack-scoped monotonic enqueue order allocated inside the enqueue transaction while the active installed-pack row is locked. Used by same-source cross-delivery claim serialization. Legacy rows (pre-column) default to 0."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uniq_connector_event_idempotency",
        "columns": ["InstalledPackId", "IdempotencyKey"],
        "unique": true
      },
      {
        "name": "idx_connector_event_delivery",
        "columns": ["InstalledPackId", "DeliveryId", "DeliverySequence"]
      },
      {
        "name": "idx_connector_event_enqueue",
        "columns": ["InstalledPackId", "EnqueueOrdinal"]
      },
      {
        "name": "idx_connector_event_source_lane",
        "columns": ["InstalledPackId", "SourceLaneKey", "EnqueueOrdinal"]
      },
      {
        "name": "idx_connector_event_claim",
        "columns": ["InstalledPackId", "Status", "CreatedDate", "DeliverySequence"]
      },
      {
        "name": "idx_connector_event_queue_claim",
        "columns": ["InstalledPackId", "QueueClass", "Status", "CreatedDate", "DeliverySequence"]
      },
      {
        "name": "idx_connector_event_processing_pressure",
        "columns": ["InstalledPackId", "Status", "QueueClass", "LastModifiedDate"]
      },
      {
        "name": "idx_connector_event_retry",
        "columns": ["Status", "NextAttemptAt", "RetryCount"]
      },
      {
        "name": "idx_connector_event_namespace_dlq",
        "columns": ["Namespace", "Status", "CreatedDate", "Id"]
      }
    ]
  },
  {
    "tableName": "_System_ConnectorProjectionProtocol",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Projection Protocol",
    "description": "Immutable per-incarnation execution-protocol handoff recorded by the controlplane after fencing ingress and accounting for old executable projection inputs. The cutoff separates legacy receipt deduplication from missing new-protocol work; it does not assert historical execution success.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Installed Pack Id",
        "description": "Exact pack incarnation owning this immutable handoff."
      },
      {
        "name": "ProtocolVersion",
        "type": "INT",
        "nullable": false,
        "label": "Protocol Version",
        "description": "Execution membership protocol version; version 1 uses immutable positive ordinal ranges."
      },
      {
        "name": "LegacyMaxOrdinal",
        "type": "BIGINT",
        "nullable": false,
        "label": "Legacy Maximum Ordinal",
        "description": "Pack admission high water observed at the fenced cutover. Zero for a verified empty incarnation. Never recomputed or advanced by runtime ingress."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_ConnectorWorkItem",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Work Item",
    "description": "Executable L0 connector work queue state split from the immutable connector event ledger. Owns post-materialization claim, retry, and identity-convergence dependency state, fencing, sanitized failure and terminal operator facts, replay lineage, scheduler lanes, source-projection generation identity, and worker leases for WorkItem-claim generations.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "WorkId",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Work Id",
        "description": "Stable executable work identity. Scheduler and executors claim by this primary key."
      },
      {
        "name": "EventId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Id",
        "description": "Immutable _System_ConnectorEvent fact row this executable work item was materialized from."
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack Id",
        "description": "Connector pack incarnation identity. Prevents work queue contamination across same-name pack rebirths."
      },
      {
        "name": "WorkType",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Work Type",
        "description": "Generic executable work kind within an event. Unique with EventId so materialization retry cannot create duplicate executable work."
      },
      {
        "name": "QueueClass",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'default'",
        "label": "Queue Class",
        "description": "Generic scheduler class snapshotted from route/materialization metadata."
      },
      {
        "name": "State",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'pending'",
        "label": "State",
        "description": "One of pending, processing, retry, processed, skipped, dead. A dependency wait remains lease-free processing rather than introducing another scheduler state."
      },
      {
        "name": "RunAfter",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Run After",
        "description": "Earliest timestamp at which pending or retry work may be claimed."
      },
      {
        "name": "Attempt",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Attempt",
        "description": "Number of claim attempts for this work item."
      },
      {
        "name": "OwnershipEpoch",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Ownership Epoch",
        "description": "Monotonic fencing epoch advanced by each successful claim. Finalization and external-effect transitions bind to the live epoch in addition to the opaque lease token."
      },
      {
        "name": "FailureCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Failure Count",
        "description": "Number of genuine failed executions for retry/dead policy. Kept separate from Attempt because lease claims and reclaims do not necessarily consume failure budget."
      },
      {
        "name": "FailureClass",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Failure Class",
        "description": "Low-cardinality retry, dead-letter, or operator-repair classification owned by the WorkItem."
      },
      {
        "name": "FailureSummary",
        "type": "TEXT",
        "nullable": true,
        "label": "Failure Summary",
        "description": "Sanitized operator-safe failure diagnostic. Raw payloads, credentials, provider response bodies, and other secret-bearing values are forbidden."
      },
      {
        "name": "LastFailureAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Last Failure At",
        "description": "Timestamp of the latest genuine failed execution recorded on this WorkItem."
      },
      {
        "name": "TerminalAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Terminal At",
        "description": "Timestamp at which this WorkItem entered its historical terminal state."
      },
      {
        "name": "ReplayedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Replayed At",
        "description": "Atomic operator replay reservation timestamp on a terminal WorkItem. Replay creates a new WorkItem and never reopens this row."
      },
      {
        "name": "ReplayOfWorkId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Replay Of Work Id",
        "description": "Terminal predecessor WorkId when this WorkItem was created by operator replay."
      },
      {
        "name": "LaneOrdinal",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Lane Ordinal",
        "description": "Monotonic ordering ordinal within the source lane used by the WorkItem claim hot path."
      },
      {
        "name": "InputStartOrdinal",
        "type": "BIGINT",
        "nullable": true,
        "label": "Projection Input Start Ordinal",
        "description": "Inclusive immutable input lower bound for a source-projection WorkItem. LaneOrdinal is its upper bound and selected Event ordinal; claim freezes both. Null belongs to ordinary work or retained old-protocol history. Old projection work must finish before cutover; historical rows are never backfilled."
      },
      {
        "name": "LeaseOwner",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Lease Owner",
        "description": "Executor owner currently holding the work item."
      },
      {
        "name": "LeaseToken",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Lease Token",
        "description": "Fencing token required for lease renewal and terminal completion."
      },
      {
        "name": "LeaseUntil",
        "type": "DATETIME",
        "nullable": true,
        "label": "Lease Until",
        "description": "Processing lease expiry used for stale-work reclaim."
      },
      {
        "name": "SourceLaneKey",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Source Lane Key",
        "description": "Fixed-width source-ordering lane key. Target mutation lane is additive and must not replace source identity."
      },
      {
        "name": "TargetMutationLaneKey",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Target Mutation Lane Key",
        "description": "Fixed-width shared-target mutation lane key for resources such as same Campaign writes."
      },
      {
        "name": "Generation",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Generation",
        "description": "Pack/scheduler generation used to enforce one active claim path per InstalledPackId and generation."
      },
      {
        "name": "ProjectionKey",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Projection Key",
        "description": "Stable source-projection identity retained across distinct executable WorkItem generations and their historical terminal rows."
      },
      {
        "name": "ProjectionActiveKey",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Projection Active Key",
        "description": "Equals ProjectionKey only for the current executable source-projection WorkItem and is NULL on historical terminal rows. Its nullable unique index enforces one active row without partial-index semantics."
      },
      {
        "name": "DependencyKind",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Dependency Kind",
        "description": "Neutral dependency discriminator for a non-claimable lease-free processing WorkItem. NULL outside an identity-convergence suspension."
      },
      {
        "name": "DependencyObjectAPIName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Object API Name",
        "description": "Exact generic record candidate object awaited by an identity-convergence WorkItem."
      },
      {
        "name": "DependencyRecordId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Record Id",
        "description": "Exact generic record candidate awaited by an identity-convergence WorkItem. This internal value must not be emitted to logs or operator diagnostics."
      },
      {
        "name": "DependencyKeyHash",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Dependency Key Hash",
        "description": "Fixed-width redacted hash of exact-record and immutable connector source scope used for fenced scheduling and safe diagnostics."
      },
      {
        "name": "DependencyConnectorOwnerKey",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Connector Owner Key",
        "description": "Pack-owned connector authority key for finalized-link convergence."
      },
      {
        "name": "DependencyConnectorNamespace",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Connector Namespace",
        "description": "Immutable inbound connector namespace bound by the worker before dependency persistence."
      },
      {
        "name": "DependencyConnectorSourceObject",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Connector Source Object",
        "description": "Immutable inbound connector source object bound by the worker before dependency persistence."
      },
      {
        "name": "DependencyDestinationSlotId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Destination Slot Id",
        "description": "Exact connector destination slot for finalized-link convergence."
      },
      {
        "name": "DependencyConnectorRemoteId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Dependency Connector Remote Id",
        "description": "Immutable inbound connector remote record id bound by the worker. This internal value must not be emitted to logs or operator diagnostics."
      },
      {
        "name": "DependencyBlockedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Dependency Blocked At",
        "description": "Timestamp when the WorkItem atomically surrendered its lease and entered identity-convergence suspension."
      },
      {
        "name": "DependencyProbeAfter",
        "type": "DATETIME",
        "nullable": true,
        "label": "Dependency Probe After",
        "description": "Earliest indexed authority-probe time. Unresolved waits persist a later exact recheck; producer signals are latency optimizations, not correctness prerequisites."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uniq_connector_work_item_event_type",
        "columns": ["EventId", "WorkType"],
        "unique": true
      },
      {
        "name": "uniq_connector_work_item_replay_of",
        "columns": ["ReplayOfWorkId"],
        "unique": true
      },
      {
        "name": "uniq_connector_work_item_projection_active",
        "columns": ["ProjectionActiveKey"],
        "unique": true
      },
      {
        "name": "idx_connector_work_item_queue_claim",
        "columns": ["InstalledPackId", "QueueClass", "State", "RunAfter", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_source_lane",
        "columns": ["InstalledPackId", "SourceLaneKey", "State", "RunAfter", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_source_lane_gen",
        "columns": ["InstalledPackId", "Generation", "SourceLaneKey", "State", "LaneOrdinal", "RunAfter", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_target_lane",
        "columns": ["InstalledPackId", "TargetMutationLaneKey", "State", "RunAfter", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_lease_due",
        "columns": ["InstalledPackId", "State", "LeaseUntil", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_projection_history",
        "columns": ["ProjectionKey", "TerminalAt", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_projection_order",
        "columns": ["ProjectionKey", "LaneOrdinal", "EventId", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_dlq",
        "columns": ["InstalledPackId", "State", "TerminalAt", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_dependency",
        "columns": ["DependencyRecordId", "State", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_dependency_remote",
        "columns": ["DependencyConnectorRemoteId", "State", "WorkId"]
      },
      {
        "name": "idx_connector_work_item_dependency_probe",
        "columns": ["State", "DependencyProbeAfter", "WorkId"]
      }
    ]
  },
  {
    "tableName": "_System_ConnectorRuntimeHandoffReceipt",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Runtime Handoff Receipt",
    "description": "Integration-owned immutable pre-send receipt for one Connector WorkItem handoff to the private Runtime command inbox. It freezes exact command bytes and Catalog binding lineage across an uncertain AcceptCommand response; it never owns Runtime execution or provider effects.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "WorkId",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Work Id",
        "description": "Exact Integration WorkItem identity that owns preparation and retry of this handoff."
      },
      {
        "name": "EventId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Id",
        "description": "Immutable Connector Event represented by the owning WorkItem."
      },
      {
        "name": "Namespace",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Namespace",
        "description": "Connector namespace frozen from the immutable event route."
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack Id",
        "description": "Exact connector pack incarnation that produced the immutable route."
      },
      {
        "name": "EventKind",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Kind",
        "description": "Neutral inbound event kind bound by the immutable route."
      },
      {
        "name": "RouteVersion",
        "type": "DECIMAL(20,0)",
        "nullable": false,
        "label": "Route Version",
        "description": "Exact immutable Integration route version used to select the Runtime command binding."
      },
      {
        "name": "OrgId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Org Id",
        "description": "Organization scope returned by the authorized IntegrationBindingView."
      },
      {
        "name": "AppInstallationId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "App Installation Id",
        "description": "AppInstallation scope returned by the authorized IntegrationBindingView."
      },
      {
        "name": "AuthorizedWorkloadId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Authorized Workload Id",
        "description": "Integration workload authorized by the immutable consumer view."
      },
      {
        "name": "ScopeDigest",
        "type": "CHAR(64)",
        "nullable": false,
        "label": "Consumer Scope Digest",
        "description": "Domain-separated digest of the exact Org, AppInstallation, authorized workload and Runtime command capability scope used for bounded identity indexes."
      },
      {
        "name": "MinimumCatalogRevision",
        "type": "DECIMAL(20,0)",
        "nullable": false,
        "label": "Minimum Catalog Revision",
        "description": "Catalog revision of the IntegrationBindingView used to prepare this request and supplied as the Runtime minimum-revision fence."
      },
      {
        "name": "BindingViewDigest",
        "type": "CHAR(71)",
        "nullable": false,
        "label": "Binding View Digest",
        "description": "Digest of the authorized immutable IntegrationBindingView used to select the command."
      },
      {
        "name": "CommandId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Command Id",
        "description": "Stable Runtime command identity derived from the WorkItem."
      },
      {
        "name": "IdempotencyKey",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Idempotency Key",
        "description": "Stable Runtime acceptance idempotency identity derived from the WorkItem."
      },
      {
        "name": "CommandKind",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Command Kind",
        "description": "Neutral Runtime command kind selected from the authorized binding."
      },
      {
        "name": "PartitionKey",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Partition Key",
        "description": "Optional Runtime command ordering partition derived from the Integration source lane."
      },
      {
        "name": "PayloadFormatVersion",
        "type": "BIGINT",
        "nullable": false,
        "label": "Payload Format Version",
        "description": "Neutral Runtime command payload format version selected from the authorized binding."
      },
      {
        "name": "Payload",
        "type": "MEDIUMBLOB",
        "nullable": false,
        "label": "Payload",
        "description": "Exact canonical Runtime command payload bytes. Integration retries these bytes without rebuilding them from provider state."
      },
      {
        "name": "PayloadDigest",
        "type": "CHAR(71)",
        "nullable": false,
        "label": "Payload Digest",
        "description": "Canonical digest of the exact Runtime command payload bytes."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_connector_runtime_handoff_event",
        "columns": ["EventId", "WorkId"]
      },
      {
        "name": "ux_connector_runtime_handoff_command",
        "columns": ["ScopeDigest", "CommandId"],
        "unique": true
      },
      {
        "name": "ux_connector_runtime_handoff_idempotency",
        "columns": ["ScopeDigest", "IdempotencyKey"],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_ConnectorWorkAttempt",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Work Attempt",
    "description": "Append-only, message-free authority for each claimed connector WorkItem attempt. The connector runtime inserts one outcome row in the same transaction as the corresponding complete, retry, or dead transition so presented Flow errors remain distinguishable from their underlying typed causes.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "WorkId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Work Id",
        "description": "Stable executable WorkItem identity for this attempt."
      },
      {
        "name": "Attempt",
        "type": "INT",
        "nullable": false,
        "label": "Attempt",
        "description": "Claim attempt number copied from the WorkItem fencing generation."
      },
      {
        "name": "EventId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Id",
        "description": "Immutable connector Event represented by the WorkItem."
      },
      {
        "name": "FlowExecutionId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Flow Execution Id",
        "description": "Exact root FlowInterview identity returned by the typed Flow execution boundary."
      },
      {
        "name": "OutcomeState",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Outcome State",
        "description": "Transition outcome for this attempt, such as processed, retry, or dead."
      },
      {
        "name": "PresentedErrorCode",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Presented Error Code",
        "description": "Flow-facing status code selected by metadata presentation, if the attempt failed."
      },
      {
        "name": "CauseCode",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Cause Code",
        "description": "Stable message-free code for the underlying failure before fault presentation."
      },
      {
        "name": "CauseCategory",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Cause Category",
        "description": "Product-neutral typed cause category."
      },
      {
        "name": "CauseElementType",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Cause Element Type",
        "description": "Flow element type at which the underlying failure was captured, when known."
      },
      {
        "name": "CauseElementName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Cause Element Name",
        "description": "Flow element API name at which the underlying failure was captured, when known."
      },
      {
        "name": "Retriable",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Retriable",
        "description": "Whether the typed underlying cause is safe for a fresh attempt under connector retry policy."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": ["WorkId", "Attempt"],
        "primary": true
      },
      {
        "name": "idx_connector_work_attempt_flow",
        "columns": ["FlowExecutionId", "WorkId", "Attempt"]
      },
      {
        "name": "idx_connector_work_attempt_event",
        "columns": ["EventId", "Attempt"]
      }
    ]
  },
  {
    "tableName": "_System_ConnectorSchedulerLease",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Scheduler Lease",
    "description": "Durable cross-process scheduler ownership row for one active connector scheduler per InstalledPackId and generation. Runtime code owns acquire, renew, fencing, and expiry semantics.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack Id",
        "description": "Connector pack incarnation identity whose scheduler slot is leased."
      },
      {
        "name": "Generation",
        "type": "BIGINT",
        "nullable": false,
        "default": "0",
        "label": "Generation",
        "description": "Scheduler generation. Combined with InstalledPackId as the physical primary key."
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Owner Id",
        "description": "Backend process or scheduler owner identity that currently holds the lease."
      },
      {
        "name": "FencingToken",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Fencing Token",
        "description": "Opaque fencing token required for lease renewal and scheduler-owned finalization."
      },
      {
        "name": "LeaseUntil",
        "type": "DATETIME",
        "nullable": false,
        "label": "Lease Until",
        "description": "Exclusive scheduler ownership deadline. A contender may acquire only after this timestamp has passed."
      },
      {
        "name": "RenewedAt",
        "type": "DATETIME",
        "nullable": false,
        "label": "Renewed At",
        "description": "Last successful acquisition or renewal timestamp."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": ["InstalledPackId", "Generation"],
        "primary": true
      },
      {
        "name": "idx_connector_scheduler_lease_until",
        "columns": ["LeaseUntil", "InstalledPackId", "Generation"]
      }
    ]
  },
  {
    "tableName": "_System_InstalledPackDependency",
    "tableType": "system_core",
    "category": "integration",
    "label": "Installed Pack Dependency",
    "description": "Runtime-readable projection of companion app-pack manifest PackDependency entries. Written at markInstalledPackActive, soft-deleted at markInstalledPackRemoving. Read at connector-inbound enqueue time only (consent gate) to verify cross-pack routing is authorized. Authoring SSoT is the manifest; this table is a lifecycle-managed cache for runtime consent checks.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id",
        "description": "Deterministic from (DependentPackName, DependsOnPackName) — ensures reapply is idempotent UPSERT."
      },
      {
        "name": "DependentPackName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Dependent Pack Name",
        "description": "Name of the companion app-pack that declared this dependency (_System_InstalledPack.Name)."
      },
      {
        "name": "DependentPackInstallId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Dependent Pack Install Id",
        "description": "PackInstallId of the companion at the time this row was written (its markInstalledPackActive). Cross-pack consent check verifies this matches the current active companion PackInstallId."
      },
      {
        "name": "DependsOnPackName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Depends On Pack Name",
        "description": "Name of the provider connector-pack that the companion depends on."
      },
      {
        "name": "VersionConstraint",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Version Constraint",
        "description": "Optional semver constraint from manifest PackDependency.VersionConstraint. NULL or empty means any provider version is accepted."
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uniq_ipd_dependent_depends_on",
        "columns": ["DependentPackName", "DependsOnPackName"],
        "unique": true
      },
      {
        "name": "idx_ipd_depends_on_deleted",
        "columns": ["DependsOnPackName", "IsDeleted"]
      }
    ]
  },
  {
    "tableName": "_System_ConnectorInboundProjectionSnapshot",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connector Inbound Projection Snapshot",
    "description": "Runtime-owned last-converged projection inventory for connector inbound batch reads, keyed by connector-pack install plus companion app-pack install.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id", "description": "Deterministic from (OwnerPackName, OwnerPackInstallId, CompanionPackName, CompanionPackInstallId, ObjectKind, SourceField)." },
      { "name": "OwnerPackName", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack Name" },
      { "name": "OwnerPackInstallId", "type": "VARCHAR(255)", "nullable": false, "label": "Owner Pack Install Id" },
      { "name": "CompanionPackName", "type": "VARCHAR(255)", "nullable": false, "label": "Companion Pack Name" },
      { "name": "CompanionPackInstallId", "type": "VARCHAR(255)", "nullable": false, "label": "Companion Pack Install Id" },
      { "name": "ObjectKind", "type": "VARCHAR(255)", "nullable": false, "label": "Object Kind" },
      { "name": "SourceField", "type": "VARCHAR(255)", "nullable": false, "label": "Source Field" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_connector_inbound_projection_owner", "columns": ["OwnerPackName", "OwnerPackInstallId", "IsDeleted"] },
      { "name": "idx_connector_inbound_projection_companion", "columns": ["CompanionPackInstallId", "IsDeleted"] }
    ]
  },
  {
    "tableName": "_System_SyncState",
    "tableType": "system_core",
    "category": "integration",
    "description": "Per-(connector-namespace, object, direction) cursor/health state for connector workers (NCRM-INT-05a, #1446). Read/write by worker code via the connector_syncstate Service. The health-view HTTP endpoint joins this with live NamedCredential validity.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack Id",
        "description": "Per-incarnation _System_InstalledPack.PackInstallId — prevents SyncState contamination across same-name pack rebirths"
      },
      {
        "name": "Namespace",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Namespace",
        "description": "Connector-pack Name from _System_InstalledPack"
      },
      {
        "name": "Object",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object",
        "description": "Target object API name (e.g. Lead). Opaque to substrate; worker-supplied."
      },
      {
        "name": "Direction",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Direction",
        "description": "One of inbound, outbound, bidirectional"
      },
      {
        "name": "Cursor",
        "type": "TEXT",
        "nullable": true,
        "label": "Cursor",
        "description": "Opaque page token / external system cursor"
      },
      {
        "name": "LastSyncAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Last Sync At"
      },
      {
        "name": "LastErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Last Error Message",
        "description": "Truncated to <= 256 runes by the worker API (connector_syncstate.Service.RecordError) before storage; surfaced to /api/connectors/:namespace/health as-is."
      },
      {
        "name": "LastErrorAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Last Error At"
      },
      {
        "name": "RunningErrorCount",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Running Error Count"
      },
      {
        "name": "IsActive",
        "type": "BOOLEAN",
        "nullable": false,
        "default": "TRUE",
        "label": "Is Active",
        "description": "Worker-disable flag; not the same as installed-pack active state"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uniq_sync_state",
        "columns": ["InstalledPackId", "Object", "Direction"],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_WorkflowAlert",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "automation",
    "label": "Workflow Email Alert",
    "description": "Reusable email alert definitions with recipients, sender, and template configuration. Referenced by ProcessAction.ApiName for approval and workflow automation.",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectApiName",
        "label": "Object API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "The SObject this alert is associated with"
      },
      {
        "name": "Name",
        "label": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true,
        "description": "Developer name (unique identifier, used as join key from ProcessAction.ApiName)"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Template",
        "label": "Email Template",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Email template reference. L0 treats it as opaque and passes the value verbatim to LoadAndRenderTemplate, which loads _System_EmailTemplate by Id only. L1 packs authoring by DeveloperName or Salesforce-shaped folder paths must resolve the reference to an EmailTemplate Id at apply time — the platform does not parse those forms."
      },
      {
        "name": "SenderType",
        "label": "Sender Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "description": "CurrentUser, OrgWideEmailAddress, or DefaultWorkflowUser"
      },
      {
        "name": "SenderAddress",
        "label": "Sender Address",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Email address for OrgWideEmailAddress sender type"
      },
      {
        "name": "Recipients",
        "label": "Recipients",
        "type": "TEXT",
        "nullable": true,
        "description": "JSON array of recipient entries, e.g. [{\"type\":\"user\",\"recipient\":\"email\"},{\"type\":\"owner\"}]"
      },
      {
        "name": "CcEmails",
        "label": "CC Emails",
        "type": "TEXT",
        "nullable": true,
        "description": "Comma-separated CC email addresses"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectApiName"
        ]
      },
      {
        "columns": [
          "Name"
        ],
        "unique": true
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "_System_WebhookSecret",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Webhook secret definitions declared by connector packs. Managed by the connector-pack install lifecycle; not directly admin-editable.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "OwnerPack",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Owner Pack"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Algorithm",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Algorithm"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": ["OwnerPack", "Name"],
        "unique": true
      }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_WebhookSecretValue",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Runtime secret values for webhook verification. Server-internal only; no row-level read permission exposed to API callers. Managed exclusively via the rotate admin endpoint.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "WebhookSecretId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Webhook Secret Id"
      },
      {
        "name": "SecretValue",
        "type": "TEXT",
        "nullable": false,
        "label": "Secret Value",
        "readProtectionPolicy": "blocked"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "RotatedAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Rotated At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": ["WebhookSecretId"],
        "unique": true
      }
    ],
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ConnectorInboundHandlerConfig",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Per-pack-incarnation inbound signature verifier and envelope parser configs authored by connector packs (NCRM-INT-11c). Read only by the connector inbound handler registrar.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "nullable": false,
        "label": "Handler Config ID"
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack ID",
        "description": "PackInstallId — incarnation-scoped so handler config follows the exact connector pack version that authored it."
      },
      {
        "name": "Namespace",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Namespace",
        "description": "Connector namespace; must equal the owning _System_InstalledPack.Name."
      },
      {
        "name": "CapabilityKind",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Capability Kind",
        "description": "Closed v1 connector capability kind: signature_verifier or envelope_parser."
      },
      {
        "name": "ConfigJSON",
        "type": "LONGTEXT",
        "nullable": false,
        "label": "Config JSON",
        "description": "Canonical pack-supplied JSON config used to build the generic inbound handler interpreter."
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      { "name": "uniq_cihc_pack_kind", "columns": ["InstalledPackId", "CapabilityKind"], "unique": true },
      { "name": "idx_cihc_namespace_kind", "columns": ["Namespace", "CapabilityKind"] },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ConnectorInboundRoute",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "Per-(pack, eventKind) inbound routing rules authored by connector packs (NCRM-INT-11b). Read by features/connector/inboundrouting Worker.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "nullable": false,
        "label": "Route ID"
      },
      {
        "name": "Namespace",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Namespace",
        "description": "Denormalised from _System_InstalledPack.Name for the matching PackInstallId — query-convenience denormalization; MUST equal _System_InstalledPack.Name (enforced by Component.Apply, not by FK)."
      },
      {
        "name": "InstalledPackId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Installed Pack ID",
        "description": "PackInstallId — incarnation-scoped, same column shape as _System_ConnectorEvent and _System_ConnectorSyncState use for incarnation scoping."
      },
      {
        "name": "EventKind",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Kind",
        "description": "Lowercase-canonical (matches Id computation; canonicalised at validator + Component.Apply time)."
      },
      {
        "name": "Version",
        "type": "INT",
        "nullable": false,
        "default": "1",
        "label": "Route Version",
        "description": "Monotonically-increasing incarnation counter per (InstalledPackId, EventKind). Route rows are append-only: re-applying a different FlowDeveloperName INSERTs a new row with Version=max+1 instead of overwriting. This makes each version row immutable — a queue row that snapshots a Version can always look up the exact (InstalledPackId, EventKind, Version) row it was routed against, even after the pack later re-applies with a different flow. Old Version rows are GC'd by the version sweeper only when no pending/inflight queue row references them. Existing rows at schema migration time get Version=1 via the column DEFAULT."
      },
      {
        "name": "FlowDeveloperName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Flow Developer Name"
      },
      {
        "name": "InvocationMode",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'per_event'",
        "label": "Invocation Mode",
        "description": "Generic connector inbound execution mode. per_event preserves one Flow call per event; batch_collection invokes one Flow with a collection of event inputs and expects per-event results; latest_by_source coalesces immediately-following same-source route siblings and executes only the latest state."
      },
      {
        "name": "BatchInputName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'events'",
        "label": "Batch Input Name"
      },
      {
        "name": "BatchResultOutputName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'eventResults'",
        "label": "Batch Result Output Name"
      },
      {
        "name": "MaxBatchSize",
        "type": "INT",
        "nullable": false,
        "default": "100",
        "label": "Max Batch Size"
      },
      {
        "name": "QueueClass",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'default'",
        "label": "Queue Class",
        "description": "Generic scheduler class for events emitted by this route. This substrate slice supports the default class only; additional scheduler classes require claim, supervisor, and pressure readers before admission."
      },
      {
        "name": "FlowExecutionFilter",
        "type": "JSON",
        "nullable": true,
        "label": "Flow Execution Filter",
        "description": "Optional generic route-level predicate evaluated against the durable event payload before enrichment and Flow execution. When present, the worker only executes the routed Flow if the payload path value matches one of the metadata-declared scalar values; otherwise the event is marked skipped."
      },
      {
        "name": "IsCurrent",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Is Current",
        "description": "1 = currently declared in the pack manifest (Apply sets this on every insert; ResolveFlow filters AND IsCurrent=1 for live-traffic routing). 0 = preserved for in-flight backlog drain only (sweeper sets this when an EventKind is dropped from the manifest; IsDeleted remains 0 so ResolveFlowByVersion can still find the row by exact Version). When all queue references drain AND IsCurrent=0, the sweeper hard-soft-deletes (IsDeleted=1) on the next pass."
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      { "name": "uniq_cir_pack_kind_version", "columns": ["InstalledPackId", "EventKind", "Version"], "unique": true },
      { "name": "idx__System_ConnectorInboundRoute_latest_version_lookup", "columns": ["InstalledPackId", "EventKind"] },
      { "name": "idx__System_ConnectorInboundRoute_current_latest", "columns": ["InstalledPackId", "EventKind", "IsCurrent"], "comment": "fast current-only latest-version lookup for ResolveFlow" },
      { "columns": ["Namespace"] },
      { "columns": ["EventKind"] },
      { "columns": ["IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup",
    "requiredWritePermission": "BLOCKED"
  },
  {
    "tableName": "_System_ExternalDeliveryAttempt",
    "tableType": "system_core",
    "category": "integration",
    "label": "External Delivery Attempt",
    "description": "Durable operator-facing log of outbound email/webhook delivery attempts. Stores the frozen rendered payload used for the original send or manual resend. Content evidence only: header values other than Content-Type are scrub-sentineled at write time; credential values are never persisted. Operator resend replays frozen content (method/body, recipients/subject/body) and re-resolves the webhook target url, headers, and email sender identity from current action config / sender policy; stored webhook urls are host-only. ActionId references a persisted automation action row whenever an action authored the send (composite steps record the root action id, never a synthesized local id) and is empty only for Flow-emitted email; composite-embedded webhook sends are addressed for resend by the stepId frozen in the payload; resend fails closed when a non-empty ActionId no longer resolves.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Channel",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Channel"
      },
      {
        "name": "Status",
        "type": "VARCHAR(32)",
        "nullable": false,
        "label": "Status"
      },
      {
        "name": "SourceObjectApiName",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Source Object API Name"
      },
      {
        "name": "SourceRecordId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Record Id"
      },
      {
        "name": "ActionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Action Id"
      },
      {
        "name": "TargetSummary",
        "type": "VARCHAR(512)",
        "nullable": false,
        "label": "Target Summary"
      },
      {
        "name": "RequestPayload",
        "type": "JSON",
        "nullable": false,
        "label": "Request Payload"
      },
      {
        "name": "ResponseStatus",
        "type": "INT",
        "nullable": true,
        "label": "Response Status"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "ReplayOfId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Replay Of Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id",
        "description": "Loose reference to the User who created this record; no FK constraint (synthetic system actors have no persisted User row)."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_eda_channel_status_created",
        "columns": [
          "Channel",
          "Status",
          "CreatedDate"
        ]
      },
      {
        "name": "idx_eda_source_record_created",
        "columns": [
          "SourceObjectApiName",
          "SourceRecordId",
          "CreatedDate"
        ]
      },
      {
        "name": "idx_eda_replay_of",
        "columns": [
          "ReplayOfId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ReplayOfId",
        "references": "_System_ExternalDeliveryAttempt(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_ConnectedPrincipal",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connected Principal",
    "description": "Per-user external principal binding owned by the connector runtime",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Principal Id" },
      { "name": "UserId", "type": "VARCHAR(255)", "nullable": false, "label": "User Id" },
      { "name": "ConnectorKey", "type": "VARCHAR(128)", "nullable": false, "label": "Connector Key" },
      { "name": "Generation", "type": "BIGINT", "nullable": false, "default": "1", "label": "Connection Generation" },
      { "name": "Issuer", "type": "VARCHAR(255)", "nullable": false, "label": "Issuer" },
      { "name": "Subject", "type": "VARCHAR(255)", "nullable": false, "label": "Subject" },
      { "name": "PrincipalAddress", "type": "VARCHAR(320)", "nullable": false, "label": "Principal Address" },
      { "name": "DisplayName", "type": "VARCHAR(255)", "nullable": true, "label": "Display Name" },
      { "name": "State", "type": "VARCHAR(32)", "nullable": false, "default": "'connected'", "label": "State" },
      { "name": "ConnectedAt", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Connected At" },
      { "name": "DisconnectedAt", "type": "DATETIME(6)", "nullable": true, "label": "Disconnected At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connected_principal_user_connector", "columns": ["UserId", "ConnectorKey"], "unique": true },
      { "name": "ux_connected_principal_remote_identity", "columns": ["ConnectorKey", "Issuer", "Subject"], "unique": true },
      { "name": "idx_connected_principal_user_state", "columns": ["UserId", "State"] }
    ],
    "foreignKeys": [
      { "column": "UserId", "references": "User(Id)", "onDelete": "CASCADE" }
    ]
  },
  {
    "tableName": "_System_ConnectedAuthorizationRequest",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connected Authorization Request",
    "description": "Short-lived per-user authorization state and encrypted proof-key verifier metadata",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Request Id" },
      { "name": "StateDigest", "type": "CHAR(64)", "nullable": false, "label": "State Digest" },
      { "name": "UserId", "type": "VARCHAR(255)", "nullable": false, "label": "User Id" },
      { "name": "ConnectorKey", "type": "VARCHAR(128)", "nullable": false, "label": "Connector Key" },
      { "name": "ExpectedGeneration", "type": "BIGINT", "nullable": false, "default": "1", "label": "Expected Connection Generation" },
      { "name": "RedirectUri", "type": "TEXT", "nullable": false, "label": "Redirect Uri" },
      { "name": "CodeVerifierCiphertext", "type": "TEXT", "nullable": false, "label": "Code Verifier Ciphertext" },
      { "name": "RequestedScopes", "type": "TEXT", "nullable": false, "label": "Requested Scopes" },
      { "name": "ExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Expires At" },
      { "name": "ConsumedAt", "type": "DATETIME(6)", "nullable": true, "label": "Consumed At" },
      { "name": "OAuthEffectState", "type": "VARCHAR(32)", "nullable": false, "default": "'none'", "label": "OAuth Effect State" },
      { "name": "OAuthEffectVersion", "type": "BIGINT", "nullable": false, "default": "0", "label": "OAuth Effect Version" },
      { "name": "OAuthActionOwnerId", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "OAuth Action Owner Id" },
      { "name": "OAuthActionEpoch", "type": "BIGINT", "nullable": false, "default": "0", "label": "OAuth Action Epoch" },
      { "name": "OAuthActionLeaseExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "OAuth Action Lease Expires At" },
      { "name": "OAuthExchangeDispatchedAt", "type": "DATETIME(6)", "nullable": true, "label": "OAuth Exchange Dispatched At" },
      { "name": "PendingTokenCiphertext", "type": "TEXT", "nullable": true, "label": "Pending Token Ciphertext" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_connected_authorization_state_digest", "columns": ["StateDigest"], "unique": true },
      { "name": "idx_connected_authorization_user_connector", "columns": ["UserId", "ConnectorKey", "ExpiresAt"] },
      { "name": "idx_connected_authorization_expiry", "columns": ["ExpiresAt"] }
    ],
    "foreignKeys": [
      { "column": "UserId", "references": "User(Id)", "onDelete": "CASCADE" }
    ]
  },
  {
    "tableName": "_System_ConnectedPrincipalToken",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connected Principal Token",
    "description": "Envelope-encrypted token material and expiry metadata for one connected principal",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "ConnectedPrincipalId", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Connected Principal Id" },
      { "name": "PrincipalGeneration", "type": "BIGINT", "nullable": false, "default": "1", "label": "Connection Generation" },
      { "name": "AccessTokenCiphertext", "type": "TEXT", "nullable": false, "label": "Access Token Ciphertext" },
      { "name": "RefreshTokenCiphertext", "type": "TEXT", "nullable": true, "label": "Refresh Token Ciphertext" },
      { "name": "TokenType", "type": "VARCHAR(32)", "nullable": false, "label": "Token Type" },
      { "name": "GrantedScopes", "type": "TEXT", "nullable": false, "label": "Granted Scopes" },
      { "name": "ExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Expires At" },
      { "name": "EncryptionKeyId", "type": "VARCHAR(255)", "nullable": false, "label": "Encryption Key Id" },
      { "name": "TokenVersion", "type": "BIGINT", "nullable": false, "default": "1", "label": "Token Version" },
      { "name": "RefreshOwnershipEpoch", "type": "BIGINT", "nullable": false, "default": "0", "label": "Refresh Ownership Epoch" },
      { "name": "RefreshOwnerId", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Refresh Owner Id" },
      { "name": "RefreshLeaseExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Refresh Lease Expires At" },
      { "name": "RefreshDispatchStartedAt", "type": "DATETIME(6)", "nullable": true, "label": "Refresh Dispatch Started At" },
      { "name": "OAuthEffectState", "type": "VARCHAR(32)", "nullable": false, "default": "'none'", "label": "OAuth Effect State" },
      { "name": "OAuthEffectVersion", "type": "BIGINT", "nullable": false, "default": "0", "label": "OAuth Effect Version" },
      { "name": "PendingTokenCiphertext", "type": "TEXT", "nullable": true, "label": "Pending Token Ciphertext" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_connected_principal_token_expiry", "columns": ["ExpiresAt"] }
    ],
    "foreignKeys": [
      { "column": "ConnectedPrincipalId", "references": "_System_ConnectedPrincipal(Id)", "onDelete": "CASCADE" }
    ]
  },
  {
    "tableName": "_System_ConnectedDeliveryJob",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connected Delivery Job",
    "description": "Fenced one-shot external delivery job with frozen local-completion inputs and terminal evidence",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "JobId", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Job Id" },
      { "name": "ConnectedPrincipalId", "type": "VARCHAR(255)", "nullable": false, "label": "Connected Principal Id" },
      { "name": "PrincipalGeneration", "type": "BIGINT", "nullable": false, "default": "1", "label": "Connection Generation" },
      { "name": "OriginatingUserId", "type": "VARCHAR(255)", "nullable": false, "label": "Originating User Id" },
      { "name": "State", "type": "VARCHAR(32)", "nullable": false, "default": "'queued'", "label": "State" },
      { "name": "PayloadSha256", "type": "CHAR(64)", "nullable": false, "label": "Payload SHA-256" },
      { "name": "PayloadEncodedSize", "type": "BIGINT", "nullable": false, "label": "Payload Encoded Size" },
      { "name": "SourceObjectApiName", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object API Name" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "CompletionSnapshot", "type": "JSON", "nullable": false, "label": "Completion Snapshot" },
      { "name": "ClaimToken", "type": "VARCHAR(255)", "nullable": true, "label": "Claim Token" },
      { "name": "LeaseExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Lease Expires At" },
      { "name": "Fence", "type": "BIGINT", "nullable": false, "default": "0", "label": "Fence" },
      { "name": "DispatchStartedAt", "type": "DATETIME(6)", "nullable": true, "label": "Dispatch Started At" },
      { "name": "AcceptedAt", "type": "DATETIME(6)", "nullable": true, "label": "Accepted At" },
      { "name": "RemoteReceiptId", "type": "VARCHAR(255)", "nullable": true, "label": "Remote Receipt Id" },
      { "name": "RemoteConversationId", "type": "VARCHAR(255)", "nullable": true, "label": "Remote Conversation Id" },
      { "name": "ResponseStatus", "type": "INT", "nullable": true, "label": "Response Status" },
      { "name": "ResultEvidence", "type": "JSON", "nullable": true, "label": "Result Evidence" },
      { "name": "FailureCode", "type": "VARCHAR(64)", "nullable": true, "label": "Failure Code" },
      { "name": "LocalAttemptCount", "type": "INT", "nullable": false, "default": "0", "label": "Local Attempt Count" },
      { "name": "NextLocalAttemptAt", "type": "DATETIME(6)", "nullable": true, "label": "Next Local Attempt At" },
      { "name": "CompletedAt", "type": "DATETIME(6)", "nullable": true, "label": "Completed At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_connected_delivery_job_claim", "columns": ["State", "LeaseExpiresAt", "JobId"] },
      { "name": "idx_connected_delivery_job_principal", "columns": ["ConnectedPrincipalId", "State", "CreatedDate"] },
      { "name": "idx_connected_delivery_job_originator", "columns": ["OriginatingUserId", "CreatedDate"] },
      { "name": "idx_connected_delivery_job_local_retry", "columns": ["State", "NextLocalAttemptAt", "JobId"] }
    ],
    "foreignKeys": [
      { "column": "ConnectedPrincipalId", "references": "_System_ConnectedPrincipal(Id)", "onDelete": "RESTRICT" },
      { "column": "OriginatingUserId", "references": "User(Id)", "onDelete": "RESTRICT" }
    ]
  },
  {
    "tableName": "_System_ConnectedDeliveryPayload",
    "tableType": "system_core",
    "category": "integration",
    "label": "Connected Delivery Payload",
    "description": "Connector-owned insert-only Base64 payload snapshot keyed by JobId. Both temporal fields are insert defaults without automatic update behavior; production payload code owns insert, read and verify, and sweeper delete behavior. Payload insertion intentionally precedes job insertion, so no job foreign key is declared.",
    "requiredReadPermission": "BLOCKED",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      { "name": "JobId", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Job Id" },
      { "name": "PayloadBase64", "type": "MEDIUMTEXT", "nullable": false, "label": "Payload Base64" },
      { "name": "PayloadSha256", "type": "CHAR(64)", "nullable": false, "label": "Payload SHA-256" },
      { "name": "EncodedSize", "type": "BIGINT", "nullable": false, "label": "Encoded Size" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_connected_delivery_payload_created", "columns": ["CreatedDate", "JobId"] }
    ]
  },
  {
    "tableName": "_System_RuntimeRecordCommand",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned idempotency and complete lifecycle authority for one scoped record mutation command; accepted rows are terminalized before cleanup",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Command Row Id" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Trusted Scope Digest" },
      { "name": "CommandId", "type": "VARCHAR(255)", "nullable": false, "label": "Command Id" },
      { "name": "RequestDigest", "type": "CHAR(71)", "nullable": false, "label": "Semantic Request Digest" },
      { "name": "BatchMode", "type": "VARCHAR(16)", "nullable": false, "label": "Batch Mode" },
      { "name": "OperationCount", "type": "INT", "nullable": false, "label": "Operation Count" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Command State" },
      { "name": "Receipts", "type": "JSON", "nullable": false, "label": "Consistency Receipts" },
      { "name": "ResultPayload", "type": "MEDIUMTEXT", "nullable": true, "label": "Terminal Result Payload" },
      { "name": "OutcomeExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Outcome Expires At" },
      { "name": "OutcomeRetentionMicros", "type": "BIGINT", "nullable": false, "label": "Outcome Retention Microseconds" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_record_command_scope", "columns": ["ScopeDigest", "CommandId"], "unique": true },
      { "name": "idx_runtime_record_command_expiry", "columns": ["OutcomeExpiresAt", "Id"] },
      { "name": "idx_runtime_record_command_lifecycle", "columns": ["State", "OutcomeExpiresAt", "Id"] }
    ]
  },
  {
    "tableName": "_System_RuntimeRecordCommandOperation",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Position-stable operation slots whose terminal result commits atomically with a Runtime record mutation",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Operation Row Id" },
      { "name": "CommandRowId", "type": "VARCHAR(255)", "nullable": false, "label": "Command Row Id" },
      { "name": "OperationIndex", "type": "INT", "nullable": false, "label": "Operation Index" },
      { "name": "OperationKind", "type": "VARCHAR(16)", "nullable": false, "label": "Operation Kind" },
      { "name": "OperationObjectId", "type": "VARCHAR(64)", "nullable": true, "label": "Caller-Bound Operation Object Id" },
      { "name": "BoundRecordId", "type": "VARCHAR(255)", "nullable": true, "label": "Bound Record Id" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Operation State" },
      { "name": "ResultPayload", "type": "MEDIUMTEXT", "nullable": true, "label": "Terminal Result Payload" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_record_command_operation", "columns": ["CommandRowId", "OperationIndex"], "unique": true },
      { "name": "idx_runtime_record_command_operation_state", "columns": ["CommandRowId", "State", "OperationIndex"] }
    ],
    "foreignKeys": [
      { "column": "CommandRowId", "references": "_System_RuntimeRecordCommand(Id)", "onDelete": "CASCADE" }
    ]
  },
  {
    "tableName": "_System_RuntimeApprovalInvocation",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned Approval invocation idempotency and terminal business-result authority; acceptance, approval state transition, and completion share one caller-owned transaction",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Invocation Row Id" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Trusted Scope Digest" },
      { "name": "IdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Idempotency Key" },
      { "name": "Operation", "type": "VARCHAR(16)", "nullable": false, "label": "Approval Operation" },
      { "name": "DefinitionId", "type": "VARCHAR(255)", "nullable": false, "label": "Approval Definition Id" },
      { "name": "DefinitionVersion", "type": "VARCHAR(255)", "nullable": false, "label": "Approval Definition Source Version" },
      { "name": "ClosureDigest", "type": "CHAR(71)", "nullable": false, "label": "Exact Runtime Approval Closure Digest" },
      { "name": "RequestDigest", "type": "CHAR(71)", "nullable": false, "label": "Semantic Request Digest" },
      { "name": "Receipts", "type": "JSON", "nullable": false, "label": "Consistency Receipts" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Invocation State" },
      { "name": "ResultPayload", "type": "MEDIUMBLOB", "nullable": true, "label": "Terminal Business Result Payload" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_approval_invocation_scope", "columns": ["ScopeDigest", "IdempotencyKey"], "unique": true }
    ]
  },
  {
    "tableName": "_System_RuntimeFlowInvocation",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned synchronous bounded Flow invocation idempotency and terminal result authority; acceptance, business execution, and completion share one caller-owned transaction",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Invocation Row Id" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Trusted Scope Digest" },
      { "name": "IdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Idempotency Key" },
      { "name": "DefinitionRef", "type": "VARCHAR(255)", "nullable": false, "label": "Flow Definition Reference" },
      { "name": "DefinitionVersion", "type": "VARCHAR(255)", "nullable": false, "label": "App Metadata Definition Version" },
      { "name": "ClosureDigest", "type": "CHAR(71)", "nullable": false, "label": "Exact Runtime Flow Closure Digest" },
      { "name": "RequestDigest", "type": "CHAR(71)", "nullable": false, "label": "Semantic Request Digest" },
      { "name": "Receipts", "type": "JSON", "nullable": false, "label": "Consistency Receipts" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Invocation State" },
      { "name": "ResultPayload", "type": "MEDIUMBLOB", "nullable": true, "label": "Terminal Result Payload" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_flow_invocation_scope", "columns": ["ScopeDigest", "IdempotencyKey"], "unique": true }
    ]
  },
  {
    "tableName": "_System_IntegrationOutboundCommand",
    "tableType": "system_core",
    "category": "integration",
    "description": "Integration-owned durable acceptance and provider-delivery lifecycle for one exact Runtime outbound intent; Runtime never reads or mutates this table",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Integration Command Id" },
      { "name": "AcceptanceSequence", "type": "BIGINT", "autoIncrement": true, "nullable": false, "label": "Durable Integration Acceptance Sequence" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "label": "App Installation Id" },
      { "name": "AuthorizedWorkloadId", "type": "VARCHAR(1024)", "nullable": false, "label": "Authorized Integration Workload Id" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Trusted Consumer Scope Digest" },
      { "name": "CatalogRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Immutable Catalog Revision" },
      { "name": "IntentId", "type": "VARCHAR(255)", "nullable": false, "label": "Runtime Intent Id" },
      { "name": "LinkKey", "type": "VARCHAR(255)", "nullable": false, "label": "Integration Remote Link Lane" },
      { "name": "IdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Desired State Idempotency Key" },
      { "name": "PayloadFormatVersion", "type": "BIGINT", "nullable": false, "label": "Payload Format Version" },
      { "name": "PayloadDigest", "type": "CHAR(71)", "nullable": false, "label": "Canonical Payload Digest" },
      { "name": "Operation", "type": "VARCHAR(16)", "nullable": false, "label": "Neutral Operation" },
      { "name": "SourceObject", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "ConnectorOwnerKey", "type": "VARCHAR(255)", "nullable": false, "label": "Opaque Connector Owner Key" },
      { "name": "FlowDeveloperName", "type": "VARCHAR(255)", "nullable": false, "label": "Flow Developer Name" },
      { "name": "FlowActionName", "type": "VARCHAR(255)", "nullable": false, "label": "Flow Action Name" },
      { "name": "ActionSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Action Slot Id" },
      { "name": "DestinationSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Destination Slot Id" },
      { "name": "Bindings", "type": "JSON", "nullable": false, "label": "Exact Catalog Binding References" },
      { "name": "CanonicalPayload", "type": "MEDIUMBLOB", "nullable": false, "label": "Provider-Neutral Canonical Payload" },
      { "name": "State", "type": "VARCHAR(32)", "nullable": false, "default": "'pending'", "label": "Integration Delivery State" },
      { "name": "AttemptCount", "type": "BIGINT", "nullable": false, "default": "0", "label": "Provider Dispatch Attempt Count" },
      { "name": "RetryCount", "type": "BIGINT", "nullable": false, "default": "0", "label": "Consecutive Safe Retry Count" },
      { "name": "ClaimedBy", "type": "VARCHAR(255)", "nullable": true, "label": "Claim Owner" },
      { "name": "ClaimToken", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Claim Token" },
      { "name": "ClaimedAt", "type": "DATETIME(6)", "nullable": true, "label": "Claimed At" },
      { "name": "LeaseExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Lease Expires At" },
      { "name": "DispatchStartedAt", "type": "DATETIME(6)", "nullable": true, "label": "Provider Dispatch Started At" },
      { "name": "NextAttemptAt", "type": "DATETIME(6)", "nullable": true, "label": "Next Safe Attempt At" },
      { "name": "DependencyKind", "type": "VARCHAR(64)", "nullable": true, "label": "Blocked Dependency Kind" },
      { "name": "DependencyKey", "type": "VARCHAR(255)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Opaque Blocked Dependency Key" },
      { "name": "DependencyReadinessKeys", "type": "JSON", "nullable": true, "label": "Exact Blocked Dependency Readiness Keys" },
      { "name": "DependencyBlockedAt", "type": "DATETIME(6)", "nullable": true, "label": "Blocked Dependency Start Time" },
      { "name": "FailureCode", "type": "VARCHAR(64)", "nullable": true, "label": "Sanitized Failure Code" },
      { "name": "ResponseStatus", "type": "BIGINT", "nullable": true, "label": "Provider Response Status" },
      { "name": "RemoteId", "type": "VARCHAR(512)", "nullable": true, "label": "Finalized Remote Identity" },
      { "name": "ResultFormatVersion", "type": "BIGINT", "nullable": true, "label": "Typed Terminal Result Format Version" },
      { "name": "ResultDigest", "type": "CHAR(71)", "nullable": true, "label": "Typed Terminal Result Digest" },
      { "name": "CanonicalResult", "type": "MEDIUMBLOB", "nullable": true, "label": "Provider-Neutral Canonical Terminal Result" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_integration_outbound_intent", "columns": ["ScopeDigest", "IntentId"], "unique": true },
      { "name": "ux_integration_outbound_idempotency", "columns": ["ScopeDigest", "IdempotencyKey"], "unique": true },
      { "name": "ux_integration_outbound_acceptance_sequence", "columns": ["AcceptanceSequence"], "unique": true },
      { "name": "idx_integration_outbound_claim", "columns": ["ScopeDigest", "CatalogRevision", "State", "NextAttemptAt", "Id"] },
      { "name": "idx_integration_outbound_lane", "columns": ["ScopeDigest", "CatalogRevision", "LinkKey", "State", "AcceptanceSequence"] },
      { "name": "idx_integration_outbound_dependency", "columns": ["ScopeDigest", "DependencyKind", "DependencyKey", "State", "Id"] },
      { "name": "idx_integration_outbound_dependency_reconcile", "columns": ["ScopeDigest", "CatalogRevision", "State", "Id"] }
    ]
  },
  {
    "tableName": "_System_RuntimeOutboundIntent",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned immutable provider-neutral outbound intents; external dispatch, credentials, retries, remote links, and reconciliation remain Integration-owned",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Intent Row Id" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "label": "App Installation Id" },
      { "name": "AuthorizedWorkloadId", "type": "VARCHAR(1024)", "nullable": false, "label": "Authorized Integration Workload Id" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Trusted Consumer Scope Digest" },
      { "name": "CatalogRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Immutable Catalog Revision" },
      { "name": "IntentId", "type": "VARCHAR(255)", "nullable": false, "label": "Intent Id" },
      { "name": "IdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Desired State Idempotency Key" },
      { "name": "PayloadFormatVersion", "type": "BIGINT", "nullable": false, "label": "Payload Format Version" },
      { "name": "PayloadDigest", "type": "CHAR(71)", "nullable": false, "label": "Canonical Payload Digest" },
      { "name": "Operation", "type": "VARCHAR(16)", "nullable": false, "label": "Neutral Operation" },
      { "name": "SourceObject", "type": "VARCHAR(255)", "nullable": false, "label": "Source Object" },
      { "name": "SourceRecordId", "type": "VARCHAR(255)", "nullable": false, "label": "Source Record Id" },
      { "name": "ConnectorOwnerKey", "type": "VARCHAR(255)", "nullable": false, "label": "Opaque Connector Owner Key" },
      { "name": "FlowDeveloperName", "type": "VARCHAR(255)", "nullable": false, "label": "Flow Developer Name" },
      { "name": "FlowActionName", "type": "VARCHAR(255)", "nullable": false, "label": "Flow Action Name" },
      { "name": "ActionSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Action Slot Id" },
      { "name": "DestinationSlotId", "type": "VARCHAR(255)", "nullable": false, "label": "Destination Slot Id" },
      { "name": "Bindings", "type": "JSON", "nullable": false, "label": "Exact Catalog Binding References" },
      { "name": "CanonicalPayload", "type": "MEDIUMBLOB", "nullable": false, "label": "Provider-Neutral Canonical Payload" },
      { "name": "AdmissionState", "type": "VARCHAR(16)", "nullable": false, "default": "'PENDING'", "label": "Integration Admission State" },
      { "name": "IntegrationCommandId", "type": "VARCHAR(255)", "nullable": true, "label": "Integration-Owned Durable Command Id" },
      { "name": "RejectionCode", "type": "VARCHAR(255)", "nullable": true, "label": "Integration Admission Rejection Code" },
      { "name": "ResultRemoteId", "type": "VARCHAR(255)", "nullable": true, "label": "Integration-Owned Provider-Neutral Result Identity" },
      { "name": "ResultFormatVersion", "type": "BIGINT", "nullable": true, "label": "Typed Terminal Result Format Version" },
      { "name": "ResultDigest", "type": "CHAR(71)", "nullable": true, "label": "Typed Terminal Result Digest" },
      { "name": "CanonicalResult", "type": "MEDIUMBLOB", "nullable": true, "label": "Provider-Neutral Canonical Terminal Result" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_outbound_intent_scope", "columns": ["ScopeDigest", "IdempotencyKey"], "unique": true },
      { "name": "ux_runtime_outbound_intent_id", "columns": ["ScopeDigest", "IntentId"], "unique": true },
      { "name": "idx_runtime_outbound_intent_pending", "columns": ["ScopeDigest", "AdmissionState", "CatalogRevision", "Id"] },
      { "name": "idx_runtime_outbound_intent_owner", "columns": ["SourceObject", "SourceRecordId", "AdmissionState"] }
    ]
  },
  {
    "tableName": "_System_RuntimeOutboundIntentGeneration",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned durable scheduling cursor for provider-neutral outbound intent discovery; generation changes are hints only and never authorize listing, acceptance, claim, or delivery",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "ScopeDigest", "type": "CHAR(64)", "primaryKey": true, "nullable": false, "label": "Trusted Consumer Scope Digest" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "label": "App Installation Id" },
      { "name": "AuthorizedWorkloadId", "type": "VARCHAR(1024)", "nullable": false, "label": "Authorized Integration Workload Id" },
      { "name": "Generation", "type": "DECIMAL(20,0)", "nullable": false, "default": "0", "label": "Outbound Intent Wake Generation" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ]
  },
  {
    "tableName": "_System_RuntimeMailboxAuthorizationHandle",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned short-lived callback reauthorization handle bound to one admitted user session, exact Permission State floor, App installation, Catalog revision, and security epoch",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "HandleDigest", "type": "CHAR(64)", "primaryKey": true, "nullable": false, "collationName": "utf8mb4_bin", "label": "Opaque Handle Digest" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "label": "App Installation Id" },
      { "name": "AuthorizedSubjectId", "type": "VARCHAR(255)", "nullable": false, "label": "Authorized Subject Id" },
      { "name": "SessionId", "type": "VARCHAR(255)", "nullable": false, "collationName": "utf8mb4_bin", "label": "Bound Session Id" },
      { "name": "AuthEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Bound Authentication Epoch" },
      { "name": "PermissionStateLineage", "type": "BINARY(16)", "nullable": false, "label": "Bound Permission State Lineage" },
      { "name": "PermissionStateRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Bound Permission State Revision" },
      { "name": "CatalogRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Bound Catalog Revision" },
      { "name": "SecurityEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Bound Security Epoch" },
      { "name": "ExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Handle Expiry" },
      { "name": "ConsumedAt", "type": "DATETIME(6)", "nullable": true, "label": "First Successful Reauthorization" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_runtime_mailbox_authorization_expiry", "columns": ["ExpiresAt", "HandleDigest"] },
      { "name": "idx_runtime_mailbox_authorization_subject", "columns": ["AuthorizedSubjectId", "AppInstallationId", "ExpiresAt"] }
    ]
  },
  {
    "tableName": "_System_RuntimePlatformCommand",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Runtime-owned durable inbox for neutral private Platform API commands; worker execution and retention are independently fenced work-family concerns",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Command Row Id" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "label": "App Installation Id" },
      { "name": "CallerWorkloadId", "type": "VARCHAR(1024)", "nullable": false, "label": "Caller Workload Id" },
      { "name": "RuntimeCapabilityId", "type": "VARCHAR(255)", "nullable": false, "label": "Runtime Capability Id" },
      { "name": "MetadataBinding", "type": "MEDIUMTEXT", "nullable": false, "label": "Immutable Runtime Metadata Binding" },
      { "name": "ExecutionScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Worker Execution Scope Digest" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Trusted Scope Digest" },
      { "name": "CommandId", "type": "VARCHAR(255)", "nullable": false, "label": "Command Id" },
      { "name": "IdempotencyKey", "type": "VARCHAR(255)", "nullable": false, "label": "Idempotency Key" },
      { "name": "CommandKind", "type": "VARCHAR(255)", "nullable": false, "label": "Neutral Command Kind" },
      { "name": "PartitionKey", "type": "VARCHAR(255)", "nullable": true, "label": "Partition Key" },
      { "name": "SerializationKeyDigest", "type": "CHAR(64)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Trusted Aggregate Serialization Key Digest" },
      { "name": "PayloadFormatVersion", "type": "BIGINT", "nullable": false, "label": "Payload Format Version" },
      { "name": "RequestDigest", "type": "CHAR(71)", "nullable": false, "label": "Semantic Request Digest" },
      { "name": "Payload", "type": "MEDIUMBLOB", "nullable": false, "label": "Opaque Command Payload" },
      { "name": "Receipts", "type": "JSON", "nullable": false, "label": "Consistency Receipts" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Command State" },
      { "name": "Attempt", "type": "INT", "nullable": false, "default": "0", "label": "Execution Attempt" },
      { "name": "AvailableAt", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Next Eligible Time" },
      { "name": "LeaseToken", "type": "VARCHAR(64)", "nullable": true, "label": "Execution Lease Token" },
      { "name": "LeaseExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Execution Lease Expiry" },
      { "name": "OwnershipEpoch", "type": "DECIMAL(20,0)", "nullable": true, "label": "Execution Ownership Epoch" },
      { "name": "DependencyKind", "type": "VARCHAR(64)", "nullable": true, "label": "Blocked Dependency Kind" },
      { "name": "DependencyObjectAPIName", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Object API Name" },
      { "name": "DependencyRecordId", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Record Id" },
      { "name": "DependencyKeyHash", "type": "CHAR(64)", "nullable": true, "label": "Blocked Dependency Scope Hash" },
      { "name": "DependencyConnectorOwnerKey", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Connector Owner" },
      { "name": "DependencyConnectorNamespace", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Connector Namespace" },
      { "name": "DependencyConnectorSourceObject", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Connector Source Object" },
      { "name": "DependencyDestinationSlotId", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Destination Slot" },
      { "name": "DependencyConnectorRemoteId", "type": "VARCHAR(255)", "nullable": true, "label": "Blocked Dependency Connector Remote Id" },
      { "name": "DependencyBlockedAt", "type": "DATETIME(6)", "nullable": true, "label": "Blocked Dependency Start Time" },
      { "name": "LastError", "type": "LONGTEXT", "nullable": true, "label": "Last Execution Error" },
      { "name": "RepairId", "type": "VARCHAR(255)", "nullable": true, "label": "Last Repair Id" },
      { "name": "RepairReason", "type": "VARCHAR(1024)", "nullable": true, "label": "Last Repair Reason" },
      { "name": "RepairCount", "type": "INT", "nullable": false, "default": "0", "label": "Repair Count" },
      { "name": "LastRepairAt", "type": "DATETIME(6)", "nullable": true, "label": "Last Repair Time" },
      { "name": "ResultPayload", "type": "MEDIUMTEXT", "nullable": true, "label": "Base64-Encoded Opaque Pending or Terminal Result Payload" },
      { "name": "PublicationIdentity", "type": "CHAR(71)", "nullable": true, "collationName": "utf8mb4_bin", "label": "Deterministic Publication Idempotency Identity" },
      { "name": "PublishAttempt", "type": "INT", "nullable": false, "default": "0", "label": "Publication Attempt" },
      { "name": "RecoveryState", "type": "VARCHAR(16)", "nullable": true, "label": "Poison Repair Resume State" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_platform_command_scope", "columns": ["ScopeDigest", "IdempotencyKey"], "unique": true },
      { "name": "idx_runtime_platform_command_claim", "columns": ["ExecutionScopeDigest", "State", "AvailableAt", "LeaseExpiresAt", "Id"] },
      { "name": "idx_runtime_platform_command_partition", "columns": ["ExecutionScopeDigest", "PartitionKey", "State", "LeaseExpiresAt", "Id"] },
      { "name": "idx_runtime_platform_command_serialization", "columns": ["ExecutionScopeDigest", "SerializationKeyDigest", "State", "LeaseExpiresAt", "Id"] },
      { "name": "idx_runtime_platform_command_id", "columns": ["ScopeDigest", "CommandId"], "unique": true }
    ]
  },
  {
    "tableName": "_System_RuntimeWorkOwnership",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Database authority that fences one Runtime Worker deployment generation for a durable work family",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "WorkFamily", "type": "VARCHAR(64)", "primaryKey": true, "nullable": false, "label": "Work Family" },
      { "name": "DeploymentId", "type": "VARCHAR(255)", "nullable": false, "label": "Deployment Id" },
      { "name": "WorkerReleaseDigest", "type": "CHAR(71)", "nullable": false, "label": "Worker Release Digest" },
      { "name": "OwnershipEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Ownership Epoch" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "OperationId", "type": "VARCHAR(255)", "nullable": false, "label": "Operation Id", "description": "Stable control-plane compare-and-swap identity. A retry of the exact last activation/deactivation is verify-only; an older operation cannot overwrite a newer ownership epoch." },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_runtime_work_ownership_deployment", "columns": ["DeploymentId", "OwnershipEpoch"] }
    ]
  },
  {
    "tableName": "_System_RuntimeWorkFence",
    "tableType": "system_core",
    "category": "runtime",
    "description": "Fixed effect-fence slots that preserve Runtime ownership transfer while independent work keys execute concurrently",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Fence Slot Id" },
      { "name": "WorkFamily", "type": "VARCHAR(64)", "nullable": false, "label": "Work Family" },
      { "name": "FenceSlot", "type": "INT", "nullable": false, "label": "Fence Slot" },
      { "name": "DeploymentId", "type": "VARCHAR(255)", "nullable": false, "label": "Deployment Id" },
      { "name": "WorkerReleaseDigest", "type": "CHAR(71)", "nullable": false, "label": "Worker Release Digest" },
      { "name": "OwnershipEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Ownership Epoch" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_work_fence_slot", "columns": ["WorkFamily", "FenceSlot"], "unique": true },
      { "name": "idx_runtime_work_fence_deployment", "columns": ["DeploymentId", "OwnershipEpoch"] }
    ]
  },
  {
    "tableName": "_System_PermissionAuthoringCommand",
    "tableType": "system_core",
    "category": "security",
    "description": "Permissions-owned durable identity, bounded nonterminal recovery, canonical PermissionSet binding, and terminal outcome for one atomic authoring command",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Command Row Id" },
      { "name": "ScopeDigest", "type": "CHAR(64)", "nullable": false, "label": "Principal-Bound Trusted Scope Digest" },
      { "name": "CommandId", "type": "VARCHAR(255)", "nullable": false, "label": "Command Id" },
      { "name": "RequestDigest", "type": "CHAR(71)", "nullable": false, "label": "Semantic Request Digest" },
      { "name": "TargetKind", "type": "VARCHAR(32)", "nullable": false, "label": "Caller Target Kind" },
      { "name": "TargetId", "type": "VARCHAR(255)", "nullable": false, "label": "Caller Target Id" },
      { "name": "CanonicalPermissionSetId", "type": "VARCHAR(255)", "nullable": true, "label": "Permanently Bound PermissionSet Id" },
      { "name": "ExpectedAuthoringToken", "type": "VARCHAR(255)", "nullable": false, "label": "Expected Authoring Token" },
      { "name": "SemanticMappingRevision", "type": "BIGINT", "nullable": true, "label": "Accepted Permission Authoring Semantic Mapping Revision" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Command State" },
      { "name": "ResultPayload", "type": "MEDIUMTEXT", "nullable": true, "label": "Opaque Terminal Result Payload" },
      { "name": "AdmissionExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Nonterminal Command Expires At" },
      { "name": "OutcomeExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Terminal Outcome Expires At" },
      { "name": "OutcomeRetentionMicros", "type": "BIGINT", "nullable": false, "label": "Outcome Retention Microseconds" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_permission_authoring_command_scope", "columns": ["ScopeDigest", "CommandId"], "unique": true },
      { "name": "idx_permission_authoring_command_admission_expiry", "columns": ["State", "AdmissionExpiresAt", "Id"] },
      { "name": "idx_permission_authoring_command_outcome_expiry", "columns": ["State", "OutcomeExpiresAt", "Id"] },
      { "name": "idx_permission_authoring_command_target", "columns": ["CanonicalPermissionSetId", "CreatedDate", "Id"] }
    ]
  },
  {
    "tableName": "_System_PermissionAuthoringConvergence",
    "tableType": "system_core",
    "category": "security",
    "description": "Permissions-owned durable post-commit convergence disposition with a lifecycle independent from command result retention",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Convergence Disposition Id" },
      { "name": "SourceCommandRowId", "type": "VARCHAR(255)", "nullable": false, "label": "Immutable Source Command Row Id" },
      { "name": "CommandId", "type": "VARCHAR(255)", "nullable": false, "label": "Command Id" },
      { "name": "CommandDigest", "type": "CHAR(71)", "nullable": false, "label": "Semantic Command Digest" },
      { "name": "CanonicalPermissionSetId", "type": "VARCHAR(255)", "nullable": false, "label": "Canonical PermissionSet Id" },
      { "name": "AuthoringRevision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Committed Authoring Revision" },
      { "name": "State", "type": "VARCHAR(16)", "nullable": false, "label": "Delivery State" },
      { "name": "AttemptCount", "type": "BIGINT", "nullable": false, "default": "0", "label": "Delivery Attempt Count" },
      { "name": "AvailableAt", "type": "DATETIME(6)", "nullable": false, "label": "Next Delivery Time" },
      { "name": "LeaseOwner", "type": "VARCHAR(255)", "nullable": true, "label": "Lease Owner" },
      { "name": "LeaseExpiresAt", "type": "DATETIME(6)", "nullable": true, "label": "Lease Expires At" },
      { "name": "LastError", "type": "MEDIUMTEXT", "nullable": true, "label": "Last Delivery Error" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_permission_authoring_convergence_source", "columns": ["SourceCommandRowId"], "unique": true },
      { "name": "idx_permission_authoring_convergence_delivery", "columns": ["State", "AvailableAt", "Id"] }
    ]
  },
  {
    "tableName": "_System_PermissionStateVersion",
    "tableType": "system_core",
    "category": "security",
    "description": "Platform-owned singleton Permission State lineage, revision, and enforcement activation",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "SingletonKey", "type": "TINYINT", "primaryKey": true, "nullable": false, "label": "Singleton Key" },
      { "name": "Lineage", "type": "BINARY(16)", "nullable": false, "label": "Lineage" },
      { "name": "Revision", "type": "DECIMAL(20,0)", "nullable": false, "label": "Revision" },
      { "name": "EnforcementMode", "type": "VARCHAR(8)", "nullable": false, "label": "Enforcement Mode" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ]
  },
  {
    "tableName": "_System_RuntimeSecurityState",
    "tableType": "system_core",
    "category": "security",
    "description": "Runtime-owned active security epoch for one authoritative Org projection",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "OrgId", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Org Id" },
      { "name": "RuntimeAudience", "type": "VARCHAR(255)", "nullable": false, "label": "Runtime Audience" },
      { "name": "SecurityEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Security Epoch" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ]
  },
  {
    "tableName": "_System_RuntimeSecurityBinding",
    "tableType": "system_core",
    "category": "security",
    "description": "Fenced Runtime projection of AppInstallation grants to canonical workloads",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Binding Id" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "AppInstallationId", "type": "VARCHAR(255)", "nullable": false, "label": "App Installation Id" },
      { "name": "CallerWorkloadId", "type": "VARCHAR(1024)", "nullable": false, "label": "Caller Workload Id" },
      { "name": "CallerWorkloadDigest", "type": "CHAR(64)", "nullable": false, "label": "Caller Workload Digest" },
      { "name": "Capabilities", "type": "JSON", "nullable": false, "label": "Runtime Capabilities" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_runtime_security_binding_installation", "columns": ["OrgId", "AppInstallationId", "CallerWorkloadDigest"] }
    ]
  },
  {
    "tableName": "_System_RuntimeSecurityLease",
    "tableType": "system_core",
    "category": "security",
    "description": "Runtime replica lease bound to one Org security epoch",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "RuntimeReplicaId", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Runtime Replica Id" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "SecurityEpoch", "type": "DECIMAL(20,0)", "nullable": false, "label": "Security Epoch" },
      { "name": "ExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Expires At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "idx_runtime_security_lease_org_epoch", "columns": ["OrgId", "SecurityEpoch"] },
      { "name": "idx_runtime_security_lease_expiry", "columns": ["ExpiresAt"] }
    ]
  },
  {
    "tableName": "_System_RuntimeDelegationRevocation",
    "tableType": "system_core",
    "category": "security",
    "description": "Runtime-owned revocation state for signed delegation identifiers",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "nullable": false, "label": "Revocation Id" },
      { "name": "OrgId", "type": "VARCHAR(255)", "nullable": false, "label": "Org Id" },
      { "name": "DelegationId", "type": "VARCHAR(255)", "nullable": false, "label": "Delegation Id" },
      { "name": "ExpiresAt", "type": "DATETIME(6)", "nullable": false, "label": "Expires At" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "ux_runtime_delegation_revocation_org_id", "columns": ["OrgId", "DelegationId"], "unique": true },
      { "name": "idx_runtime_delegation_revocation_expiry", "columns": ["ExpiresAt"] }
    ]
  },
  {
    "tableName": "_System_ManagedComponentTargetLock",
    "tableType": "system_core",
    "category": "metadata",
    "label": "Managed Component Target Lock",
    "description": "Permanent generic coordination rows for host-serialized managed component physical targets. Rows are neither ownership nor commit evidence.",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "TargetDomain", "type": "VARBINARY(255)", "nullable": false, "label": "Target Domain" },
      { "name": "PhysicalKey", "type": "VARBINARY(1024)", "nullable": false, "label": "Physical Key" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "columns": ["TargetDomain", "PhysicalKey"], "primary": true }
    ]
  },
  {
    "tableName": "_System_ManagedComponentOperationEvidence",
    "tableType": "system_core",
    "category": "metadata",
    "label": "Managed Component Operation Evidence",
    "description": "Bounded operation-and-attempt evidence written in the same transaction as one managed component mutation and used with fresh projection and effect proof to classify uncertain commit outcomes.",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "OperationId", "type": "VARBINARY(64)", "nullable": false, "label": "Operation Id" },
      { "name": "Attempt", "type": "INT", "nullable": false, "label": "Attempt" },
      { "name": "ComponentKind", "type": "VARCHAR(255)", "nullable": false, "label": "Component Kind" },
      { "name": "Scope", "type": "VARCHAR(16)", "nullable": false, "label": "Scope" },
      { "name": "PlanFingerprint", "type": "BINARY(32)", "nullable": false, "label": "Plan Fingerprint" },
      { "name": "ProjectionIdentityHash", "type": "BINARY(32)", "nullable": false, "label": "Projection Identity Hash" },
      { "name": "MutationDisposition", "type": "VARCHAR(32)", "nullable": false, "label": "Mutation Disposition" },
      { "name": "SemanticMutationRows", "type": "INT", "nullable": false, "label": "Semantic Mutation Rows" },
      { "name": "EffectReceiptHash", "type": "BINARY(32)", "nullable": true, "label": "Effect Receipt Hash" },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)", "label": "Last Modified Date" }
    ],
    "indices": [
      { "columns": ["OperationId", "Attempt"], "primary": true }
    ]
  },
  {
    "tableName": "_System_ApplicationNavigationReceipt",
    "tableType": "system_core",
    "category": "ui",
    "label": "Application Navigation Receipt",
    "description": "Synchronous navigation mutation receipts; never a serving source",
    "requiredWritePermission": "BLOCKED",
    "requiredReadPermission": "BLOCKED",
    "columns": [
      { "name": "Id", "type": "CHAR(64)", "nullable": false, "primaryKey": true },
      { "name": "ApplicationId", "type": "VARCHAR(255)", "nullable": false },
      { "name": "ActorId", "type": "VARCHAR(255)", "nullable": false },
      { "name": "RequestDigest", "type": "CHAR(64)", "nullable": false },
      { "name": "Result", "type": "JSON", "nullable": false },
      { "name": "CreatedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)" },
      { "name": "LastModifiedDate", "type": "DATETIME(6)", "nullable": false, "default": "CURRENT_TIMESTAMP(6)" }
    ],
    "indices": [
      { "name": "idx_app_navigation_receipt_created", "columns": ["ApplicationId", "CreatedDate"] }
    ],
    "foreignKeys": [
      { "column": "ApplicationId", "references": "_System_App(Id)", "onDelete": "CASCADE" }
    ]
  }
]
