execute"DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME_PERM};"
execute"DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME_TEMP};"
end
disable_statement_timeoutdo
execute"DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME_PERM};"
execute"DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME_TEMP};"
end
remove_column(:redirect_routes,:permanent)
...
...
@@ -27,11 +25,9 @@
defdown
add_column(:redirect_routes,:permanent,:boolean)
ifGitlab::Database.postgresql?
disable_statement_timeoutdo
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) ;")
end
disable_statement_timeoutdo
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) ;")