execute"DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME_PERM};"
execute"DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME_TEMP};"
end
end
remove_column(:redirect_routes,:permanent)
end
...
...
@@ -28,10 +28,10 @@ class RemovePermanentFromRedirectRoutes < ActiveRecord::Migration
add_column(:redirect_routes,:permanent,:boolean)
ifGitlab::Database.postgresql?
disable_statement_timeout
disable_statement_timeout(transaction: false)do
execute("CREATE INDEX CONCURRENTLY #{INDEX_NAME_PERM} ON redirect_routes (lower(path) varchar_pattern_ops) where (permanent);")
execute("CREATE INDEX CONCURRENTLY #{INDEX_NAME_TEMP} ON redirect_routes (lower(path) varchar_pattern_ops) where (not permanent or permanent is null) ;")