-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhsds-pgsql-schema.sql
376 lines (352 loc) · 12.7 KB
/
hsds-pgsql-schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
CREATE TABLE hsds.accessibility_for_disabilities
(
objectid integer NOT NULL,
accessibility character varying(255) COLLATE pg_catalog."default",
details character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.contact
(
objectid integer NOT NULL,
name character varying(255) COLLATE pg_catalog."default",
title character varying(255) COLLATE pg_catalog."default",
department character varying(255) COLLATE pg_catalog."default",
email character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
organization_id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
service_at_location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.eligibility
(
objectid integer NOT NULL,
eligibility character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.funding
(
objectid integer NOT NULL,
source character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
organization_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.language
(
objectid integer NOT NULL,
language character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.location
(
objectid integer NOT NULL,
name character varying(255) COLLATE pg_catalog."default",
alternate_name character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
transportation character varying(255) COLLATE pg_catalog."default",
latitude numeric(38,8),
longitude numeric(38,8),
id character varying(255) COLLATE pg_catalog."default",
organization_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.meta_table_descriptions
(
objectid integer NOT NULL,
id character varying(255) COLLATE pg_catalog."default",
name character varying(255) COLLATE pg_catalog."default",
language character varying(255) COLLATE pg_catalog."default",
character_set character varying(255) COLLATE pg_catalog."default"
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.metadata
(
objectid integer NOT NULL,
id character varying(255) COLLATE pg_catalog."default",
resource_id character varying(255) COLLATE pg_catalog."default",
last_action_date timestamp without time zone,
last_action_type character varying(255) COLLATE pg_catalog."default",
field_name character varying(255) COLLATE pg_catalog."default",
previous_value character varying(255) COLLATE pg_catalog."default",
replacement_value character varying(255) COLLATE pg_catalog."default",
updated_by character varying(255) COLLATE pg_catalog."default"
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.organization
(
objectid integer NOT NULL,
name character varying(255) COLLATE pg_catalog."default",
alternate_name character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
email character varying(255) COLLATE pg_catalog."default",
url character varying(255) COLLATE pg_catalog."default",
tax_status character varying(255) COLLATE pg_catalog."default",
tax_id character varying(255) COLLATE pg_catalog."default",
year_incorporated timestamp without time zone,
legal_status character varying(255) COLLATE pg_catalog."default",
intid smallint,
id character varying(255) COLLATE pg_catalog."default"
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.other_attribute
(
objectid integer NOT NULL,
id character varying(255) COLLATE pg_catalog."default",
link_id character varying(255) COLLATE pg_catalog."default",
link_type character varying(255) COLLATE pg_catalog."default",
taxonomy_term_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.payment_accepted
(
objectid integer NOT NULL,
payment character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.phone
(
objectid integer NOT NULL,
"number" character varying(255) COLLATE pg_catalog."default",
extension smallint,
type character varying(255) COLLATE pg_catalog."default",
language character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
department character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
organization_id character varying(255) COLLATE pg_catalog."default",
contact_id character varying(255) COLLATE pg_catalog."default",
service_at_location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.physical_address
(
objectid integer NOT NULL,
attention character varying(255) COLLATE pg_catalog."default",
address_1 character varying(255) COLLATE pg_catalog."default",
address_2 character varying(255) COLLATE pg_catalog."default",
address_3 character varying(255) COLLATE pg_catalog."default",
address_4 character varying(255) COLLATE pg_catalog."default",
city character varying(255) COLLATE pg_catalog."default",
region character varying(255) COLLATE pg_catalog."default",
state_province character varying(255) COLLATE pg_catalog."default",
postal_code character varying(255) COLLATE pg_catalog."default",
country character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.postal_address
(
objectid integer NOT NULL,
attention character varying(255) COLLATE pg_catalog."default",
address_1 character varying(255) COLLATE pg_catalog."default",
address_2 character varying(255) COLLATE pg_catalog."default",
address_3 character varying(255) COLLATE pg_catalog."default",
address_4 character varying(255) COLLATE pg_catalog."default",
city character varying(255) COLLATE pg_catalog."default",
region character varying(255) COLLATE pg_catalog."default",
state_province character varying(255) COLLATE pg_catalog."default",
postal_code character varying(255) COLLATE pg_catalog."default",
country character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.program
(
objectid integer NOT NULL,
name character varying(255) COLLATE pg_catalog."default",
alternate_name character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
organization_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.required_document
(
objectid integer NOT NULL,
document character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.schedule
(
objectid integer NOT NULL,
valid_from timestamp without time zone,
valid_to timestamp without time zone,
dtstart timestamp without time zone,
timezone smallint,
until timestamp without time zone,
count smallint,
wkst character varying(255) COLLATE pg_catalog."default",
freq character varying(255) COLLATE pg_catalog."default",
"interval" smallint,
byday character varying(255) COLLATE pg_catalog."default",
byweekno character varying(255) COLLATE pg_catalog."default",
bymonthday character varying(255) COLLATE pg_catalog."default",
byyearday character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
opens_at character varying(255) COLLATE pg_catalog."default",
closes_at character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
service_at_location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.service
(
objectid integer NOT NULL,
name character varying(255) COLLATE pg_catalog."default",
alternate_name character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
url character varying(255) COLLATE pg_catalog."default",
email character varying(255) COLLATE pg_catalog."default",
status character varying(255) COLLATE pg_catalog."default",
interpretation_services character varying(255) COLLATE pg_catalog."default",
application_process character varying(255) COLLATE pg_catalog."default",
wait_time character varying(255) COLLATE pg_catalog."default",
fees character varying(255) COLLATE pg_catalog."default",
accreditations character varying(255) COLLATE pg_catalog."default",
licenses character varying(255) COLLATE pg_catalog."default",
taxonomy_ids character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
organization_id character varying(255) COLLATE pg_catalog."default",
program_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.service_area
(
objectid integer NOT NULL,
service_area character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.service_at_location
(
objectid integer NOT NULL,
description character varying(255) COLLATE pg_catalog."default",
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
location_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.service_attribute
(
objectid integer NOT NULL,
id character varying(255) COLLATE pg_catalog."default",
service_id character varying(255) COLLATE pg_catalog."default",
taxonomy_term_id character varying(255) COLLATE pg_catalog."default",
intid smallint
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
CREATE TABLE hsds.taxonomy_term
(
objectid integer NOT NULL,
term character varying(255) COLLATE pg_catalog."default",
description character varying(255) COLLATE pg_catalog."default",
taxonomy character varying(255) COLLATE pg_catalog."default",
language character varying(255) COLLATE pg_catalog."default",
intid smallint,
id character varying(255) COLLATE pg_catalog."default",
parent_id character varying(255) COLLATE pg_catalog."default"
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;