forked from mach24/pin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpg-pin-schema.sql
1329 lines (884 loc) · 29.2 KB
/
pg-pin-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
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
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- 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: english_ispell; Type: TEXT SEARCH DICTIONARY; Schema: public; Owner: postgres
--
CREATE TEXT SEARCH DICTIONARY english_ispell (
TEMPLATE = pg_catalog.ispell,
dictfile = 'english', afffile = 'english', stopwords = 'english' );
ALTER TEXT SEARCH DICTIONARY public.english_ispell OWNER TO postgres;
--
-- Name: simple_dict; Type: TEXT SEARCH DICTIONARY; Schema: public; Owner: postgres
--
CREATE TEXT SEARCH DICTIONARY simple_dict (
TEMPLATE = pg_catalog.simple,
stopwords = 'english' );
ALTER TEXT SEARCH DICTIONARY public.simple_dict OWNER TO postgres;
--
-- Name: my_config; Type: TEXT SEARCH CONFIGURATION; Schema: public; Owner: postgres
--
CREATE TEXT SEARCH CONFIGURATION my_config (
PARSER = pg_catalog."default" );
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR asciiword WITH english_ispell, english_stem;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR word WITH english_ispell, english_stem;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR numword WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR email WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR url WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR host WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR sfloat WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR version WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR hword_numpart WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR hword_part WITH english_ispell, english_stem;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR hword_asciipart WITH english_ispell, english_stem;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR numhword WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR asciihword WITH english_ispell, english_stem;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR hword WITH english_ispell, english_stem;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR url_path WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR file WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR "float" WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR "int" WITH simple;
ALTER TEXT SEARCH CONFIGURATION my_config
ADD MAPPING FOR uint WITH simple;
ALTER TEXT SEARCH CONFIGURATION public.my_config OWNER TO postgres;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: admin_roles; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE admin_roles (
id integer NOT NULL,
name character varying(30)
);
ALTER TABLE public.admin_roles OWNER TO postgres;
--
-- Name: admin_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE admin_roles_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.admin_roles_id_seq OWNER TO postgres;
--
-- Name: admin_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE admin_roles_id_seq OWNED BY admin_roles.id;
--
-- Name: admin_users; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE admin_users (
id integer NOT NULL,
username text NOT NULL,
pwsalt text NOT NULL,
pwhash text NOT NULL,
super boolean DEFAULT false,
manager boolean DEFAULT false,
site_user_id integer
);
ALTER TABLE public.admin_users OWNER TO postgres;
--
-- Name: admin_users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE admin_users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.admin_users_id_seq OWNER TO postgres;
--
-- Name: admin_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE admin_users_id_seq OWNED BY admin_users.id;
--
-- Name: admin_users_roles; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE admin_users_roles (
user_id integer NOT NULL,
rol_id integer NOT NULL
);
ALTER TABLE public.admin_users_roles OWNER TO postgres;
--
-- Name: albums; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE albums (
id integer NOT NULL,
name text,
user_id integer
);
ALTER TABLE public.albums OWNER TO postgres;
--
-- Name: albums_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE albums_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.albums_id_seq OWNER TO postgres;
--
-- Name: albums_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE albums_id_seq OWNED BY albums.id;
--
-- Name: boards; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE boards (
id integer NOT NULL,
name text,
description text,
user_id integer,
public boolean DEFAULT true
);
ALTER TABLE public.boards OWNER TO postgres;
--
-- Name: boards_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE boards_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.boards_id_seq OWNER TO postgres;
--
-- Name: boards_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE boards_id_seq OWNED BY boards.id;
--
-- Name: categories; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE categories (
id integer NOT NULL,
name text
);
ALTER TABLE public.categories OWNER TO postgres;
--
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE categories_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.categories_id_seq OWNER TO postgres;
--
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE categories_id_seq OWNED BY categories.id;
--
-- Name: category_register_thumbnails; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE category_register_thumbnails (
id integer NOT NULL,
category_id integer NOT NULL,
image_name character varying(100) NOT NULL
);
ALTER TABLE public.category_register_thumbnails OWNER TO postgres;
--
-- Name: category_register_thumbnails_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE category_register_thumbnails_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.category_register_thumbnails_id_seq OWNER TO postgres;
--
-- Name: category_register_thumbnails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE category_register_thumbnails_id_seq OWNED BY category_register_thumbnails.id;
--
-- Name: collected_data; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE collected_data (
start integer NOT NULL,
ellapsed_time integer NOT NULL
);
ALTER TABLE public.collected_data OWNER TO postgres;
--
-- Name: comments; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE comments (
id integer NOT NULL,
pin_id integer,
user_id integer,
comment text,
"timestamp" integer DEFAULT date_part('epoch'::text, now())
);
ALTER TABLE public.comments OWNER TO postgres;
--
-- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE comments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.comments_id_seq OWNER TO postgres;
--
-- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE comments_id_seq OWNED BY comments.id;
--
-- Name: convos; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE convos (
id integer NOT NULL,
id1 integer,
id2 integer
);
ALTER TABLE public.convos OWNER TO postgres;
--
-- Name: convos_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE convos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.convos_id_seq OWNER TO postgres;
--
-- Name: convos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE convos_id_seq OWNED BY convos.id;
--
-- Name: cool_pins; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE cool_pins (
category_id integer NOT NULL,
pin_id integer NOT NULL
);
ALTER TABLE public.cool_pins OWNER TO postgres;
--
-- Name: follows; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE follows (
follower integer NOT NULL,
follow integer NOT NULL
);
ALTER TABLE public.follows OWNER TO postgres;
--
-- Name: friends; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE friends (
id1 integer NOT NULL,
id2 integer NOT NULL,
accepted integer DEFAULT 0
);
ALTER TABLE public.friends OWNER TO postgres;
--
-- Name: likes; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE likes (
user_id integer NOT NULL,
pin_id integer NOT NULL
);
ALTER TABLE public.likes OWNER TO postgres;
--
-- Name: media_servers; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE media_servers (
id integer NOT NULL,
active boolean DEFAULT true NOT NULL,
url text NOT NULL,
path text NOT NULL
);
ALTER TABLE public.media_servers OWNER TO postgres;
--
-- Name: media_servers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE media_servers_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.media_servers_id_seq OWNER TO postgres;
--
-- Name: media_servers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE media_servers_id_seq OWNED BY media_servers.id;
--
-- Name: messages; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE messages (
id integer NOT NULL,
convo_id integer,
sender integer,
content text
);
ALTER TABLE public.messages OWNER TO postgres;
--
-- Name: messages_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE messages_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.messages_id_seq OWNER TO postgres;
--
-- Name: messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE messages_id_seq OWNED BY messages.id;
--
-- Name: notifs; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE notifs (
id integer NOT NULL,
user_id integer,
message text,
link text,
"timestamp" integer DEFAULT date_part('epoch'::text, now()),
fr boolean DEFAULT false,
fr_id integer
);
ALTER TABLE public.notifs OWNER TO postgres;
--
-- Name: notifs_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE notifs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.notifs_id_seq OWNER TO postgres;
--
-- Name: notifs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE notifs_id_seq OWNED BY notifs.id;
--
-- Name: photos; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE photos (
id integer NOT NULL,
album_id integer,
filename text DEFAULT ''::text NOT NULL,
sizes text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.photos OWNER TO postgres;
--
-- Name: photos_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE photos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.photos_id_seq OWNER TO postgres;
--
-- Name: photos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE photos_id_seq OWNED BY photos.id;
--
-- Name: pin_loader_log; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE pin_loader_log (
pin_loader_id integer NOT NULL,
pin_id integer NOT NULL,
tstamp timestamp without time zone DEFAULT now() NOT NULL
);
ALTER TABLE public.pin_loader_log OWNER TO postgres;
--
-- Name: pins; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE pins (
id integer NOT NULL,
name text,
description text,
user_id integer,
"timestamp" integer DEFAULT date_part('epoch'::text, now()),
repin integer DEFAULT 0,
link text DEFAULT ''::text,
category integer DEFAULT 0,
privacy smallint DEFAULT 0,
views integer DEFAULT 0,
tsv tsvector
);
ALTER TABLE public.pins OWNER TO postgres;
--
-- Name: pins_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE pins_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.pins_id_seq OWNER TO postgres;
--
-- Name: pins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE pins_id_seq OWNED BY pins.id;
--
-- Name: pins_photos; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE pins_photos (
pin_id integer,
photo_id integer
);
ALTER TABLE public.pins_photos OWNER TO postgres;
--
-- Name: ratings; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE ratings (
rating integer,
user_id integer NOT NULL,
pin_id integer NOT NULL
);
ALTER TABLE public.ratings OWNER TO postgres;
--
-- Name: tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE tags (
pin_id integer NOT NULL,
tags text
);
ALTER TABLE public.tags OWNER TO postgres;
--
-- Name: temp_pins; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE temp_pins (
id integer NOT NULL,
image text,
link text,
title text,
category integer,
description text,
deleted boolean DEFAULT false
);
ALTER TABLE public.temp_pins OWNER TO postgres;
--
-- Name: temp_pins_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE temp_pins_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.temp_pins_id_seq OWNER TO postgres;
--
-- Name: temp_pins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE temp_pins_id_seq OWNED BY temp_pins.id;
--
-- Name: user_prefered_categories; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE user_prefered_categories (
user_id integer NOT NULL,
category_id integer NOT NULL
);
ALTER TABLE public.user_prefered_categories OWNER TO postgres;
--
-- Name: user_prefered_pins; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE user_prefered_pins (
user_id integer NOT NULL,
pin_id integer NOT NULL
);
ALTER TABLE public.user_prefered_pins OWNER TO postgres;
--
-- Name: users; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE users (
id integer NOT NULL,
email text,
name text,
pw_hash text,
pw_salt text,
about text,
"timestamp" integer DEFAULT date_part('epoch'::text, now()),
views integer DEFAULT 0,
show_views boolean DEFAULT true,
username text,
seriesid text DEFAULT ''::text,
logintoken text DEFAULT ''::text,
zip integer,
country text DEFAULT ''::text,
website text DEFAULT ''::text,
facebook text DEFAULT ''::text,
linkedin text DEFAULT ''::text,
twitter text DEFAULT ''::text,
gplus text DEFAULT ''::text,
pic integer,
hometown text,
city text,
private boolean DEFAULT false,
bg boolean DEFAULT false,
bgx integer DEFAULT 0,
bgy integer DEFAULT 0,
activation integer DEFAULT 0,
tsv tsvector,
login_source character(2) DEFAULT 'MP'::bpchar NOT NULL,
birthday date,
headerbgx integer DEFAULT 0 NOT NULL,
headerbgy integer DEFAULT 0 NOT NULL,
locale character(2) DEFAULT 'en'::bpchar NOT NULL
);
ALTER TABLE public.users OWNER TO postgres;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO postgres;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE users_id_seq OWNED BY users.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY admin_roles ALTER COLUMN id SET DEFAULT nextval('admin_roles_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY admin_users ALTER COLUMN id SET DEFAULT nextval('admin_users_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY albums ALTER COLUMN id SET DEFAULT nextval('albums_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY boards ALTER COLUMN id SET DEFAULT nextval('boards_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY category_register_thumbnails ALTER COLUMN id SET DEFAULT nextval('category_register_thumbnails_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY convos ALTER COLUMN id SET DEFAULT nextval('convos_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY media_servers ALTER COLUMN id SET DEFAULT nextval('media_servers_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY notifs ALTER COLUMN id SET DEFAULT nextval('notifs_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY photos ALTER COLUMN id SET DEFAULT nextval('photos_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY pins ALTER COLUMN id SET DEFAULT nextval('pins_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY temp_pins ALTER COLUMN id SET DEFAULT nextval('temp_pins_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
--
-- Name: admin_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY admin_roles
ADD CONSTRAINT admin_roles_pkey PRIMARY KEY (id);
--
-- Name: admin_users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY admin_users
ADD CONSTRAINT admin_users_pkey PRIMARY KEY (id);
--
-- Name: admin_users_username_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY admin_users
ADD CONSTRAINT admin_users_username_key UNIQUE (username);
--
-- Name: albums_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY albums
ADD CONSTRAINT albums_pkey PRIMARY KEY (id);
--
-- Name: boards_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY boards
ADD CONSTRAINT boards_pkey PRIMARY KEY (id);
--
-- Name: categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY categories
ADD CONSTRAINT categories_pkey PRIMARY KEY (id);
--
-- Name: category_register_thumbnails_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY category_register_thumbnails
ADD CONSTRAINT category_register_thumbnails_pkey PRIMARY KEY (id);
--
-- Name: comments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY comments
ADD CONSTRAINT comments_pkey PRIMARY KEY (id);