The following validation rules are available for use when packing and unpacking entity and metadata configurations.
Foreign Keys
Validates foreign keys. If, within the tested database, there is a reference to a table that does not exist, correct to ensure data integrity and proper database behavior.
Solution
Ensure entity link fields are present for all linked entities. In addition, check that foreign key references are valid.
- Missing/Incorrect Database Object Reference: A validation step to find all database objects referenced in the entities that are not referenced within a Database Objects Record. This would include views and stored procedures.
- Invalid untrusted users: Trusted user records that have moved from server to server during an entity unpacking action may have originated in a different domain. These users would have been saved to the target server as untrusted. Validation present in Aptify 5.0/SQL 2005 prevents saving untrusted users when a '\' character is present. The following user records were found on the source server which matches this condition. These user records should be removed or the user name altered to remove the '\' character.
- Unlinked Stored Procedure to Generated Entity: Generated Entity records linked to Database objects that are referenced when records are linked, updated, or deleted. These database objects are linked by name. If they are not linked, links must be created.
Entity Fields [calculated] Database Objects
Validates database objects used for calculated fields are included with the entity. These database objects should be linked to the entity through the entity's DB Objects tab.
Solution
- Verify the database object is valid for the calculated field listed.
- Go the entity's DB object tab and confirm the field's database object is listed, if not, create it manually.
Specific Entity Field Validator: The Entity Field Definition is found in the Entity Fields Entity and the Base Table for the Entity. This rule verifies that the two sets match.
Missing/Incorrect Entity Linked Object Repository Object Reference
Validates all database objects have valid Database Objects record references. Including views and stored procedures.
Solution
If the missing metadata is present in the destination database then skip the validation rule and continue packing.
- Open the entity(s) listed and go to DB Object tab.
- Verify that the linked database object is valid, if not create or link a valid database object.
The query below will help you find all linked database objects in the database.
SELECT EntityID,RepositoryObject FROM [ENTITY_DATABASE]..EntityrepObjRequirement WHERE RepositoryObject <> '' AND RepositoryObject NOT IN( SELECT p.Name + '.' + ob.Name FROM [ENTITY_DATABASE]..ObjectRepositoryObject ob INNER JOIN [ENTITY_DATABASE]..ObjectPackage p ON p.ID = ob.ObjectPackageID)
Database Objects with GRANT SQL in the SQL Text
Validates SQL and Grant SQL syntax is on separate tabs. With legacy versions, there are instances when both are included on one tab. This needs to be corrected before continuing.
Solution
- Open that database object(s) listed and check the query written under the SQL tab.
- If it contains a Grant SQL statement, copy the code from the SQL tab to the Grant SQL tab.
- Missing Base Views: Any base Views not contained within APTIFY as an Database Object Record will not be transferred. Consider creating a DB Object Record for any view found within this validation, and link it to an appropriate Entity. Otherwise, you will need to manually create the view on the destination.
- Invalid NULL Default Value for Entity Fields: Entity Fields with a numeric SQL Data Type cannot have a default value of NULL. You will need to change this value or the entity will not unpack on the destination.
- Application entity fields with blank param name: Param name is required field. Entity fields with blank param name must be identified before packing.
- Indexes not Generated by Aptify: There are some Indexes those are not created by Aptify for Non-Framework Entity and those are directly created on the database level.
- Missing Object Repository Items: A validation step to find all Object Repository objects that do not exist in the database. All icon related objects can be ignored, but all other missing items must be relinked or the reference must be removed.
- Unlinked Stored Procedures to Entity or Database Object: The Stored Procedure validation is looking for any Non-Generated database objects that are not linked to an entity or database object. Any item in this list will not be moved in the upgrade. It is recommended that these are linked or they must be moved manually.
- Base Table Not Generated on Database: Verify the Entity list present in Entity Entities but the base table is not created on the Aptify database.
- Validate Entity's Link Entities Record: The listed entities have failed validation due to missing Linked Entities records. Please ensure the listed Linked Entities are present in the destination server before unpacking the entities.