On Tue, Oct 24, 2017 at 11:49 AM, Ronnie Teo via 4D_Tech <
[email protected]> wrote:
>
>
> Need to seek some advice in converting a client’s database from v11 to v15.
>
> For one of the tables, 4D reported that the primary key contains NULL
> values upon conversion or that the primary key contains duplicate values.


Ronnie,

In such case it is simpler to write method that checks content of  the
primary Key in v11. To fill empty or non-existent values are simple, jsut
assign new UUID.

Duplicates may be bigger problem, there was a bug in 4D where, for
self-asigned UUID, when 4D duplicated record, it duplicated UUID field and
did not generated new UUID. You will have to find and fix it. In my case, I
was able to find all duplicated records and check uniqueness of primary key.


> The primary key was defined to be a UUID-type value.
>
> So if some of the records are blank for the primary key, how do we proceed
> from there?
> Also, if 4Dv15 is assigning the primary key when the database is first
> launched, how could it have generated duplicate values?
>

It should not, but 4D generates UUID values only for fields that were
created by migration assistant. Fields that already existed in previous
version are not changed.

>
>
> Is there an option to get 4D to re-generate the primary key field again
> for that table?
>
> Failing that, is there an option to instruct 4D to ignore and not track
> those tables?
>

Yes, if you open uncompiled database as designer, you can proceed and work
with the DB. This way, you can write method that checks / replaces PK in 4D
v15.


--

Peter Bozek
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to