11 changed files with 57 additions and 38 deletions
@ -1,21 +1,25 @@ |
|||||||
SELECT |
SELECT |
||||||
id, |
lettings_logs.id, |
||||||
status, |
status, |
||||||
created_at, |
lettings_logs.created_at, |
||||||
tenancycode, |
tenancycode, |
||||||
propcode, |
propcode, |
||||||
created_by_id, |
created_by_id, |
||||||
|
owning_organisation_id, |
||||||
|
managing_organisation_id, |
||||||
'lettings' as log_type |
'lettings' as log_type |
||||||
FROM lettings_logs |
FROM lettings_logs |
||||||
|
|
||||||
UNION |
UNION |
||||||
|
|
||||||
SELECT |
SELECT |
||||||
id, |
sales_logs.id, |
||||||
status, |
status, |
||||||
created_at, |
sales_logs.created_at, |
||||||
null as tenancycode, |
null as tenancycode, |
||||||
null as propcode, |
null as propcode, |
||||||
created_by_id, |
created_by_id, |
||||||
|
owning_organisation_id, |
||||||
|
managing_organisation_id, |
||||||
'sales' as log_type |
'sales' as log_type |
||||||
FROM sales_logs |
FROM sales_logs |
||||||
|
Loading…
Reference in new issue