Routines for cmig.kb


CheckSybaseDatabase

File Name

cmig.kb

Syntax

CheckSybaseDatabase: Integer

Parameters

None

Returns

-2 - user needs to apply Sybase EBF for BugID 39160 or rename/drop PEOPLE table out of the way.

-1 - unable to determine if PEOPLE table exists. Allows user to choose to continue or not.

1 - user does not have Sybase version 10 database or doesn't have a PEOPLE table in the database.

Side Effects

None

Description

This function determines if the user has a Sybase version 10 or version 11 database. With sybase version 10, the migration fails if there is already an existing PEOPLE table even if it does not belong to the current user (Sybase BugID 39160). Upgrading to Sybase 11 or renaming/dropping the PEOPLE table solves the problem.

Dialog Forms Called

None


CreateEFMTables

File Name

cmig.kb

Syntax

CreateEFMTables: BOOLEAN

Parameters

None

Returns

FALSE if DEFAULT_ORG has not been added to the ORG_MEMBERSHIP table.

TRUE if DEFAULT_ORG has been added to the ORG_MEMBERSHIP table.

Side Effects

None

Description

This function queries the database to determine if the DEFAULT_ORG field is already on the ORG_MEMBERSHIP table. If the DEFAULT_ORG field is on the ORG_MEMBERSHIP table, then the Asset tables that have been incorporated into the Common tables have not yet been created and need to be.

Dialog Forms Called

None


CreateProfileTables

File Name

cmig.kb

Syntax

CreateProfileTables: BOOLEAN

Parameters

None

Returns

FALSE if the PROFILE tables do not need to be built,

TRUE if the PROFILE tables do need to be built

Side Effects

None

Description

This function queries the database to determine if the PROFILE tables have already been built. The PROFILE table is new to 6.0. If it has not been created yet, then all of the new objects for the Common tables have not been created yet.

Dialog Forms Called

None


CreateSLATables

File Name

cmig.kb

Syntax

CreateSLATables: BOOLEAN

Parameters

None

Returns

FALSE if the SLA tables do not need to be built,

TRUE if the SLA tables do need to be built

Side Effects

None

Description

This function queries the database to determine if the SLA tables have already been built.

Dialog Forms Called

None


CreateWebTables

File Name

cmig.kb

Syntax

CreateWebTables: BOOLEAN

Parameters

None

Returns

TRUE if the EWEB_ORG_RIGHTS table exists,

FALSE if the EWEB_ORG_RIGHTS table does not exist

Side Effects

None

Description

This function queries the database to determine if the EWEB_ORG_RIGHTS table is in the database. If the table does not exist, then create the EWEB_ORG_RIGHTS and EWEB_USER_RIGHTS tables.

Dialog Forms Called

None


DropPKeyConstraint_Informix

File Name

cmig.kb

Syntax

DropPKeyConstraint_Informix: BOOLEAN

Parameters

None

Returns

None

Side Effects

None

Description

Informix does not allow primary keys to be removed from tables without knowing the primary key constraint name. Some tables with primary keys have been created without a constraint name and the primary key needs to be modified. This function determines the primary key constraint name by querying Informix and then drops the primary key. Later in the migration scripts, the primary key constraint is recreated.

Dialog Forms Called

None


DropPKeyConstraint_MSSQLS

File Name

cmig.kb

Syntax

DropPKeyConstraint_MSSQLS: BOOLEAN

Parameters

None

Returns

None

Side Effects

None

Description

SQL Server does not allow primary keys to be removed from tables without knowing the primary key constraint name. Some tables with primary keys have been created without a constraint name and the primary key needs to be modified. This function determines the primary key constraint name by querying SQL Server and then drops the primary key. Later in the migration scripts, the primary key constraint is recreated.

Dialog Forms Called

None


DropPKeyConstraint_SYBASE

File Name

cmig.kb

Syntax

DropPKeyConstraint_SYBASE

Parameters

None

Returns

None

Side Effects

None

Description

