Welcome!

This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!

0

1
Carlos Nogueira
Ligar 05/09/19, 12:01

Primary key type change is a tricky change. This is valid for any type change, not only the primary keys:

Client data might not be compatible with the new type, for the fields that directly changed its type and for those that are dependent (by formula, procedure, etc...), so mapping scripts will be necessary.

In fact, only a few cases are compatible with changing the type. (i.e: string is not compatible to int if the string has anything in its context that's not integer or space)

So, with this in mind, might as well take safe measures to ensure the client data is not lost. First thing: Backup.

Now for primary keys:

There will be the need to map things from the older value to the new value, where the primary keys are being used in other tables (foreign keys). So in each table, as a golden rule: its recommended to have a new field that has the old value, so mapping can be done by script.

Other things to consider (in Genio or final data) are the other fields that use the ones that changed its type, that might require some adjustments (formulas, replicas, manual code, views, procedures, triggers, etc...)

 


Keep Informed

About the Community

This platform is for beginners and experts willing to share their Genio knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers. Read Guidelines

Question tools

6 follower(s)

Stats

Asked: 20/08/19, 13:51
Seen: 1256 times
Last updated: 03/10/19, 16:07