-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add importDate to donation entity #1263
Conversation
@@ -110,7 +110,7 @@ export const createBackupDonation = async ( | |||
safeTransactionId, | |||
); | |||
const donation = (await findDonationById(Number(donationId))) as Donation; | |||
donation!.createdAt = getCreatedAtFromMongoObjectId(donationData._id); | |||
donation!.importDate = getCreatedAtFromMongoObjectId(donationData._id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep it as it is, just add a line after and set the importDate to now.
@@ -49,7 +49,7 @@ function createBackupDonationTestCases() { | |||
assert.equal(donation.status, DONATION_STATUS.PENDING); | |||
|
|||
// should use input createdAt not now time | |||
assert.equal(donation.createdAt.getTime(), 1705577862000); | |||
assert.equal(donation.importDate.getTime(), 1705577862000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, don't change this as well.
export class addImportDateToDonationEntity1706012712969 implements MigrationInterface { | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "donation" ADD COLUMN "importDate" TIMESTAMP WITH TIME ZONE`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await queryRunner.query(`ALTER TABLE "donation" ADD COLUMN "importDate" TIMESTAMP WITH TIME ZONE`); | |
await queryRunner.query(`ALTER TABLE "donation" ADD COLUMN IF NOT EXISTS "importDate" TIMESTAMP WITH TIME ZONE`); |
No description provided.