Skip to content

Commit 97e8e27

Browse files
authored
feat: lahd housing programs (#19)
1 parent 2dc1442 commit 97e8e27

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
INSERT INTO multiselect_questions (
2+
id,
3+
created_at,
4+
updated_at,
5+
application_section,
6+
description,
7+
hide_from_listing,
8+
is_exclusive,
9+
jurisdiction_id,
10+
links,
11+
name,
12+
options,
13+
opt_out_text,
14+
status,
15+
text,
16+
was_created_externally
17+
)
18+
SELECT
19+
uuid_generate_v4(),
20+
now(),
21+
now(),
22+
'programs'::"multiselect_questions_application_section_enum",
23+
'Some units require at least one resident to have a mobility accessibility need',
24+
false,
25+
true,
26+
j.id,
27+
'[]'::jsonb,
28+
'Mobility accessibility needs',
29+
'[{"text":"Wheelchair","ordinal":0},{"text":"Walker","ordinal":1},{"text":"Power chair","ordinal":2},{"text":"Other mobility device","ordinal":3}]'::jsonb,
30+
'None of the above',
31+
'active'::"multiselect_questions_status_enum",
32+
'Mobility accessibility needs',
33+
false
34+
FROM jurisdictions j
35+
WHERE j.name = 'Los Angeles'
36+
AND NOT EXISTS (
37+
SELECT 1
38+
FROM multiselect_questions mq
39+
WHERE mq.jurisdiction_id = j.id
40+
AND mq.text = 'Mobility accessibility needs'
41+
AND mq.application_section = 'programs'
42+
);
43+
44+
45+
INSERT INTO multiselect_questions (
46+
id,
47+
created_at,
48+
updated_at,
49+
application_section,
50+
description,
51+
hide_from_listing,
52+
is_exclusive,
53+
jurisdiction_id,
54+
links,
55+
name,
56+
options,
57+
opt_out_text,
58+
status,
59+
text,
60+
was_created_externally
61+
)
62+
SELECT
63+
uuid_generate_v4(),
64+
now(),
65+
now(),
66+
'programs'::"multiselect_questions_application_section_enum",
67+
'Some units require at least one resident to have a hearing / vision accessibility need',
68+
false,
69+
true,
70+
j.id,
71+
'[]'::jsonb,
72+
'Hearing/vision accessibility needs',
73+
'[{"text":"Audible and visual doorbells","ordinal":0},{"text":"Fire and smoke alarms with hard wired strobes","ordinal":1},{"text":"Documents in screen-reader accessible format","ordinal":2},{"text":"Documents in large text or braille","ordinal":3}]'::jsonb,
74+
'None of the above',
75+
'active'::"multiselect_questions_status_enum",
76+
'Hearing/vision accessibility needs',
77+
false
78+
FROM jurisdictions j
79+
WHERE j.name = 'Los Angeles'
80+
AND NOT EXISTS (
81+
SELECT 1
82+
FROM multiselect_questions mq
83+
WHERE mq.jurisdiction_id = j.id
84+
AND mq.text = 'Hearing/vision accessibility needs'
85+
AND mq.application_section = 'programs'
86+
);

0 commit comments

Comments
 (0)