joinLocation() joins previews (p) with preview_locations (l) and
preview_versions (v). Both previews and preview_versions have a file_id
column, so any unqualified file_id condition is ambiguous and MySQL or
MariaDB reject the query with error 1052.
getPreviewForSpecification() built its conditions straight from the
caller's array keys, so this broke every preview save: savePreview() uses
that lookup to recover the existing row after a unique constraint
violation. getByFileId() had the same unqualified condition, while
getAvailablePreviewsForFile() next to it already used p.file_id.
Columns that come from the joined tables keep resolving to their own
alias, and keys that already carry one are passed through untouched.
The values are bound with an explicit type as well. An untyped false
binds as an empty string, which PostgreSQL rejects for a boolean column,
so qualifying the columns on their own only moved the error on that
backend.
Fixes: https://github.com/nextcloud/server/issues/63229
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>