Enable SQL for CI tests

This commit is contained in:
Steven Zeck 2018-03-09 22:49:51 -06:00
parent 7e735ec70c
commit 42e493ea52
No known key found for this signature in database
GPG Key ID: 621B374B29AA814A
4 changed files with 17 additions and 9 deletions

View File

@ -3,7 +3,7 @@ SELECT ca.proj_id AS proj_id,
ca.ca_date_start AS proj_start, ca.ca_date_start AS proj_start,
ca.ca_date_end AS proj_end, ca.ca_date_end AS proj_end,
(SELECT count(*) (SELECT COUNT(*)
FROM rotations r FROM rotations r
WHERE r.proj_id = proj_id WHERE r.proj_id = proj_id
AND r.r_status = 'R' AND r.r_status = 'R'
@ -12,7 +12,7 @@ SELECT ca.proj_id AS proj_id,
(SELECT count(*) (SELECT count(*)
FROM rotations r FROM rotations r
WHERE r.proj_id = proj_id WHERE r.proj_id = proj_id
AND r.channel_id = 24) r_rtb_count AND r.channel_id = 24 ) r_rtb_count
FROM projs ca, FROM projs ca,
clients c, clients c,
proj_auth caa proj_auth caa
@ -20,6 +20,6 @@ WHERE ca.client_id = 12345
AND ca.client_id = c.client_id AND ca.client_id = c.client_id
AND ca_type = 'zzz' AND ca_type = 'zzz'
AND c.agency_id = 0 AND c.agency_id = 0
AND ca.client_id = nvl(caa.client_id, ca.client_id) AND ca.client_id = NVL(caa.client_id, ca.client_id)
AND proj_id = nvl(caa.proj_id, proj_id) AND proj_id = NVL(caa.proj_id, proj_id)
AND caa.contact_id = 7890 AND caa.contact_id = 7890

View File

@ -4,21 +4,30 @@ VALUES('hallpclnx',
CURRENT_TIMESTAMP); CURRENT_TIMESTAMP);
INSERT INTO thread (thread, description, created_at, client_id) INSERT INTO THREAD (THREAD,
description,
created_at,
client_id)
VALUES(1, VALUES(1,
'Living room camera', 'Living room camera',
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP,
1); 1);
INSERT INTO thread (thread, description, created_at, client_id) INSERT INTO THREAD (THREAD,
description,
created_at,
client_id)
VALUES(2, VALUES(2,
'Porch camera', 'Porch camera',
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP,
1); 1);
INSERT INTO thread (thread, description, created_at, client_id) INSERT INTO THREAD (THREAD,
description,
created_at,
client_id)
VALUES(2, VALUES(2,
'Garden camera', 'Garden camera',
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP,
@ -29,4 +38,3 @@ INSERT INTO client (HOST, description, created_at)
VALUES('shedpclnx', VALUES('shedpclnx',
'My shed linux machine', 'My shed linux machine',
CURRENT_TIMESTAMP); CURRENT_TIMESTAMP);