From 8872cc735d88fc1f3a5075f9e523ce42c7bddd6c Mon Sep 17 00:00:00 2001 From: Daniel Dias Branco Arthaud Date: Sun, 14 Aug 2022 20:49:53 -0300 Subject: [PATCH] Add changeset Signed-off-by: Daniel Dias Branco Arthaud --- .changeset/cold-frogs-kiss.md | 16 ++++++++++++++++ .changeset/light-beans-share.md | 16 ++++++++++++++++ .changeset/rude-books-rush.md | 9 +++++++++ 3 files changed, 41 insertions(+) create mode 100644 .changeset/cold-frogs-kiss.md create mode 100644 .changeset/light-beans-share.md create mode 100644 .changeset/rude-books-rush.md diff --git a/.changeset/cold-frogs-kiss.md b/.changeset/cold-frogs-kiss.md new file mode 100644 index 0000000000..7af9468ca1 --- /dev/null +++ b/.changeset/cold-frogs-kiss.md @@ -0,0 +1,16 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options. + +To use this new implementation you need to create the instance of `DatabaseTaskStore` using the `PluginDatabaseManager` instead of `Knex`; + +``` +import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; +import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend'; + +const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); +const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); +const databaseTaskStore = await DatabaseTaskStore.create(databaseManager); +``` diff --git a/.changeset/light-beans-share.md b/.changeset/light-beans-share.md new file mode 100644 index 0000000000..51c59ff7d0 --- /dev/null +++ b/.changeset/light-beans-share.md @@ -0,0 +1,16 @@ +--- +'@backstage/plugin-search-backend-module-pg': minor +--- + +Fixed a bug in search-backend-module-pg where it ignores the skip migration database options when using the database. + +To use this new implementation you need to create the instance of `DatabaseDocumentStore` using the `PluginDatabaseManager` instead of `Knex`; + +``` +import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; +import { DatabaseDocumentStore } from '@backstage/plugin-search-backend-module-pg'; + +const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); +const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); +const databaseDocumentStore = await DatabaseDocumentStore.create(databaseManager); +``` diff --git a/.changeset/rude-books-rush.md b/.changeset/rude-books-rush.md new file mode 100644 index 0000000000..a98e90e27e --- /dev/null +++ b/.changeset/rude-books-rush.md @@ -0,0 +1,9 @@ +--- +'@backstage/backend-tasks': patch +'@backstage/plugin-app-backend': patch +'@backstage/plugin-bazaar-backend': patch +'@backstage/plugin-code-coverage-backend': patch +'@backstage/plugin-tech-insights-backend': patch +--- + +Fixed a bug where the database option to skip migrations was ignored.