Skip to content

Commit

Permalink
[TECH] Ajout d'une colonne pour enregistrer la reconciliation candidat (
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Sep 19, 2024
2 parents 597abc4 + 7a491f7 commit 3c3798e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const buildCertificationCandidate = function ({
prepaymentCode = null,
hasSeenCertificationInstructions = false,
accessibilityAdjustmentNeeded = false,
reconciliatedAt = null,
} = {}) {
sessionId = _.isUndefined(sessionId) ? buildSession().id : sessionId;
userId = _.isUndefined(userId) ? buildUser().id : userId;
Expand Down Expand Up @@ -56,6 +57,7 @@ const buildCertificationCandidate = function ({
prepaymentCode,
hasSeenCertificationInstructions,
accessibilityAdjustmentNeeded,
reconciliatedAt,
};

databaseBuffer.pushInsertable({
Expand Down Expand Up @@ -87,6 +89,7 @@ const buildCertificationCandidate = function ({
prepaymentCode,
hasSeenCertificationInstructions,
accessibilityAdjustmentNeeded,
reconciliatedAt,
};
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const TABLE_NAME = 'certification-candidates';
const COLUMN_NAME = 'reconciliatedAt';

const up = async function (knex) {
await knex.schema.table(TABLE_NAME, function (table) {
table.dateTime(COLUMN_NAME).nullable().defaultTo(null);
});
};

const down = async function (knex) {
await knex.schema.table(TABLE_NAME, function (table) {
table.dropColumn(COLUMN_NAME);
});
};

export { down, up };
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ describe('Integration | Certification | Session | Repository | Candidate', funct
complementaryCertificationKey: 'Chose',
},
],
reconciliatedAt: null,
};
databaseBuilder.factory.buildSession({ id: candidateData.sessionId });
databaseBuilder.factory.buildComplementaryCertification({ id: 22, label: 'Quelque', key: 'Chose' });
Expand Down

0 comments on commit 3c3798e

Please sign in to comment.