{ "db_name": "PostgreSQL", "query": "\n\t\tinsert into project_attribution_files (\n\t\t\tgroup_id,\n\t\t\tname,\n\t\t\tsha1,\n\t\t\tmoderation_external_license_id\n\t\t)\n\t\tselect\n\t\t\t$1,\n\t\t\tpaf.name,\n\t\t\tpaf.sha1,\n\t\t\tpaf.moderation_external_license_id\n\t\tfrom project_attribution_files paf\n\t\tinner join project_attribution_groups pag on pag.id = paf.group_id\n\t\twhere paf.sha1 = $2 and pag.project_id = $3\n\t\torder by paf.moderation_external_license_id nulls last, paf.name\n\t\tlimit 1\n\t\ton conflict (group_id, sha1) do update\n\t\tset moderation_external_license_id = coalesce(\n\t\t\tproject_attribution_files.moderation_external_license_id,\n\t\t\texcluded.moderation_external_license_id\n\t\t)\n\t\t", "describe": { "columns": [], "parameters": { "Left": [ "Int8", "Bytea", "Int8" ] }, "nullable": [] }, "hash": "a39aff314fd586a0d5bf275482e7034711b7c168757f77c33274ce93a385b324" }