Notifications

13 views

Description

If a table is extended and the APIs TableUtils.dropAndClean or TableUtils.dropTableAndExtensions are used to drop it, broken orphan records will remain in the extended table.
Unique Key Violation Errors may occur when attempting to re-create the dropped table and import these records again. These records will not be accessible from the UI and can only be removed by SN Support engineers from the database directly.

Steps to Reproduce

1. Create a custom table extended from sys_metadata.
2. Create a few new records.
3. Navigate to /sys_metadata_list.do?sysparm_query=sys_class_name=<table_name>.
4. Observe there are records which are accessible.
5. Drop the table using a script like the following:
doDropTable("<table_name>", true);
function doDropTable(table_name, debug){
var table = new global.TableUtils(table_name); // Creates an instance of a TableUtils class.
gs.debug(table_name+" exists? " + table.tableExists());
if (!debug) {
table.dropAndClean(table_name); // Drops a database table and cleans up references to the table
gs.debug(table_name+" exists? " + table.tableExists());
}
}
6. Navigate to /sys_metadata_list.do?sysparm_query=sys_class_name=<table_name>.
7. Observe these records are still present but can not be opened or deleted.

Workaround

This problem is under review and targeted to be fixed in a future release. To receive notifications when more information becomes available, subscribe to this Known Error article by clicking the Subscribe button at the top right of this form.

 


Related Problem: PRB1236062

Seen In

SR - ITOM - CMDB CI Class Models - 201908

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-01-27 10:57:49
Published:2020-01-23