Commit 00acdcf7 authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'cascade_drop' into 'master'

Rake drop tables with cascade

See merge request !4020
......@@ -29,7 +29,10 @@ namespace :gitlab do
tables.delete 'schema_migrations'
# Truncate schema_migrations to ensure migrations re-run
connection.execute('TRUNCATE schema_migrations')
tables.each { |t| connection.execute("DROP TABLE #{t}") }
# Drop tables with cascade to avoid dependent table errors
# PG:
# MySQL:
tables.each { |t| connection.execute("DROP TABLE #{t} CASCADE") }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment