Each Record should have a primary key: Primary keys are needed to audit changes in the database. That is needed for pricing.
We dont think that we need primary keys for Storage (too much overhead) and not for translations. There are some more tables to think about.
Thank you for the feedback. I updated the migration scripts to remove the ad_treenode references. I updated the SQL to reflect your advice. Will you please test the "Primary Key Steps V2.sql" on an oracle machine to make sure the syntax does not throw an error?
After you give the thumbs up on the oracle syntax, I will copy "Primary Key Steps V2.sql" into each of the migrations files, and perform on last round of testing on a new system to ensure the patch and scripts work as expected.
Hi , the oracle syntax is slightly different for alter table.
I think easiest way is to generate migration script this way:
add the M_ProductPrice_ID as an ID reference
then change the column to be the primary key
in the migration script you add the update nextidfunc in the middle (***)
then you create the unique index for the previous pkey columns - defining it in the dictionary
I have updated the migrations scripts per your feedback.
I checked the oracle syntax for the two commands I added to the Oracle migration script (NOT TESTED)
I added the unique constraint through the dictionary per advice
I tested on postgresql per the above text matrix. All Passed
Will you please execute the oracle script against an Oracle instance? Once Oracle is tested, this ticket is ready for release.
Thanks , I committed the fixes for this ticket and my peer review.
Closing this ticket for M_ProductPrice - if there are more tables that you want to work please open specific ticket for each.
I found a small mistake on this Issue. The M_ProductPrice_ID is always being passed as 0 to the X_ class constructor:
It should be: