Pat,
I have done this sort of thing a lot over the years. When there are changes
involving deleting and reusing tables I've found it's easier to open the
data file in the old developer structure and manipulate the data there. I'm
not sure how it will work to add tables that exist in the new structure to
the old structure. They may not be recognized as belonging to the table
with the same name in the new structure because the UUID is different. In
that case the best solution may be to export the data from tables that were
heavily modified from the old structure. I would write a custom export
method in the old structure to transform the data into the format the new
structure expects, export it and import into the new one. I find doing the
transforms in the old structure easier.

Some things I'm sure you know already and assuming a large datafile: turn
off indexes as much as you can. If you use triggers heavily you can bypass
them with a semaphore set by the importing method. This allows you to
preserve things like mod dates plus greatly speed up the import process.

On Fri, Jun 15, 2018 at 4:31 AM Pat Bensky via 4D_Tech <[email protected]>
wrote:

> Chuck,
> Hmmm. this is a one-off exercise so I would prefer not to do some special
> programming. I would like to understand what's going on in the database
> though!
> Thanks
> Pat
>
> On Fri, 15 Jun 2018 at 02:51, Chuck Miller via 4D_Tech <
> [email protected]>
> wrote:
>
> > How about using sql to bring data from old database into new one
> >
> > Regards
> >
> > Chuck
> >
> > Sent from my iPhone
> >
> > > On Jun 14, 2018, at 8:36 PM, Pat Bensky via 4D_Tech <
> > [email protected]> wrote:
> > >
> > > I'm updating a client's database from an old version of my app, in 4D
> > v12,
> > > to the latest version, using v16. There have been various modifications
> > to
> > > the structure in between the version they are using and the current
> > > version. Tables have been added, deleted, repurposed. The result is
> that
> > > when the database is opened in the v16 version, some of the tables are
> > lost.
> > >
> > > I figured out that I should be able to fix this by using GET MISSING
> > TABLE
> > > NAMES and REGENERATE MISSING TABLE.
> > >
> > > But some of the missing table names are the same as some "live" table
> > names
> > > in the updated structure.
> > > So I changed the names of those tables in the old structure by adding
> > "_x"
> > > to each one. e.g. "data_61" becomes "data_61_x" etc.
> > >
> > > However, after opening the database in the updated (v16) structure, the
> > > missing table names list shows the ORIGINAL table names, not the
> MODIFIED
> > > ONES! "data_61_x" has reverted to "data_61", etc. So if I try to use
> > > REGENERATE MISSING TABLE, nothing happens because there is already a
> > table
> > > with that name.
> > >
> > > ​Any ideas about this?
> > > Pat​
> > >
> > > --
> > > *************************************************
> > > CatBase - Top Dog in Data Publishing
> > > tel: +44 (0) 207 118 7889
> > > w: http://www.catbase.com
> > > skype: pat.bensky
> > > *************************************************
> > > **********************************************************************
> > > 4D Internet Users Group (4D iNUG)
> > > FAQ:  http://lists.4d.com/faqnug.html
> > > Archive:  http://lists.4d.com/archives.html
> > > Options: https://lists.4d.com/mailman/options/4d_tech
> > > Unsub:  mailto:[email protected]
> > > **********************************************************************
> >
> > **********************************************************************
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:[email protected]
> > **********************************************************************
>
>
>
> --
> *************************************************
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************



-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to