Skip to content

Commit adf10d6

Browse files
[TECH] Documenter la variable d'env SEEDS_CONTEXT
#10447
2 parents 2fb2bd9 + a225d4b commit adf10d6

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

api/db/seeds/seed.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const seed = async function (knex) {
5656
await team1dDataBuilder(databaseBuilder);
5757
}
5858

59-
if (hasToSeed.content) {
59+
if (hasToSeed.contenu) {
6060
logger.info('Seeding : Contenu');
6161
await teamContenuDataBuilder({ databaseBuilder });
6262
}
@@ -84,7 +84,7 @@ function _buildContextToSeed(params) {
8484
devcomp: true,
8585
acces: true,
8686
junior: true,
87-
content: true,
87+
contenu: true,
8888
certification: true,
8989
evaluation: true,
9090
};
@@ -95,7 +95,7 @@ function _buildContextToSeed(params) {
9595
devcomp: false,
9696
acces: false,
9797
junior: false,
98-
content: false,
98+
contenu: false,
9999
certification: false,
100100
evaluation: false,
101101
};
@@ -105,9 +105,9 @@ function _buildContextToSeed(params) {
105105
if (seedContext === 'DEVCOMP') hasToSeed.devcomp = true;
106106
if (seedContext === 'JUNIOR') hasToSeed.junior = true;
107107
if (seedContext === 'ACCES') hasToSeed.acces = true;
108-
if (seedContext === 'CONTENT') hasToSeed.content = true;
109-
if (seedContext === 'CERTIF') hasToSeed.certification = true;
110-
if (seedContext === 'EVAL') hasToSeed.evaluation = true;
108+
if (seedContext === 'CONTENU') hasToSeed.contenu = true;
109+
if (seedContext === 'CERTIFICATION') hasToSeed.certification = true;
110+
if (seedContext === 'EVALUATION') hasToSeed.evaluation = true;
111111
});
112112

113113
return hasToSeed;

api/sample.env

+12
Original file line numberDiff line numberDiff line change
@@ -1028,3 +1028,15 @@ TEST_IMPORT_STORAGE_BUCKET_NAME=pix-import-test
10281028
# type: string
10291029
# sample: EMAIL_VALIDATION_DEMAND_TEMPORARY_STORAGE_LIFESPAN=3d
10301030
EMAIL_VALIDATION_DEMAND_TEMPORARY_STORAGE_LIFESPAN=3d
1031+
1032+
# =====
1033+
# SEEDS
1034+
# =====
1035+
1036+
# Database seeds environment context
1037+
#
1038+
# presence: optional
1039+
# type: string (any in "PRESCRIPTION", "DEVCOMP", "JUNIOR", "ACCES", "CONTENU", "CERTIFICATION", "EVALUATION")
1040+
# default: "PRESCRIPTION|DEVCOMP|JUNIOR|ACCES|CONTENU|CERTIFICATION|EVALUATION"
1041+
# sample: SEEDS_CONTEXT="EVALUATION|DEVCOMP"
1042+
# SEEDS_CONTEXT="PRESCRIPTION|DEVCOMP|JUNIOR|ACCES|CONTENU|CERTIFICATION|EVALUATION"

0 commit comments

Comments
 (0)