From 66252adac1426fbe0b5f799798e415c758f31aaa Mon Sep 17 00:00:00 2001 From: Santhosh Nagaraj S Date: Fri, 20 May 2022 17:35:49 +0530 Subject: [PATCH] docs: Add docs for migrating to older version this patch adds documentation for migrating to a older version of Nebraska. Signed-off-by: Santhosh Nagaraj S --- docs/migrate-to-older-version.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/migrate-to-older-version.md diff --git a/docs/migrate-to-older-version.md b/docs/migrate-to-older-version.md new file mode 100644 index 000000000..700dd7022 --- /dev/null +++ b/docs/migrate-to-older-version.md @@ -0,0 +1,21 @@ +--- +title: Migrating to older version of Nebraska. +weight: 11 +--- + + +When migrating down to an older version of Nebraska one might have to rollback database migrations that were applied as a part of the release. + +First get the migrations that were part of the version that you want to downgrade to using the following command. + +> git show :./backend/pkg/api/db/migrations | tail -n1 + +For example to find the migrations that were part of `2.4.0` release clone the Nebraska repo and run. + +> git show 2.4.0:../backend/pkg/api/db/migrations | tail -n1 +> +> 0013_add_stats_indexes.sql + +To rollback to 0013_add_stats_indexes.sql use the following command + +> /nebraska/nebraska --rollback-db-to 0013