Fix ambiguous column errors when sorting dashboard with a CTE
In https://gitlab.com/gitlab-org/gitlab/merge_requests/23754 and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24408, we added a CTE optimization fence to ensure loading a user's projects is always fast when the `/dashboard/projects` path is loaded. However, when sorting by a different column type (e.g. last created), PostgreSQL would raise an ambiguous column error because it wasn't clear which `created_at` column was needed. To fix this problem, we should be explicit that we want to order by `projects.created_at`. Foo
Showing
Please register or sign in to comment