From 210fcf63ee635ddfc4707a12195df5f844b380b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 2 Dec 2021 15:44:40 +0100 Subject: [PATCH] Fix Bazaar migration error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/three-news-worry.md | 5 +++++ .../bazaar-backend/migrations/20211020073922_add_columns.js | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/three-news-worry.md diff --git a/.changeset/three-news-worry.md b/.changeset/three-news-worry.md new file mode 100644 index 0000000000..24c7daa240 --- /dev/null +++ b/.changeset/three-news-worry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-bazaar-backend': patch +--- + +Handle migration error when old data is present in the database diff --git a/plugins/bazaar-backend/migrations/20211020073922_add_columns.js b/plugins/bazaar-backend/migrations/20211020073922_add_columns.js index d4cb87bd82..ea3a89ea72 100644 --- a/plugins/bazaar-backend/migrations/20211020073922_add_columns.js +++ b/plugins/bazaar-backend/migrations/20211020073922_add_columns.js @@ -29,6 +29,7 @@ exports.up = async function up(knex) { .comment('Optional end date of the project (ISO 8601 format)'); table .text('responsible') + .defaultTo('') .notNullable() .comment('Contact person of the project'); });