making needed changes to make the table names strict

This commit is contained in:
Arjun Patel
2019-04-13 18:06:18 -07:00
parent 7fd0128864
commit 9faff9e6e8
12 changed files with 428 additions and 329 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ exports.getGrantsByDonorId = async (req, res, next) => {
JSON_ARRAYAGG(o.primary_cause) AS causes,
JSON_ARRAYAGG(o.primary_region) AS regions
from grants as g
inner join GrantOrganizations as go on go.grant_id = g.id
inner join grants_organizations as go on go.grant_id = g.id
left join organizations as o on o.id = go.organization_id
where donor_id = :donor_id
group by g.id, g.name, g.amount, g.monthly, g.num_causes, g.num_regions, g.donor_id;