Pikbase Docs
Open console (opens the console)
Esc

Type to search.

Build

updateEntityDef() — Schema Manager

Change the metadata of an existing data table.

Contract source@gsb-core/mcp-docs:getDefDocs("updateEntityDef")

Updates an existing entity definition with new schema information.

Request Format

updateEntityDef(
    entityDef: GsbEntityDef,  // Entity definition object with ID
    token: string,           // Authentication token
    tenantCode?: string      // Optional tenant code
): Promise<{
    success: boolean,
    data?: boolean,          // Success status
    error?: string
}>

Important Notes

  • The id field in the entityDef object is required for updates
  • Only the fields provided in the entityDef object will be updated
  • To update properties, use the dedicated property management methods

Response Format

{
    "success": boolean,
    "data": boolean,        // True if update was successful
    "error": "string"      // Present only if success is false
}

Example

const entityDef = {
  id: "12345",             // Required for update
  title: "Updated Customer Information",
  description: "Updated customer data storage"
};

const result = await updateEntityDef(entityDef, "your-auth-token");

Schema Evolution

When updating entity definitions:

  1. Changing name or dbTableName will rename the database table
  2. Setting isActive: false will disable operations on the entity
  3. Updating publicAccess will change security settings
  4. Modifying activityLogLevel will change audit trail behavior

Be careful when updating entity definitions in production systems, as some changes may affect existing data or application behavior.