mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-14 15:16:04 +10:00
Merge branch 'fix-issue-15259-postgresql' into 'master'
Properly quote table name in Rake task for MySQL and PostgreSQL compatibility !4318 broke the gitlab:db:drop_tables functionality for PostgreSQL. Closes #15259 See merge request !4577
This commit is contained in:
@@ -34,7 +34,7 @@ namespace :gitlab do
|
||||
# PG: http://www.postgresql.org/docs/current/static/ddl-depend.html
|
||||
# MySQL: http://dev.mysql.com/doc/refman/5.7/en/drop-table.html
|
||||
# Add `IF EXISTS` because cascade could have already deleted a table.
|
||||
tables.each { |t| connection.execute("DROP TABLE IF EXISTS `#{t}` CASCADE") }
|
||||
tables.each { |t| connection.execute("DROP TABLE IF EXISTS #{connection.quote_table_name(t)} CASCADE") }
|
||||
end
|
||||
|
||||
desc 'Configures the database by running migrate, or by loading the schema and seeding if needed'
|
||||
|
||||
Reference in New Issue
Block a user