summaryrefslogtreecommitdiff
path: root/doc/development/database_debugging.md
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-11-17 14:43:10 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-11-17 14:43:10 +0000
commitaf2981dd3d058f3ad38de7f2e885c4be5e8c2590 (patch)
tree6cf905c3f46dffbdfc031239eb64cb39aa8951ee /doc/development/database_debugging.md
parent31cb9befe8549ae9f82ed9267712351ed279cd2c (diff)
parente68ee8af4d981cb7b83fae76c0a94059add495fb (diff)
downloadgitlab-ce-40016-log-header.tar.gz
Merge branch 'master' into 40016-log-header40016-log-header
* master: (21 commits) Changing OAuth lookup to be case insensitive Delete orphaned fork networks in a migration Delete the fork network when removing the last membership Resolve "Performance issues when loading large number of wiki pages" Exports a couple of project related code as es6 modules Fix go-import meta data when enabled_git_access_protocol is a blank string Add dropdowns documentation Convert migration to populate latest merge request ID into a background migration Set 0.69.0 instead of latest for codeclimate image Fix hashed storage with project transfers to another namespace De-duplicate background migration matchers defined in spec/support/migrations_helpers.rb Update database_debugging.md Update database_debugging.md Move installation of apps higher Change to Google Kubernetes Cluster and add internal links Add Ingress description from official docs Add info on creating your own k8s cluster from the cluster page Add info about the installed apps in the Cluster docs Update HA README.md to clarify GitLab support does not troubleshoot DRBD. Optimise getting the pipeline status of commits ...
Diffstat (limited to 'doc/development/database_debugging.md')
-rw-r--r--doc/development/database_debugging.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/development/database_debugging.md b/doc/development/database_debugging.md
index 4acfbef3020..50eb8005b44 100644
--- a/doc/development/database_debugging.md
+++ b/doc/development/database_debugging.md
@@ -9,18 +9,24 @@ An easy first step is to search for your error in Slack or google "GitLab <my er
Available `RAILS_ENV`
- - `production` (not sure if in GDK)
+ - `production` (generally not for your main GDK db, but you may need this for e.g. omnibus)
- `development` (this is your main GDK db)
- `test` (used for tests like rspec and spinach)
## Nuke everything and start over
-If you just want to delete everything and start over,
+If you just want to delete everything and start over with an empty DB (~1 minute):
- - `bundle exec rake db:drop RAILS_ENV=development`
- - `bundle exec rake db:setup RAILS_ENV=development`
+ - `bundle exec rake db:reset RAILS_ENV=development`
+If you just want to delete everything and start over with dummy data (~40 minutes). This also does `db:reset` and runs DB-specific migrations:
+
+ - `bundle exec rake dev:setup RAILS_ENV=development`
+
+If your test DB is giving you problems, it is safe to nuke it because it doesn't contain important data:
+
+ - `bundle exec rake db:reset RAILS_ENV=test`
## Migration wrangling