From a54af831bae023770bf9b2633cc45ec0d5f5a66a Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 14 Apr 2016 15:53:54 +0200 Subject: 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". --- bin/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/setup') diff --git a/bin/setup b/bin/setup index acdb2c1389c..6cb2d7f1e3a 100755 --- a/bin/setup +++ b/bin/setup @@ -18,7 +18,7 @@ Dir.chdir APP_ROOT do # end puts "\n== Preparing database ==" - system "bin/rake db:setup" + system "bin/rake db:reset" puts "\n== Removing old logs and tempfiles ==" system "rm -f log/*" -- cgit v1.2.3