parlement 0.12 → 0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,11 +3,13 @@
3
3
  --
4
4
 
5
5
  SET client_encoding = 'LATIN9';
6
+ SET standard_conforming_strings = off;
6
7
  SET check_function_bodies = false;
7
8
  SET client_min_messages = warning;
9
+ SET escape_string_warning = off;
8
10
 
9
11
  --
10
- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
12
+ -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: -
11
13
  --
12
14
 
13
15
  COMMENT ON SCHEMA public IS 'Standard public schema';
@@ -20,7 +22,7 @@ SET default_tablespace = '';
20
22
  SET default_with_oids = false;
21
23
 
22
24
  --
23
- -- Name: attachments; Type: TABLE; Schema: public; Owner: manu; Tablespace:
25
+ -- Name: attachments; Type: TABLE; Schema: public; Owner: -; Tablespace:
24
26
  --
25
27
 
26
28
  CREATE TABLE attachments (
@@ -33,7 +35,7 @@ CREATE TABLE attachments (
33
35
 
34
36
 
35
37
  --
36
- -- Name: attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
38
+ -- Name: attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
37
39
  --
38
40
 
39
41
  CREATE SEQUENCE attachments_id_seq
@@ -45,11 +47,11 @@ CREATE SEQUENCE attachments_id_seq
45
47
 
46
48
 
47
49
  --
48
- -- Name: choices; Type: TABLE; Schema: public; Owner: manu; Tablespace:
50
+ -- Name: choices; Type: TABLE; Schema: public; Owner: -; Tablespace:
49
51
  --
50
52
 
51
53
  CREATE TABLE choices (
52
- id serial NOT NULL,
54
+ id integer NOT NULL,
53
55
  elt_id character varying(255) NOT NULL,
54
56
  person_id character varying(255),
55
57
  created_on timestamp without time zone NOT NULL,
@@ -58,11 +60,29 @@ CREATE TABLE choices (
58
60
 
59
61
 
60
62
  --
61
- -- Name: delegations; Type: TABLE; Schema: public; Owner: manu; Tablespace:
63
+ -- Name: choices_id_seq; Type: SEQUENCE; Schema: public; Owner: -
64
+ --
65
+
66
+ CREATE SEQUENCE choices_id_seq
67
+ INCREMENT BY 1
68
+ NO MAXVALUE
69
+ NO MINVALUE
70
+ CACHE 1;
71
+
72
+
73
+ --
74
+ -- Name: choices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
75
+ --
76
+
77
+ ALTER SEQUENCE choices_id_seq OWNED BY choices.id;
78
+
79
+
80
+ --
81
+ -- Name: delegations; Type: TABLE; Schema: public; Owner: -; Tablespace:
62
82
  --
63
83
 
64
84
  CREATE TABLE delegations (
65
- id serial NOT NULL,
85
+ id integer NOT NULL,
66
86
  elt_id text NOT NULL,
67
87
  person_id text NOT NULL,
68
88
  created_on timestamp with time zone DEFAULT now() NOT NULL,
@@ -72,7 +92,26 @@ CREATE TABLE delegations (
72
92
 
73
93
 
74
94
  --
75
- -- Name: elts; Type: TABLE; Schema: public; Owner: manu; Tablespace:
95
+ -- Name: delegations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
96
+ --
97
+
98
+ CREATE SEQUENCE delegations_id_seq
99
+ START WITH 1
100
+ INCREMENT BY 1
101
+ NO MAXVALUE
102
+ NO MINVALUE
103
+ CACHE 1;
104
+
105
+
106
+ --
107
+ -- Name: delegations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
108
+ --
109
+
110
+ ALTER SEQUENCE delegations_id_seq OWNED BY delegations.id;
111
+
112
+
113
+ --
114
+ -- Name: elts; Type: TABLE; Schema: public; Owner: -; Tablespace:
76
115
  --
77
116
 
78
117
  CREATE TABLE elts (
@@ -91,7 +130,7 @@ CREATE TABLE elts (
91
130
 
92
131
 
93
132
  --
94
- -- Name: elts_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
133
+ -- Name: elts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
95
134
  --
96
135
 
97
136
  CREATE SEQUENCE elts_id_seq
@@ -102,7 +141,7 @@ CREATE SEQUENCE elts_id_seq
102
141
 
103
142
 
104
143
  --
105
- -- Name: engine_schema_info; Type: TABLE; Schema: public; Owner: manu; Tablespace:
144
+ -- Name: engine_schema_info; Type: TABLE; Schema: public; Owner: -; Tablespace:
106
145
  --
107
146
 
108
147
  CREATE TABLE engine_schema_info (
@@ -112,7 +151,7 @@ CREATE TABLE engine_schema_info (
112
151
 
113
152
 
114
153
  --
115
- -- Name: mails; Type: TABLE; Schema: public; Owner: manu; Tablespace:
154
+ -- Name: mails; Type: TABLE; Schema: public; Owner: -; Tablespace:
116
155
  --
117
156
 
118
157
  CREATE TABLE mails (
@@ -125,7 +164,7 @@ CREATE TABLE mails (
125
164
 
126
165
 
127
166
  --
128
- -- Name: mails_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
167
+ -- Name: mails_id_seq; Type: SEQUENCE; Schema: public; Owner: -
129
168
  --
130
169
 
131
170
  CREATE SEQUENCE mails_id_seq
@@ -137,7 +176,40 @@ CREATE SEQUENCE mails_id_seq
137
176
 
138
177
 
139
178
  --
140
- -- Name: people; Type: TABLE; Schema: public; Owner: manu; Tablespace:
179
+ -- Name: old_visits; Type: TABLE; Schema: public; Owner: -; Tablespace:
180
+ --
181
+
182
+ CREATE TABLE old_visits (
183
+ id integer NOT NULL,
184
+ person_id character varying(255),
185
+ elt_id character varying(255) NOT NULL,
186
+ created_on timestamp without time zone NOT NULL,
187
+ updated_on timestamp without time zone,
188
+ filter integer DEFAULT 0
189
+ );
190
+
191
+
192
+ --
193
+ -- Name: old_visits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
194
+ --
195
+
196
+ CREATE SEQUENCE old_visits_id_seq
197
+ START WITH 1
198
+ INCREMENT BY 1
199
+ NO MAXVALUE
200
+ NO MINVALUE
201
+ CACHE 1;
202
+
203
+
204
+ --
205
+ -- Name: old_visits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
206
+ --
207
+
208
+ ALTER SEQUENCE old_visits_id_seq OWNED BY old_visits.id;
209
+
210
+
211
+ --
212
+ -- Name: people; Type: TABLE; Schema: public; Owner: -; Tablespace:
141
213
  --
142
214
 
143
215
  CREATE TABLE people (
@@ -145,12 +217,13 @@ CREATE TABLE people (
145
217
  created_on timestamp with time zone DEFAULT now() NOT NULL,
146
218
  name text,
147
219
  email text,
148
- image text
220
+ image text,
221
+ last_login timestamp without time zone
149
222
  );
150
223
 
151
224
 
152
225
  --
153
- -- Name: people_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
226
+ -- Name: people_id_seq; Type: SEQUENCE; Schema: public; Owner: -
154
227
  --
155
228
 
156
229
  CREATE SEQUENCE people_id_seq
@@ -161,11 +234,11 @@ CREATE SEQUENCE people_id_seq
161
234
 
162
235
 
163
236
  --
164
- -- Name: person_mails; Type: TABLE; Schema: public; Owner: manu; Tablespace:
237
+ -- Name: person_mails; Type: TABLE; Schema: public; Owner: -; Tablespace:
165
238
  --
166
239
 
167
240
  CREATE TABLE person_mails (
168
- id serial NOT NULL,
241
+ id integer NOT NULL,
169
242
  mail_id character varying(255) NOT NULL,
170
243
  person_id character varying(255),
171
244
  created_on timestamp without time zone NOT NULL
@@ -173,7 +246,25 @@ CREATE TABLE person_mails (
173
246
 
174
247
 
175
248
  --
176
- -- Name: plugin_schema_info; Type: TABLE; Schema: public; Owner: manu; Tablespace:
249
+ -- Name: person_mails_id_seq; Type: SEQUENCE; Schema: public; Owner: -
250
+ --
251
+
252
+ CREATE SEQUENCE person_mails_id_seq
253
+ INCREMENT BY 1
254
+ NO MAXVALUE
255
+ NO MINVALUE
256
+ CACHE 1;
257
+
258
+
259
+ --
260
+ -- Name: person_mails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
261
+ --
262
+
263
+ ALTER SEQUENCE person_mails_id_seq OWNED BY person_mails.id;
264
+
265
+
266
+ --
267
+ -- Name: plugin_schema_info; Type: TABLE; Schema: public; Owner: -; Tablespace:
177
268
  --
178
269
 
179
270
  CREATE TABLE plugin_schema_info (
@@ -183,7 +274,7 @@ CREATE TABLE plugin_schema_info (
183
274
 
184
275
 
185
276
  --
186
- -- Name: schema_info; Type: TABLE; Schema: public; Owner: manu; Tablespace:
277
+ -- Name: schema_info; Type: TABLE; Schema: public; Owner: -; Tablespace:
187
278
  --
188
279
 
189
280
  CREATE TABLE schema_info (
@@ -192,7 +283,7 @@ CREATE TABLE schema_info (
192
283
 
193
284
 
194
285
  --
195
- -- Name: subscribers_id_seq; Type: SEQUENCE; Schema: public; Owner: manu
286
+ -- Name: subscribers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
196
287
  --
197
288
 
198
289
  CREATE SEQUENCE subscribers_id_seq
@@ -203,24 +294,42 @@ CREATE SEQUENCE subscribers_id_seq
203
294
 
204
295
 
205
296
  --
206
- -- Name: subscriptions; Type: TABLE; Schema: public; Owner: manu; Tablespace:
297
+ -- Name: subscriptions; Type: TABLE; Schema: public; Owner: -; Tablespace:
207
298
  --
208
299
 
209
300
  CREATE TABLE subscriptions (
210
301
  elt_id text NOT NULL,
211
302
  person_id text NOT NULL,
212
303
  filter integer DEFAULT 0,
213
- id serial NOT NULL,
304
+ id integer NOT NULL,
214
305
  created_on timestamp with time zone DEFAULT now() NOT NULL
215
306
  );
216
307
 
217
308
 
218
309
  --
219
- -- Name: users; Type: TABLE; Schema: public; Owner: manu; Tablespace:
310
+ -- Name: subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
311
+ --
312
+
313
+ CREATE SEQUENCE subscriptions_id_seq
314
+ INCREMENT BY 1
315
+ NO MAXVALUE
316
+ NO MINVALUE
317
+ CACHE 1;
318
+
319
+
320
+ --
321
+ -- Name: subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
322
+ --
323
+
324
+ ALTER SEQUENCE subscriptions_id_seq OWNED BY subscriptions.id;
325
+
326
+
327
+ --
328
+ -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace:
220
329
  --
221
330
 
222
331
  CREATE TABLE users (
223
- id serial NOT NULL,
332
+ id integer NOT NULL,
224
333
  "login" text NOT NULL,
225
334
  salted_password character varying(40) NOT NULL,
226
335
  email character varying(60),
@@ -237,11 +346,29 @@ CREATE TABLE users (
237
346
 
238
347
 
239
348
  --
240
- -- Name: usersold; Type: TABLE; Schema: public; Owner: manu; Tablespace:
349
+ -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
350
+ --
351
+
352
+ CREATE SEQUENCE users_id_seq
353
+ INCREMENT BY 1
354
+ NO MAXVALUE
355
+ NO MINVALUE
356
+ CACHE 1;
357
+
358
+
359
+ --
360
+ -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
361
+ --
362
+
363
+ ALTER SEQUENCE users_id_seq OWNED BY users.id;
364
+
365
+
366
+ --
367
+ -- Name: usersold; Type: TABLE; Schema: public; Owner: -; Tablespace:
241
368
  --
242
369
 
243
370
  CREATE TABLE usersold (
244
- id serial NOT NULL,
371
+ id integer NOT NULL,
245
372
  person_id text NOT NULL,
246
373
  salted_password text,
247
374
  salt text,
@@ -252,7 +379,114 @@ CREATE TABLE usersold (
252
379
 
253
380
 
254
381
  --
255
- -- Name: attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
382
+ -- Name: usersold_id_seq; Type: SEQUENCE; Schema: public; Owner: -
383
+ --
384
+
385
+ CREATE SEQUENCE usersold_id_seq
386
+ START WITH 1
387
+ INCREMENT BY 1
388
+ NO MAXVALUE
389
+ NO MINVALUE
390
+ CACHE 1;
391
+
392
+
393
+ --
394
+ -- Name: usersold_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
395
+ --
396
+
397
+ ALTER SEQUENCE usersold_id_seq OWNED BY usersold.id;
398
+
399
+
400
+ --
401
+ -- Name: visits; Type: TABLE; Schema: public; Owner: -; Tablespace:
402
+ --
403
+
404
+ CREATE TABLE visits (
405
+ id integer NOT NULL,
406
+ person_id character varying(255),
407
+ elt_id character varying(255) NOT NULL,
408
+ created_on timestamp without time zone NOT NULL,
409
+ updated_on timestamp without time zone,
410
+ filter integer DEFAULT 0
411
+ );
412
+
413
+
414
+ --
415
+ -- Name: visits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
416
+ --
417
+
418
+ CREATE SEQUENCE visits_id_seq
419
+ INCREMENT BY 1
420
+ NO MAXVALUE
421
+ NO MINVALUE
422
+ CACHE 1;
423
+
424
+
425
+ --
426
+ -- Name: visits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
427
+ --
428
+
429
+ ALTER SEQUENCE visits_id_seq OWNED BY visits.id;
430
+
431
+
432
+ --
433
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
434
+ --
435
+
436
+ ALTER TABLE choices ALTER COLUMN id SET DEFAULT nextval('choices_id_seq'::regclass);
437
+
438
+
439
+ --
440
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
441
+ --
442
+
443
+ ALTER TABLE delegations ALTER COLUMN id SET DEFAULT nextval('delegations_id_seq'::regclass);
444
+
445
+
446
+ --
447
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
448
+ --
449
+
450
+ ALTER TABLE old_visits ALTER COLUMN id SET DEFAULT nextval('old_visits_id_seq'::regclass);
451
+
452
+
453
+ --
454
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
455
+ --
456
+
457
+ ALTER TABLE person_mails ALTER COLUMN id SET DEFAULT nextval('person_mails_id_seq'::regclass);
458
+
459
+
460
+ --
461
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
462
+ --
463
+
464
+ ALTER TABLE subscriptions ALTER COLUMN id SET DEFAULT nextval('subscriptions_id_seq'::regclass);
465
+
466
+
467
+ --
468
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
469
+ --
470
+
471
+ ALTER TABLE users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
472
+
473
+
474
+ --
475
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
476
+ --
477
+
478
+ ALTER TABLE usersold ALTER COLUMN id SET DEFAULT nextval('usersold_id_seq'::regclass);
479
+
480
+
481
+ --
482
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
483
+ --
484
+
485
+ ALTER TABLE visits ALTER COLUMN id SET DEFAULT nextval('visits_id_seq'::regclass);
486
+
487
+
488
+ --
489
+ -- Name: attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
256
490
  --
257
491
 
258
492
  ALTER TABLE ONLY attachments
@@ -260,7 +494,7 @@ ALTER TABLE ONLY attachments
260
494
 
261
495
 
262
496
  --
263
- -- Name: choices_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
497
+ -- Name: choices_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
264
498
  --
265
499
 
266
500
  ALTER TABLE ONLY choices
@@ -268,7 +502,7 @@ ALTER TABLE ONLY choices
268
502
 
269
503
 
270
504
  --
271
- -- Name: delegations_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
505
+ -- Name: delegations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
272
506
  --
273
507
 
274
508
  ALTER TABLE ONLY delegations
@@ -276,7 +510,7 @@ ALTER TABLE ONLY delegations
276
510
 
277
511
 
278
512
  --
279
- -- Name: elt_person_key; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
513
+ -- Name: elt_person_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
280
514
  --
281
515
 
282
516
  ALTER TABLE ONLY choices
@@ -284,7 +518,7 @@ ALTER TABLE ONLY choices
284
518
 
285
519
 
286
520
  --
287
- -- Name: elts_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
521
+ -- Name: elts_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
288
522
  --
289
523
 
290
524
  ALTER TABLE ONLY elts
@@ -292,7 +526,7 @@ ALTER TABLE ONLY elts
292
526
 
293
527
 
294
528
  --
295
- -- Name: mails_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
529
+ -- Name: mails_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
296
530
  --
297
531
 
298
532
  ALTER TABLE ONLY mails
@@ -300,7 +534,23 @@ ALTER TABLE ONLY mails
300
534
 
301
535
 
302
536
  --
303
- -- Name: people_name_key; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
537
+ -- Name: old_visits_elt_person_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
538
+ --
539
+
540
+ ALTER TABLE ONLY old_visits
541
+ ADD CONSTRAINT old_visits_elt_person_key UNIQUE (elt_id, person_id);
542
+
543
+
544
+ --
545
+ -- Name: old_visits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
546
+ --
547
+
548
+ ALTER TABLE ONLY old_visits
549
+ ADD CONSTRAINT old_visits_pkey PRIMARY KEY (id);
550
+
551
+
552
+ --
553
+ -- Name: people_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
304
554
  --
305
555
 
306
556
  ALTER TABLE ONLY people
@@ -308,7 +558,7 @@ ALTER TABLE ONLY people
308
558
 
309
559
 
310
560
  --
311
- -- Name: people_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
561
+ -- Name: people_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
312
562
  --
313
563
 
314
564
  ALTER TABLE ONLY people
@@ -316,7 +566,7 @@ ALTER TABLE ONLY people
316
566
 
317
567
 
318
568
  --
319
- -- Name: person_mails_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
569
+ -- Name: person_mails_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
320
570
  --
321
571
 
322
572
  ALTER TABLE ONLY person_mails
@@ -324,7 +574,7 @@ ALTER TABLE ONLY person_mails
324
574
 
325
575
 
326
576
  --
327
- -- Name: subscribers_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
577
+ -- Name: subscribers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
328
578
  --
329
579
 
330
580
  ALTER TABLE ONLY subscriptions
@@ -332,7 +582,7 @@ ALTER TABLE ONLY subscriptions
332
582
 
333
583
 
334
584
  --
335
- -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
585
+ -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
336
586
  --
337
587
 
338
588
  ALTER TABLE ONLY users
@@ -340,7 +590,7 @@ ALTER TABLE ONLY users
340
590
 
341
591
 
342
592
  --
343
- -- Name: usersold_person_id_key; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
593
+ -- Name: usersold_person_id_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
344
594
  --
345
595
 
346
596
  ALTER TABLE ONLY usersold
@@ -348,7 +598,7 @@ ALTER TABLE ONLY usersold
348
598
 
349
599
 
350
600
  --
351
- -- Name: usersold_pkey; Type: CONSTRAINT; Schema: public; Owner: manu; Tablespace:
601
+ -- Name: usersold_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
352
602
  --
353
603
 
354
604
  ALTER TABLE ONLY usersold
@@ -356,35 +606,51 @@ ALTER TABLE ONLY usersold
356
606
 
357
607
 
358
608
  --
359
- -- Name: elts_parent; Type: INDEX; Schema: public; Owner: manu; Tablespace:
609
+ -- Name: visits_elt_person_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
610
+ --
611
+
612
+ ALTER TABLE ONLY visits
613
+ ADD CONSTRAINT visits_elt_person_key UNIQUE (elt_id, person_id);
614
+
615
+
616
+ --
617
+ -- Name: visits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
618
+ --
619
+
620
+ ALTER TABLE ONLY visits
621
+ ADD CONSTRAINT visits_pkey PRIMARY KEY (id);
622
+
623
+
624
+ --
625
+ -- Name: elts_parent; Type: INDEX; Schema: public; Owner: -; Tablespace:
360
626
  --
361
627
 
362
628
  CREATE INDEX elts_parent ON elts USING btree (parent_id);
363
629
 
364
630
 
365
631
  --
366
- -- Name: elts_parent_key; Type: INDEX; Schema: public; Owner: manu; Tablespace:
632
+ -- Name: elts_parent_key; Type: INDEX; Schema: public; Owner: -; Tablespace:
367
633
  --
368
634
 
369
635
  CREATE INDEX elts_parent_key ON elts USING btree (parent_id);
370
636
 
371
637
 
372
638
  --
373
- -- Name: lft; Type: INDEX; Schema: public; Owner: manu; Tablespace:
639
+ -- Name: lft; Type: INDEX; Schema: public; Owner: -; Tablespace:
374
640
  --
375
641
 
376
642
  CREATE INDEX lft ON elts USING btree (lft);
377
643
 
378
644
 
379
645
  --
380
- -- Name: rgt; Type: INDEX; Schema: public; Owner: manu; Tablespace:
646
+ -- Name: rgt; Type: INDEX; Schema: public; Owner: -; Tablespace:
381
647
  --
382
648
 
383
649
  CREATE INDEX rgt ON elts USING btree (rgt);
384
650
 
385
651
 
386
652
  --
387
- -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: manu
653
+ -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: -
388
654
  --
389
655
 
390
656
  ALTER TABLE ONLY usersold
@@ -392,7 +658,7 @@ ALTER TABLE ONLY usersold
392
658
 
393
659
 
394
660
  --
395
- -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: manu
661
+ -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: -
396
662
  --
397
663
 
398
664
  ALTER TABLE ONLY subscriptions
@@ -400,7 +666,7 @@ ALTER TABLE ONLY subscriptions
400
666
 
401
667
 
402
668
  --
403
- -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: manu
669
+ -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: -
404
670
  --
405
671
 
406
672
  ALTER TABLE ONLY delegations
@@ -408,7 +674,7 @@ ALTER TABLE ONLY delegations
408
674
 
409
675
 
410
676
  --
411
- -- Name: $3; Type: FK CONSTRAINT; Schema: public; Owner: manu
677
+ -- Name: $3; Type: FK CONSTRAINT; Schema: public; Owner: -
412
678
  --
413
679
 
414
680
  ALTER TABLE ONLY delegations
@@ -416,7 +682,7 @@ ALTER TABLE ONLY delegations
416
682
 
417
683
 
418
684
  --
419
- -- Name: fk_elt_id; Type: FK CONSTRAINT; Schema: public; Owner: manu
685
+ -- Name: fk_elt_id; Type: FK CONSTRAINT; Schema: public; Owner: -
420
686
  --
421
687
 
422
688
  ALTER TABLE ONLY mails
@@ -424,7 +690,7 @@ ALTER TABLE ONLY mails
424
690
 
425
691
 
426
692
  --
427
- -- Name: fk_elt_id; Type: FK CONSTRAINT; Schema: public; Owner: manu
693
+ -- Name: fk_elt_id; Type: FK CONSTRAINT; Schema: public; Owner: -
428
694
  --
429
695
 
430
696
  ALTER TABLE ONLY choices
@@ -432,7 +698,7 @@ ALTER TABLE ONLY choices
432
698
 
433
699
 
434
700
  --
435
- -- Name: fk_person_id; Type: FK CONSTRAINT; Schema: public; Owner: manu
701
+ -- Name: fk_person_id; Type: FK CONSTRAINT; Schema: public; Owner: -
436
702
  --
437
703
 
438
704
  ALTER TABLE ONLY elts
@@ -440,7 +706,7 @@ ALTER TABLE ONLY elts
440
706
 
441
707
 
442
708
  --
443
- -- Name: fk_person_id; Type: FK CONSTRAINT; Schema: public; Owner: manu
709
+ -- Name: fk_person_id; Type: FK CONSTRAINT; Schema: public; Owner: -
444
710
  --
445
711
 
446
712
  ALTER TABLE ONLY users
@@ -448,15 +714,39 @@ ALTER TABLE ONLY users
448
714
 
449
715
 
450
716
  --
451
- -- Name: fk_person_id; Type: FK CONSTRAINT; Schema: public; Owner: manu
717
+ -- Name: fk_person_id; Type: FK CONSTRAINT; Schema: public; Owner: -
452
718
  --
453
719
 
454
720
  ALTER TABLE ONLY choices
455
721
  ADD CONSTRAINT fk_person_id FOREIGN KEY (person_id) REFERENCES people(id) ON UPDATE CASCADE ON DELETE CASCADE;
456
722
 
457
723
 
724
+ --
725
+ -- Name: old_visits_elt_id; Type: FK CONSTRAINT; Schema: public; Owner: -
726
+ --
727
+
728
+ ALTER TABLE ONLY old_visits
729
+ ADD CONSTRAINT old_visits_elt_id FOREIGN KEY (elt_id) REFERENCES elts(id) ON UPDATE CASCADE ON DELETE CASCADE;
730
+
731
+
732
+ --
733
+ -- Name: visits_elt_id; Type: FK CONSTRAINT; Schema: public; Owner: -
734
+ --
735
+
736
+ ALTER TABLE ONLY visits
737
+ ADD CONSTRAINT visits_elt_id FOREIGN KEY (elt_id) REFERENCES elts(id) ON UPDATE CASCADE ON DELETE CASCADE;
738
+
739
+
740
+ --
741
+ -- Name: visits_person_id; Type: FK CONSTRAINT; Schema: public; Owner: -
742
+ --
743
+
744
+ ALTER TABLE ONLY visits
745
+ ADD CONSTRAINT visits_person_id FOREIGN KEY (person_id) REFERENCES people(id) ON UPDATE CASCADE ON DELETE CASCADE;
746
+
747
+
458
748
  --
459
749
  -- PostgreSQL database dump complete
460
750
  --
461
751
 
462
- INSERT INTO schema_info (version) VALUES (6)
752
+ INSERT INTO schema_info (version) VALUES (9)