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(date_time): add created_at and modified_at to merchant related tables #925

Merged
merged 3 commits into from
Apr 20, 2023

Conversation

NishantJoshi00
Copy link
Member

…tables

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

Description

This PR adds timestamps to the following tables

  • Customer: modified_at
  • MerchantAccount: created_at & modified_at
  • MerchantConnectorAccount: created_at & modified_at

Additional Changes

  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Migrations to be run

ALTER TABLE merchant_account
ADD COLUMN IF NOT EXISTS created_at TIMESTAMP NOT NULL DEFAULT now(),
ADD COLUMN IF NOT EXISTS modified_at TIMESTAMP NOT NULL DEFAULT now();

ALTER TABLE merchant_connector_account
ADD COLUMN IF NOT EXISTS created_at TIMESTAMP NOT NULL DEFAULT now(),
ADD COLUMN IF NOT EXISTS modified_at TIMESTAMP NOT NULL DEFAULT now();


ALTER TABLE customers
ADD COLUMN IF NOT EXISTS modified_at TIMESTAMP NOT NULL DEFAULT now();

Motivation and Context

Required for PII encryption and as sanity

How did you test it?

compiler guided

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@NishantJoshi00 NishantJoshi00 added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-database-changes Metadata: This PR involves database schema changes labels Apr 19, 2023
@NishantJoshi00 NishantJoshi00 self-assigned this Apr 19, 2023
@jarnura jarnura added S-ready-for-merge and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Apr 19, 2023
@jarnura jarnura added this pull request to the merge queue Apr 20, 2023
Merged via the queue into main with commit 1f151ba Apr 20, 2023
@SanchithHegde SanchithHegde deleted the time-for-mca branch April 21, 2023 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants