Re: Migrating from exposed, compund PKs to single-column db generated keys

2020-07-09 Thread Hugi Thordarson
Hi Michael! > On 9 Jul 2020, at 14:20, Michael Gentry wrote: > > Hi Hugi, > > Are the legacy systems that are accessing this DB doing inserts? If so, > check if the DB has a way to do an automatic generated PK for that column's > value if it is null upon insert. If the inserts are only done f

Re: Migrating from exposed, compund PKs to single-column db generated keys

2020-07-09 Thread Michael Gentry
Hi Hugi, Are the legacy systems that are accessing this DB doing inserts? If so, check if the DB has a way to do an automatic generated PK for that column's value if it is null upon insert. If the inserts are only done from the Cayenne-based system, you'll be OK there. Not sure if there'd be up

Migrating from exposed, compund PKs to single-column db generated keys

2020-07-09 Thread Hugi Thordarson
Hi all, I'm currently in the progress of migrating an old DB schema from using exposed meaningful PKs to using db generated (serial) surrogate PKs. However, some legacy systems still use the same DB, so my new PKs will have to coexist alongside the older ones for a while. My current plan: - Eac