pucardotorg / dristi

MIT License
2 stars 12 forks source link

PROD Hotfix: reset CMP, CNR and ST series #2511

Open atulgupta2024 opened 1 day ago

atulgupta2024 commented 1 day ago

the first case registered in ONCourts got a CMP of CMP/49/2024. This is not correct. It should have started off with 1. Need to fix this from backend.

  1. update the case to modify the CMP
  2. reset the sequence number in our DB
  3. similarly reset the sequence number in DB for CNR and ST

This should have been handled as part of PROD clean up before go live, but it was missed. So need to handle it now.

@suresh12 @devarajd94

atulgupta2024 commented 1 day ago

can be done via either of the two options below

ALTER SEQUENCE sequence_name RESTART WITH 1;

OR

SELECT SETVAL('sequence_name', 1, false);

If CMP And CNR are already used once, then they may need to be set to a value of 2. Please check and set accordingly. @manimaarans

manimaarans commented 1 day ago

can be done via either of the two options below

ALTER SEQUENCE sequence_name RESTART WITH 1;

OR

SELECT SETVAL('sequence_name', 1, false);

If CMP And CNR are already used once, then they may need to be set to a value of 2. Please check and set accordingly. @manimaarans

Hi @atulgupta2024 , will check and make the changes , but regarding filing number are we going to let it as it is ?

atulgupta2024 commented 1 day ago

@manimaarans no change in filing number. for the CMP, CNR and ST.. let's wait for @devarajd94 to confirm the number that is currently used, unless we can find from the DB directly.

Pasam6 commented 17 hours ago

Screenshot from 2024-11-21 17-31-49 Modified the cmp and cnr value.

Note: Data in elastic search is not updated

atulgupta2024 commented 17 hours ago

@Pasam6 @manimaarans we need to ensure that we do update Elastic and more importantly update the PostgreSQL's SEQUENCE no as well. We need to ensure that the next CMP generated will be CMP/2/2024 and CNR will be KLKM520000022024

manimaarans commented 16 hours ago

Elastic search update is not done yet, we are not actively using it and will be updated automatically on next case workflow cycle, we have reset the sequence also as per comment along with resetting the cmp and cnr number for the specific case @atulgupta2024