Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ORV2-2857 - Update DDL model of Receipt and Transaction #1647

Closed

Conversation

praju-aot
Copy link
Collaborator

@praju-aot praju-aot commented Oct 21, 2024

Description

Please provide a summary of the change and the issue fixed. Please include relevant context. List dependency changes.

Update the relation and data model of ORBC_RECEIPT and ORBC_TRANSACTION to facilitate refund to multiple payment methods.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Docker scripts

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are promoted to:


IF @@ERROR <> 0 SET NOEXEC ON
GO
AlTER TABLE [permit].[ORBC_RECEIPT_HIST] ALTER COLUMN [TRANSACTION_ID] [bigint] NOT NULL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail if there were any purchases / refunds in between when the update and revert script ran. Maybe we keep it NULLable once it's been set as such in the history table? Low chance of this occurring but still a possibility then it would be a real problem.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am planning to request downtime just to be on the safe side

DECLARE @VersionDescription VARCHAR(255)
SET @VersionDescription = 'Reverting addition of RECEIPT_ID col to ORBC_TRANSACTION and dropping TRANSACTION_ID from ORBC_RECEIPT.'

INSERT [dbo].[ORBC_SYS_VERSION] ([VERSION_ID], [DESCRIPTION], [RELEASE_DATE]) VALUES (45, @VersionDescription, getutcdate())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to keep this inside the transaction - I'd follow the pattern of v_38_ddl_revert.sql

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, this should technically work as-is though it doesn't have the user message output like v_38, and nice to keep to a minimum number of different patterns

Copy link

sonarcloud bot commented Nov 8, 2024

Copy link

sonarcloud bot commented Nov 8, 2024

Copy link

sonarcloud bot commented Nov 8, 2024

Copy link

sonarcloud bot commented Nov 8, 2024

Copy link

sonarcloud bot commented Nov 8, 2024

Quality Gate Failed Quality Gate failed for 'onroutebc vehicles'

Failed conditions
2.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@praju-aot praju-aot closed this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants