Each Record should have a primary key - M_ProductPrice

Description

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.

Environment

None

Attachments

3

Activity

Show:

Carlos Ruiz May 25, 2023 at 5:31 PM

This won’t be necessary anymore with the development of IDEMPIERE-5567

Murilo Habermann Torquato January 12, 2016 at 9:35 PM

Hi Carlos,

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:

Carlos Ruiz October 16, 2015 at 3:20 PM

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.

Chuck Boecking October 8, 2015 at 9:37 PM

Carlos,

  1. I have updated the migrations scripts per your feedback.

  2. I checked the oracle syntax for the two commands I added to the Oracle migration script (NOT TESTED)

  3. I added the unique constraint through the dictionary per advice

  4. 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.

Chuck

Carlos Ruiz October 7, 2015 at 1:00 PM

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

Fixed

Details

Assignee

Reporter

Priority

Created September 15, 2015 at 2:15 PM
Updated May 25, 2023 at 5:31 PM
Resolved January 27, 2016 at 6:56 PM