From de93bf1fbbd091075ef7ebafb2ab9dabc2e6563c Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Tue, 25 Jun 2019 10:28:18 -0700 Subject: Update comments and docs around min schema version Fixed some spelling Dropped rake task description for a prefix only task Added note on skipping the check to the postgres debugging dev doc --- doc/development/database_debugging.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/development') diff --git a/doc/development/database_debugging.md b/doc/development/database_debugging.md index 68d33a9d8e0..de2c5b43411 100644 --- a/doc/development/database_debugging.md +++ b/doc/development/database_debugging.md @@ -85,3 +85,21 @@ eric 37709 0.0 0.0 2518640 7524 s006 S Wed11AM 0:00.79 s $ kill 87304 $ kill 37709 ``` + +### db:migrate `database version is too old to be migrated` error + +Users receive this error when `db:migrate` detects that the current schema version +is older than the `MIN_SCHEMA_VERSION` defined in the `Gitlab::Database` library +module. + +Over time we cleanup/combine old migrations in the codebase, so it is not always +possible to migrate GitLab from every previous version. + +In some cases you may want to bypass this check. For example, if you were on a version +of GitLab schema later than the `MIN_SCHEMA_VERSION`, and then rolled back the +to an older migration, from before. In this case, in order to migrate forward again, +you should set the `SKIP_SCHEMA_VERSION_CHECK` environment variable. + +```sh +bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true +``` -- cgit v1.2.3