-
Notifications
You must be signed in to change notification settings - Fork 14
/
definitions.sql
700 lines (526 loc) · 19.2 KB
/
definitions.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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.3
-- Dumped by pg_dump version 9.6.3
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
-- DROP DATABASE IF EXISTS participedia;
--
-- Name: participedia; Type: DATABASE; Schema: -; Owner: -
--
--CREATE DATABASE participedia WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
--\connect participedia
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
-- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--
-- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
--
-- Name: attachment; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE attachment AS (
url text,
title text,
size integer
);
--
-- Name: author; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE author AS (
user_id integer,
"timestamp" timestamp,
name text
);
--
-- Name: geolocation; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE geolocation AS (
name text,
address1 text,
address2 text,
city text,
province text,
country text,
postal_code text,
latitude text,
longitude text
);
--
-- Name: object_medium; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE object_medium AS (
id integer,
title text,
type text,
images text[],
post_date timestamp,
updated_date timestamp,
body text,
bookmarked boolean,
location geolocation
);
--
-- Name: object_short; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE object_short AS (
id integer,
title text,
type text,
images text[],
post_date timestamp,
updated_date timestamp
);
--
-- Name: object_title; Type: TYPE; Schema: public; Owner: -
--
CREATE TYPE object_title AS (
id integer,
title text
);
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: authors; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE authors (
user_id integer NOT NULL,
"timestamp" timestamp NOT NULL,
thingid integer NOT NULL
);
--
-- Name: bookmarks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE bookmarks (
id integer NOT NULL,
bookmarktype character varying,
thingid integer,
userid integer
);
--
-- Name: bookmarks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE bookmarks_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: bookmarks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE bookmarks_id_seq OWNED BY bookmarks.id;
--
-- Name: things; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE things (
id integer NOT NULL,
type text NOT NULL,
original_language text DEFAULT ''::text,
post_date timestamp,
published boolean,
updated_date timestamp,
location_name text DEFAULT ''::text,
address1 text DEFAULT ''::text,
address2 text DEFAULT ''::text,
city text DEFAULT ''::text,
province text DEFAULT ''::text,
postal_code text DEFAULT ''::text,
country text DEFAULT ''::text,
latitude text DEFAULT ''::text,
longitude text DEFAULT ''::text,
files text[] DEFAULT '{}'::text[],
tags text[] DEFAULT '{}'::text[],
featured boolean DEFAULT false,
links text[] DEFAULT '{}'::text[],
hidden boolean DEFAULT false,
videos text[] DEFAULT '{}'::text[],
images text[] DEFAULT '{}'::text[]
);
--
-- Name: cases; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE cases (
relationships text[] DEFAULT '{}'::text[],
issues text[] DEFAULT '{}'::text[],
specific_topics text[] DEFAULT '{}'::text[],
is_component_of integer,
scope_of_influence text DEFAULT ''::text,
start_date timestamp,
end_date timestamp,
ongoing boolean,
time_limited text DEFAULT ''::text,
purposes text[] DEFAULT '{}'::text[],
approaches text[] DEFAULT '{}'::text[],
public_spectrum text DEFAULT ''::text,
number_of_participants integer,
open_limited text DEFAULT ''::text,
recruitment_method text DEFAULT ''::text,
targeted_participants text[] DEFAULT '{}'::text[],
legality text DEFAULT ''::text,
facilitators text DEFAULT ''::text,
facilitator_training text DEFAULT ''::text,
facetoface_online_or_both text DEFAULT ''::text,
participants_interactions text[] DEFAULT '{}'::text[],
learning_resources text[] DEFAULT '{}'::text[],
decision_methods text[] DEFAULT '{}'::text[],
if_voting text[] DEFAULT '{}'::text[],
insights_outcomes text[] DEFAULT '{}'::text[],
process_methods integer[] DEFAULT '{}'::integer[],
primary_organizers integer[] DEFAULT '{}'::integer[],
organizer_types text[] DEFAULT '{}'::text[],
funder text DEFAULT ''::text,
funder_types text[] DEFAULT '{}'::text[],
staff boolean,
volunteers boolean,
impact_evidence text DEFAULT '',
change_types text[] DEFAULT '{}'::text[],
implementers_of_change text[] DEFAULT '{}'::text[],
formal_evaluation text DEFAULT ''::text,
evaluation_reports text[] DEFAULT '{}'::text[],
evaluation_links text[] DEFAULT '{}'::text[]
)
INHERITS (things);
--
-- Name: localized_texts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE localized_texts (
body text DEFAULT ''::text,
title text NOT NULL,
description text,
language text DEFAULT 'en'::text,
"timestamp" timestamp DEFAULT '2017-10-11 12:07:08.358366-07'::timestamp,
thingid integer NOT NULL
);
--
-- Name: methods; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE methods (
completeness text DEFAULT ''::text,
facilitated boolean,
geographical_scope text DEFAULT ''::text,
participant_selections text[] DEFAULT '{}'::text[],
recruitment_method text DEFAULT ''::text,
communication_modes text[] DEFAULT '{}'::text[],
decision_method text DEFAULT ''::text,
if_voting text DEFAULT ''::text,
public_interaction_methods text[] DEFAULT '{}'::text[],
issue_polarization text DEFAULT ''::text,
issue_technical_complexity text DEFAULT ''::text,
issue_interdependency text DEFAULT ''::text
)
INHERITS (things);
--
-- Name: organizations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE organizations (
executive_director text DEFAULT ''::text,
issues text DEFAULT '{}'::text[],
sector text DEFAULT ''::text
)
INHERITS (things);
--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE users (
id integer NOT NULL,
hidden boolean,
name text NOT NULL,
email text NOT NULL,
language text,
language_1 text,
accepted_date timestamp,
last_access_date timestamp ,
login timestamp,
auth0_user_id text,
join_date timestamp,
picture_url text,
bio text,
isadmin boolean DEFAULT false
);
--
-- Name: search_index_en; Type: MATERIALIZED VIEW; Schema: public; Owner: -
--
CREATE MATERIALIZED VIEW search_index_en AS
WITH allauthors AS (
SELECT
things.id thingid,
string_agg(users.name, ' ') authorstring
FROM users, authors, things
WHERE
authors.user_id = users.id AND
authors.thingid = things.id
GROUP BY things.id
), texts AS (
select distinct on(thingid) thingid, title, body, description
from (
select distinct on(thingid, timestamp) thingid, title, body, description
from localized_texts
where language = 'en'
order by thingid, timestamp DESC
) as titles
order by thingid
)
SELECT
cases.id,
cases.type,
texts.title,
texts.body,
texts.description,
setweight(to_tsvector('english'::regconfig, texts.title), 'A') ||
setweight(to_tsvector('english'::regconfig, texts.body), 'D') ||
setweight(to_tsvector('english'::regconfig, texts.description), 'C') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.tags, '{}'::text[]), ' ')), 'A') ||
setweight(to_tsvector('english'::regconfig, allauthors.authorstring), 'A') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.city, '')), 'A') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.country, '')), 'A') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.relationships, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.issues, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.specific_topics, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.scope_of_influence, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.time_limited, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.purposes, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.approaches, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.public_spectrum, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.open_limited, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.recruitment_method, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.targeted_participants, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.legality, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.facilitators, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.facilitator_training, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.facetoface_online_or_both, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.participants_interactions, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.learning_resources, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.decision_methods, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.if_voting, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.insights_outcomes, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.organizer_types, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.funder, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.funder_types, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.impact_evidence, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.change_types, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(cases.implementers_of_change, '{}'::text[]), '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(cases.formal_evaluation, ''::text)), 'B')
AS document
FROM
cases
JOIN texts ON texts.thingid = cases.id
JOIN allauthors ON allauthors.thingid = cases.id
WHERE
cases.hidden = false
UNION
SELECT
methods.id,
methods.type,
texts.title,
texts.body,
texts.description,
setweight(to_tsvector('english'::regconfig, texts.title), 'A') ||
setweight(to_tsvector('english'::regconfig, texts.body), 'D') ||
setweight(to_tsvector('english'::regconfig, texts.description), 'C') ||
setweight(to_tsvector('english'::regconfig, allauthors.authorstring), 'A') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.geographical_scope, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(methods.participant_selections, '{}'::text[]), ' ')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.recruitment_method, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(methods.communication_modes, '{}'::text[]), ' ')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.decision_method, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.if_voting, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(methods.public_interaction_methods, '{}'::text[]), ' ')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.issue_polarization, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.issue_technical_complexity, '')), 'B') ||
setweight(to_tsvector('english'::regconfig, COALESCE(methods.issue_interdependency, '')), 'B')
AS document
FROM
methods
JOIN texts ON texts.thingid = methods.id
JOIN allauthors ON allauthors.thingid = methods.id
WHERE
methods.hidden = false
UNION
SELECT
organizations.id,
organizations.type,
texts.title,
texts.body,
texts.description,
setweight(to_tsvector('english'::regconfig, texts.title), 'A') ||
setweight(to_tsvector('english'::regconfig, texts.body), 'D') ||
setweight(to_tsvector('english'::regconfig, texts.description), 'C') ||
setweight(to_tsvector('english'::regconfig, array_to_string(COALESCE(organizations.tags, '{}'::text[]), ' ')), 'A') ||
setweight(to_tsvector('english'::regconfig, allauthors.authorstring), 'A') ||
setweight(to_tsvector('english'::regconfig, COALESCE(organizations.city, '')), 'A') ||
setweight(to_tsvector('english'::regconfig, COALESCE(organizations.country, '')), 'A') ||
setweight(to_tsvector('english'::regconfig, COALESCE(organizations.executive_director, '')), 'A')
AS document
FROM
organizations
JOIN texts ON texts.thingid = organizations.id
JOIN allauthors ON allauthors.thingid = organizations.id
WHERE
organizations.hidden = false
;
CREATE INDEX idx_fts_search_en ON search_index_en USING gin(document);
--
-- Name: things_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE things_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: things_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE things_id_seq OWNED BY things.id;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE users_id_seq OWNED BY users.id;
--
-- Name: bookmarks id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY bookmarks ALTER COLUMN id SET DEFAULT nextval('bookmarks_id_seq'::regclass);
--
-- Name: cases id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN id SET DEFAULT nextval('things_id_seq'::regclass);
--
-- Name: cases original_language; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN original_language SET DEFAULT ''::text;
--
-- Name: cases files; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN files SET DEFAULT '{}'::attachment[];
--
-- Name: cases tags; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN tags SET DEFAULT '{}'::text[];
--
-- Name: cases featured; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN featured SET DEFAULT false;
--
-- Name: cases links; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN links SET DEFAULT '{}'::text[];
--
-- Name: cases hidden; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN hidden SET DEFAULT false;
--
-- Name: cases videos; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN videos SET DEFAULT '{}'::text[];
--
-- Name: cases images; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY cases ALTER COLUMN images SET DEFAULT '{}'::text[];
--
-- Name: methods id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN id SET DEFAULT nextval('things_id_seq'::regclass);
--
-- Name: methods original_language; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN original_language SET DEFAULT ''::text;
--
-- Name: methods files; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN files SET DEFAULT '{}'::attachment[];
--
-- Name: methods tags; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN tags SET DEFAULT '{}'::text[];
--
-- Name: methods featured; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN featured SET DEFAULT false;
--
-- Name: methods links; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN links SET DEFAULT '{}'::text[];
--
-- Name: methods hidden; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN hidden SET DEFAULT false;
--
-- Name: methods videos; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN videos SET DEFAULT '{}'::text[];
--
-- Name: methods images; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY methods ALTER COLUMN images SET DEFAULT '{}'::text[];
--
-- Name: organizations id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN id SET DEFAULT nextval('things_id_seq'::regclass);
--
-- Name: organizations original_language; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN original_language SET DEFAULT ''::text;
--
-- Name: organizations files; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN files SET DEFAULT '{}'::attachment[];
--
-- Name: organizations tags; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN tags SET DEFAULT '{}'::text[];
--
-- Name: organizations featured; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN featured SET DEFAULT false;
--
-- Name: organizations links; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN links SET DEFAULT '{}'::text[];
--
-- Name: organizations hidden; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN hidden SET DEFAULT false;
--
-- Name: organizations videos; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN videos SET DEFAULT '{}'::text[];
--
-- Name: organizations images; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY organizations ALTER COLUMN images SET DEFAULT '{}'::text[];
--
-- Name: things id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY things ALTER COLUMN id SET DEFAULT nextval('things_id_seq'::regclass);
--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);