Sybase does not allow primary keys to be removed from tables without knowing the primary key constraint name. Some tables with primary keys have been created without a constraint name and the primary key needs to be modified. This function determines the primary key constraint name by querying Sybase and then drops the primary key. Later in the migration scripts, the primary key constraint is recreated.

Dialog Forms Called

None


Eweb1Exists

File Name

cmig.kb

Syntax

Eweb1Exists: BOOLEAN

Parameters

None

Returns

TRUE if the EW_USERS table exists,

FALSE if the EW_USERS table doesn't exist

Side Effects

None

Description

This function queries the database to determine if the EW_USERS table is in the database. If the table exists, then migrate the data in this table into the EWEB_USER_RIGHTS table.

Dialog Forms Called

None


EwebLocRightsExists

File Name

cmig.kb

Syntax

EwebLocRightsExists: BOOLEAN

Parameters

None

Returns

FALSE if the EWEB_LOC_RIGHTS table existed,

TRUE if the EWEB_LOC_RIGHTS table existed

Side Effects

None

Description

If the EWEB_LOC_RIGHTS table exists, and if there is data in that table, then the data in this table must be migrated into the EWEB_ORG_RIGHTS table.

Dialog Forms Called

None


ExecuteMigration

File Name

cmig.kb

Syntax

ExecuteMigration(VAL w: WINDOW): INTEGER

Parameters

w - window

Returns

None

Side Effects

None

Description

This function launches a dialog box that displays the status of the migration and allows the user to stop the migration. The data in the EWEB_LOC_RIGHTS table is migrated into the EWEB_ORG_RIGHTS table and the user passwords are encrypted.

Dialog Forms Called

cbuild.dfc[mig]


OrgIsChar

File Name

cmig.kb

Syntax

OrgIsChar: BOOLEAN

Parameters

None

Returns

TRUE if the ORGANIZATION_ID field on the ORGANIZATION table is of type CHAR,

FALSE if the ORGANIZATION_ID field on the ORGANIZATION tabl is not CHAR

Side Effects

None

Description

This function returns a TRUE if the ORGANIZATION_ID is of type CHAR. FALSE, otherwise. If TRUE, then the organization_id fields must be converted from CHAR to VARCHAR2 throughout the entire database.

Dialog Forms Called

None


PasswordExists

File Name

cmig.kb

Syntax

PasswordExists: BOOLEAN

Parameters

None

Returns

TRUE if there are passwords in the USERS table,

FALSE if there are no passwords in the USERS table

Side Effects

None

Description

This function queries the USERS table in the database to determine if the USER_PASSWORD field has data. If this field has data, then the passwords need to be encrypted.

Dialog Forms Called

None


RemoveDupSystemActions

File Name

cmig.kb

Syntax

RemoveDupSystemActions: BOOLEAN

Parameters

None

Returns

None

Side Effects

None

Description

This function removes duplicate system actions that may have been created with previous versions of the build. With the 6.0 release, the action_name on the system_actions table is made unique and duplicate actions must be removed.

Dialog Forms Called

None


UpdateNotifyID

File Name

cmig.kb

Syntax

UpdateNotifyID: BOOLEAN

Parameters

None

Returns

None

Side Effects

None

Description

This function completes the migration for the NOTIFY_USER_GROUP table and sets the NOTIFY_ID field to an opaque ID. Originally, this was part of the EA 3.5 to EA 5.0 migration. It has moved to the Common table migration for 6.0.

Dialog Forms Called

None


UserSiteExists

File Name

cmig.kb

Syntax

UserSiteExists: BOOLEAN

Parameters

None

Returns

FALSE if the USERS table already has a SITE_ID field,

TRUE if the USERS table does not have a SITE_ID field

Side Effects

None

Description

This function queries the database to determine if the SITE_ID field is already on the USERS table. If SITE_ID is already on the USERS table, then the DDM tables were created with 5.0. If not, the DDM tables/objects that have been incorporated into the common tables need to be created.

Dialog Forms Called

None