From 73f2e2e739a464efd2466565ef043330565309e0 Mon Sep 17 00:00:00 2001 From: Laura Bergoens Date: Wed, 20 Nov 2024 16:58:41 +0100 Subject: [PATCH] add missions table Co-authored-by: Nicolas Lepage --- ...349_create-learningcontent-schema-and-tables.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/db/migrations/20241120132349_create-learningcontent-schema-and-tables.js b/api/db/migrations/20241120132349_create-learningcontent-schema-and-tables.js index 235b1a3c292..a5b5bf6ff9b 100644 --- a/api/db/migrations/20241120132349_create-learningcontent-schema-and-tables.js +++ b/api/db/migrations/20241120132349_create-learningcontent-schema-and-tables.js @@ -115,6 +115,20 @@ const up = async function (knex) { table.text('link'); table.string('locale'); }); + await knex.schema.withSchema(SCHEMA_NAME).createTable('missions', function (table) { + table.string('id').primary(); + table.string('status'); + table.jsonb('name_i18n'); + table.jsonb('content'); + table.jsonb('learningObjectives_i18n'); + table.jsonb('validatedObjectives_i18n'); + table.string('introductionMediaType'); + table.text('introductionMediaUrl'); + table.jsonb('introductionMediaAlt_i18n'); + table.text('documentationUrl'); + table.text('cardImageUrl'); + table.string('competenceId').references('id').inTable(`${SCHEMA_NAME}.competences`); + }); }; const down = function (knex) {