diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-04-14 16:53:54 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-04-14 16:53:54 +0300 |
commit | a54af831bae023770bf9b2633cc45ec0d5f5a66a (patch) | |
tree | 73a49760298375202530c0cf383a4f304c2894e6 /lib/tasks | |
parent | badb35335086b90e2522ea2da767830f2f3ba9a7 (diff) |
Use rake db:reset instead of db:setup
Using db:reset ensures existing tables are first dropped. This in turn
ensures that we can drop tables regardless of any foreign key
constraints. While CE currently doesn't have any foreign keys EE defines
the following relation:
remote_mirrors.project_id -> projects.id
MySQL will complain whenever you try to drop the "projects" table first
even when using "DROP TABLE ... CASCADE".
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/setup.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake index 4cbccf2ca89..48baecfd2a2 100644 --- a/lib/tasks/gitlab/setup.rake +++ b/lib/tasks/gitlab/setup.rake @@ -14,7 +14,7 @@ namespace :gitlab do puts "" end - Rake::Task["db:setup"].invoke + Rake::Task["db:reset"].invoke Rake::Task["add_limits_mysql"].invoke Rake::Task["setup_postgresql"].invoke Rake::Task["db:seed_fu"].invoke |