summaryrefslogtreecommitdiff
path: root/doc/development/mass_insert.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-29 15:06:43 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-29 15:06:43 +0000
commiteac0da9a47f0c7b8b970833d7d5b96cfee057bf7 (patch)
tree7b7865053435c6dcb4e2d945fcf45e309331c91b /doc/development/mass_insert.md
parentb860c6ba2607541e3b5bdf0fc2daaa9ed41a8726 (diff)
downloadgitlab-ce-eac0da9a47f0c7b8b970833d7d5b96cfee057bf7.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/mass_insert.md')
-rw-r--r--doc/development/mass_insert.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/development/mass_insert.md b/doc/development/mass_insert.md
new file mode 100644
index 00000000000..891ce0db87d
--- /dev/null
+++ b/doc/development/mass_insert.md
@@ -0,0 +1,13 @@
+# Mass Inserting Rails Models
+
+Setting the environment variable [`MASS_INSERT=1`](rake_tasks.md#env-variables)
+when running `rake setup` will create millions of records, but these records
+aren't visible to the `root` user by default.
+
+To make any number of the mass-inserted projects visible to the `root` user, run
+the following snippet in the rails console.
+
+```ruby
+u = User.find(1)
+Project.last(100).each { |p| p.set_create_timestamps && p.add_maintainer(u, current_user: u) } # Change 100 to whatever number of projects you need access to
+```