-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.sql
809 lines (602 loc) · 20.4 KB
/
init.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
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;
--
-- TOC entry 6 (class 2615 OID 2200)
-- Name: plnmonitor; Type: SCHEMA; Schema: -; Owner: plnmonitor
--
--CREATE ROLE plnmonitor LOGIN ENCRYPTED PASSWORD 'md5881a5f13bd547a394004e698b0bf7b83' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
CREATE SCHEMA plnmonitor;
ALTER SCHEMA plnmonitor OWNER TO plnmonitor;
--CREATE DATABASE plnmonitor;
--ALTER DATABASE plnmonitor OWNER TO plnmonitor;
-- TOC entry 2399 (class 0 OID 0)
-- Dependencies: 6
-- Name: SCHEMA plnmonitor; Type: COMMENT; Schema: -; Owner: plnmonitor
--
COMMENT ON SCHEMA plnmonitor IS 'standard public schema';
--
-- TOC entry 192 (class 3079 OID 12123)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 2401 (class 0 OID 0)
-- Dependencies: 192
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = plnmonitor, pg_catalog;
--
-- TOC entry 206 (class 1255 OID 41080)
-- Name: new_au_insert(); Type: FUNCTION; Schema: plnmonitor; Owner: plnmonitor
--
CREATE FUNCTION new_au_insert() RETURNS trigger
LANGUAGE plpgsql
AS $$BEGIN
NEW.VERSION=1;
NEW.created_at = now();
INSERT INTO plnmonitor.au_version
(name,plugin_name,tdb_year,access_type,content_size,recent_poll_agreement,creation_time,version, created_at, box, au_lockss_id, tdb_publisher, volume, disk_usage, last_completed_crawl, last_completed_poll, last_crawl, last_poll, crawl_pool, crawl_proxy, crawl_window, last_crawl_result, last_poll_result, publishing_platform, repository_path, subscription_status, substance_state, available_from_publisher)
VALUES
(NEW.name,NEW.plugin_name,NEW.tdb_year,NEW.access_type,NEW.content_size,NEW.recent_poll_agreement,NEW.creation_time,NEW.version,NEW.created_at,NEW.box, NEW.au_lockss_id, NEW.tdb_publisher, NEW.volume, NEW.disk_usage, NEW.last_completed_crawl, NEW.last_completed_poll, NEW.last_crawl, NEW.last_poll, NEW.crawl_pool, NEW.crawl_proxy, NEW.crawl_window, NEW.last_crawl_result, NEW.last_poll_result, NEW.publishing_platform, NEW.repository_path, NEW.subscription_status, NEW.substance_state, NEW.available_from_publisher);
RETURN NEW;
END $$;
ALTER FUNCTION plnmonitor.new_au_insert() OWNER TO plnmonitor;
--
-- TOC entry 208 (class 1255 OID 41081)
-- Name: new_au_update_version(); Type: FUNCTION; Schema: plnmonitor; Owner: plnmonitor
--
CREATE FUNCTION new_au_update_version() RETURNS trigger
LANGUAGE plpgsql
AS $$BEGIN
NEW.version=OLD.version+1;
NEW.updated_at = now();
INSERT INTO plnmonitor.au_version
(name,plugin_name,tdb_year,access_type,content_size,recent_poll_agreement,creation_time,version, created_at, updated_at, box, au_lockss_id, tdb_publisher, volume, disk_usage, last_completed_crawl, last_completed_poll, last_crawl, last_poll, crawl_pool, crawl_proxy, crawl_window, last_crawl_result, last_poll_result, publishing_platform, repository_path, subscription_status, substance_state, available_from_publisher)
VALUES
(NEW.name,NEW.plugin_name,NEW.tdb_year,NEW.access_type,NEW.content_size,NEW.recent_poll_agreement,NEW.creation_time,NEW.version,NEW.created_at, NEW.updated_at,NEW.box, NEW.au_lockss_id, NEW.tdb_publisher, NEW.volume, NEW.disk_usage, NEW.last_completed_crawl, NEW.last_completed_poll, NEW.last_crawl, NEW.last_poll, NEW.crawl_pool, NEW.crawl_proxy, NEW.crawl_window, NEW.last_crawl_result, NEW.last_poll_result, NEW.publishing_platform, NEW.repository_path, NEW.subscription_status, NEW.substance_state, NEW.available_from_publisher);
RETURN NEW;
END$$;
ALTER FUNCTION plnmonitor.new_au_update_version() OWNER TO plnmonitor;
--
-- TOC entry 207 (class 1255 OID 40977)
-- Name: new_box_data_insert(); Type: FUNCTION; Schema: plnmonitor; Owner: plnmonitor
--
CREATE FUNCTION new_box_data_insert() RETURNS trigger
LANGUAGE plpgsql
AS $$BEGIN
NEW.VERSION=1;
NEW.created_at = now();
INSERT INTO plnmonitor.lockss_box_data_version
(box,used,size,free,percentage,active_aus,version, created_at, repository_space_lockss_id, deleted_aus, inactive_aus, orphaned_aus)
VALUES
(NEW.box,NEW.used,NEW.size,NEW.free,NEW.percentage,NEW.active_aus,NEW.version,NEW.created_at, NEW.repository_space_lockss_id, NEW.deleted_aus, NEW.inactive_aus, NEW.orphaned_aus);
RETURN NEW;
END$$;
ALTER FUNCTION plnmonitor.new_box_data_insert() OWNER TO plnmonitor;
--
-- TOC entry 205 (class 1255 OID 40975)
-- Name: new_box_data_update_version(); Type: FUNCTION; Schema: plnmonitor; Owner: plnmonitor
--
CREATE FUNCTION new_box_data_update_version() RETURNS trigger
LANGUAGE plpgsql
AS $$BEGIN
NEW.version=OLD.version+1;
NEW.updated_at = now();
INSERT INTO plnmonitor.lockss_box_data_version
(box,used,size,free,percentage,active_aus,version, created_at, updated_at, repository_space_lockss_id, deleted_aus, inactive_aus, orphaned_aus)
VALUES
(NEW.box,NEW.used,NEW.size,NEW.free,NEW.percentage,NEW.active_aus,NEW.version,NEW.created_at, NEW.updated_at, NEW.repository_space_lockss_id, NEW.deleted_aus, NEW.inactive_aus, NEW.orphaned_aus);
RETURN NEW;
END
$$;
ALTER FUNCTION plnmonitor.new_box_data_update_version() OWNER TO plnmonitor;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 172 (class 1259 OID 16395)
-- Name: au_current; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE au_current (
name text,
plugin_name text,
tdb_year text,
access_type text,
content_size bigint,
recent_poll_agreement double precision,
creation_time bigint,
version integer,
created_at timestamp with time zone,
updated_at timestamp with time zone,
box integer,
au_lockss_id text,
tdb_publisher text,
volume text,
disk_usage bigint,
last_completed_crawl bigint,
last_completed_poll bigint,
last_crawl bigint,
last_poll bigint,
crawl_pool text,
crawl_proxy text,
crawl_window text,
last_crawl_result text,
last_poll_result text,
publishing_platform text,
repository_path text,
subscription_status text,
substance_state text,
available_from_publisher boolean,
id integer NOT NULL
);
ALTER TABLE au_current OWNER TO plnmonitor;
--
-- TOC entry 182 (class 1259 OID 57355)
-- Name: AU_current_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "AU_current_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "AU_current_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2402 (class 0 OID 0)
-- Dependencies: 182
-- Name: AU_current_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "AU_current_id_seq" OWNED BY au_current.id;
--
-- TOC entry 176 (class 1259 OID 16476)
-- Name: institution; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE institution (
address text,
name text,
id integer NOT NULL,
shortname text
);
ALTER TABLE institution OWNER TO plnmonitor;
--
-- TOC entry 185 (class 1259 OID 57387)
-- Name: Institutions_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "Institutions_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "Institutions_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2403 (class 0 OID 0)
-- Dependencies: 185
-- Name: Institutions_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "Institutions_id_seq" OWNED BY institution.id;
--
-- TOC entry 178 (class 1259 OID 24576)
-- Name: lockss_box_data_current; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE lockss_box_data_current (
box integer NOT NULL,
used bigint,
size bigint,
free bigint,
percentage double precision,
active_aus integer,
version integer,
created_at timestamp with time zone,
updated_at timestamp with time zone,
repository_space_lockss_id text,
deleted_aus integer,
inactive_aus integer,
orphaned_aus integer,
id integer NOT NULL
);
ALTER TABLE lockss_box_data_current OWNER TO plnmonitor;
--
-- TOC entry 189 (class 1259 OID 57490)
-- Name: LOCKSS_box_data_current_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "LOCKSS_box_data_current_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "LOCKSS_box_data_current_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2404 (class 0 OID 0)
-- Dependencies: 189
-- Name: LOCKSS_box_data_current_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "LOCKSS_box_data_current_id_seq" OWNED BY lockss_box_data_current.id;
--
-- TOC entry 179 (class 1259 OID 32770)
-- Name: lockss_box_data_version; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE lockss_box_data_version (
box integer NOT NULL,
version integer NOT NULL,
used bigint,
size bigint,
free bigint,
percentage double precision,
active_aus integer,
created_at timestamp with time zone,
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
repository_space_lockss_id text,
deleted_aus integer,
inactive_aus integer,
orphaned_aus integer,
id integer NOT NULL,
data_current integer
);
ALTER TABLE lockss_box_data_version OWNER TO plnmonitor;
--
-- TOC entry 190 (class 1259 OID 57520)
-- Name: LOCKSS_box_data_version_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "LOCKSS_box_data_version_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "LOCKSS_box_data_version_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2405 (class 0 OID 0)
-- Dependencies: 190
-- Name: LOCKSS_box_data_version_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "LOCKSS_box_data_version_id_seq" OWNED BY lockss_box_data_version.id;
--
-- TOC entry 173 (class 1259 OID 16403)
-- Name: lockss_box; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE lockss_box (
urldss text,
ipaddress text NOT NULL,
uiport text NOT NULL,
pln integer,
physical_address text,
v3identity text,
admin_email text,
daemon_full_version text,
java_version text,
platform text,
"current_time" bigint,
uptime bigint,
groups text,
disks text,
id integer NOT NULL
);
ALTER TABLE lockss_box OWNER TO plnmonitor;
--
-- TOC entry 183 (class 1259 OID 57366)
-- Name: LOCKSS_box_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "LOCKSS_box_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "LOCKSS_box_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2406 (class 0 OID 0)
-- Dependencies: 183
-- Name: LOCKSS_box_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "LOCKSS_box_id_seq" OWNED BY lockss_box.id;
--
-- TOC entry 181 (class 1259 OID 41106)
-- Name: lockss_box_info; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE lockss_box_info (
box integer,
username text,
password text,
longitude double precision,
latitude double precision,
country text,
institution integer,
organizational_manager integer,
technical_manager integer,
physical_address text,
id integer NOT NULL,
name text
);
ALTER TABLE lockss_box_info OWNER TO plnmonitor;
--
-- TOC entry 188 (class 1259 OID 57452)
-- Name: LOCKSS_box_info_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "LOCKSS_box_info_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "LOCKSS_box_info_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2407 (class 0 OID 0)
-- Dependencies: 188
-- Name: LOCKSS_box_info_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "LOCKSS_box_info_id_seq" OWNED BY lockss_box_info.id;
--
-- TOC entry 174 (class 1259 OID 16414)
-- Name: peer; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE peer (
last_poll bigint,
polls_called bigint,
last_invitation bigint,
last_vote bigint,
box integer,
peer_lockss_id text,
last_message bigint,
invitation_count bigint,
message_count bigint,
message_type text,
polls_rejected bigint,
votes_cast bigint,
id integer NOT NULL
);
ALTER TABLE peer OWNER TO plnmonitor;
--
-- TOC entry 186 (class 1259 OID 57397)
-- Name: Peers_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "Peers_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "Peers_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2408 (class 0 OID 0)
-- Dependencies: 186
-- Name: Peers_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "Peers_id_seq" OWNED BY peer.id;
--
-- TOC entry 177 (class 1259 OID 16482)
-- Name: person; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE person (
name text,
first_name text,
email_address text,
institution integer,
id integer NOT NULL,
phone text
);
ALTER TABLE person OWNER TO plnmonitor;
--
-- TOC entry 184 (class 1259 OID 57377)
-- Name: Person_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE "Person_id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE "Person_id_seq" OWNER TO plnmonitor;
--
-- TOC entry 2409 (class 0 OID 0)
-- Dependencies: 184
-- Name: Person_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE "Person_id_seq" OWNED BY person.id;
--
-- TOC entry 180 (class 1259 OID 32789)
-- Name: au_version; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE au_version (
version integer NOT NULL,
name text,
plugin_name text,
tdb_year text,
access_type text,
content_size bigint,
created_at timestamp with time zone,
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
box integer,
recent_poll_agreement double precision,
creation_time bigint,
au_lockss_id text,
tdb_publisher text,
volume text,
disk_usage bigint,
last_completed_crawl bigint,
last_completed_poll bigint,
last_crawl bigint,
last_poll bigint,
crawl_pool text,
crawl_proxy text,
crawl_window text,
last_crawl_result text,
last_poll_result text,
publishing_platform text,
repository_path text,
subscription_status text,
substance_state text,
available_from_publisher boolean,
id integer NOT NULL,
au_current integer
);
ALTER TABLE au_version OWNER TO plnmonitor;
--
-- TOC entry 191 (class 1259 OID 57543)
-- Name: au_version_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE au_version_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE au_version_id_seq OWNER TO plnmonitor;
--
-- TOC entry 2410 (class 0 OID 0)
-- Dependencies: 191
-- Name: au_version_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE au_version_id_seq OWNED BY au_version.id;
--
-- TOC entry 175 (class 1259 OID 16417)
-- Name: pln; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE pln (
name text,
config_url text,
id integer NOT NULL
);
ALTER TABLE pln OWNER TO plnmonitor;
--
-- TOC entry 187 (class 1259 OID 57440)
-- Name: pln_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE pln_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE pln_id_seq OWNER TO plnmonitor;
--
-- TOC entry 2411 (class 0 OID 0)
-- Dependencies: 187
-- Name: pln_id_seq; Type: SEQUENCE OWNED BY; Schema: plnmonitor; Owner: plnmonitor
--
ALTER SEQUENCE pln_id_seq OWNED BY pln.id;
--
-- Name: user_id_seq; Type: SEQUENCE; Schema: plnmonitor; Owner: plnmonitor
--
CREATE SEQUENCE user_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE user_id_seq OWNER TO plnmonitor;
--
-- Name: user; Type: TABLE; Schema: plnmonitor; Owner: plnmonitor; Tablespace:
--
CREATE TABLE "user" (
name text,
"passwordHash" text,
role text,
id integer DEFAULT nextval('user_id_seq'::regclass) NOT NULL
);
ALTER TABLE "user" OWNER TO plnmonitor;
--
-- TOC entry 2215 (class 2604 OID 57357)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY au_current ALTER COLUMN id SET DEFAULT nextval('"AU_current_id_seq"'::regclass);
--
-- TOC entry 2223 (class 2604 OID 57545)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY au_version ALTER COLUMN id SET DEFAULT nextval('au_version_id_seq'::regclass);
--
-- TOC entry 2219 (class 2604 OID 57389)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY institution ALTER COLUMN id SET DEFAULT nextval('"Institutions_id_seq"'::regclass);
--
-- TOC entry 2216 (class 2604 OID 57368)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY lockss_box ALTER COLUMN id SET DEFAULT nextval('"LOCKSS_box_id_seq"'::regclass);
--
-- TOC entry 2221 (class 2604 OID 57492)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY lockss_box_data_current ALTER COLUMN id SET DEFAULT nextval('"LOCKSS_box_data_current_id_seq"'::regclass);
--
-- TOC entry 2222 (class 2604 OID 57522)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY lockss_box_data_version ALTER COLUMN id SET DEFAULT nextval('"LOCKSS_box_data_version_id_seq"'::regclass);
--
-- TOC entry 2224 (class 2604 OID 57454)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY lockss_box_info ALTER COLUMN id SET DEFAULT nextval('"LOCKSS_box_info_id_seq"'::regclass);
--
-- TOC entry 2217 (class 2604 OID 57399)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY peer ALTER COLUMN id SET DEFAULT nextval('"Peers_id_seq"'::regclass);
--
-- TOC entry 2220 (class 2604 OID 57379)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY person ALTER COLUMN id SET DEFAULT nextval('"Person_id_seq"'::regclass);
--
-- TOC entry 2218 (class 2604 OID 57442)
-- Name: id; Type: DEFAULT; Schema: plnmonitor; Owner: plnmonitor
--
ALTER TABLE ONLY pln ALTER COLUMN id SET DEFAULT nextval('pln_id_seq'::regclass);
--
-- TOC entry 2412 (class 0 OID 0)
-- Dependencies: 182
-- Name: AU_current_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"AU_current_id_seq"', 19, true);
--
-- TOC entry 2413 (class 0 OID 0)
-- Dependencies: 185
-- Name: Institutions_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"Institutions_id_seq"', 6, true);
--
-- TOC entry 2414 (class 0 OID 0)
-- Dependencies: 189
-- Name: LOCKSS_box_data_current_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"LOCKSS_box_data_current_id_seq"', 14, true);
--
-- TOC entry 2415 (class 0 OID 0)
-- Dependencies: 190
-- Name: LOCKSS_box_data_version_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"LOCKSS_box_data_version_id_seq"', 221, true);
--
-- TOC entry 2416 (class 0 OID 0)
-- Dependencies: 183
-- Name: LOCKSS_box_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"LOCKSS_box_id_seq"', 12, true);
--
-- TOC entry 2417 (class 0 OID 0)
-- Dependencies: 188
-- Name: LOCKSS_box_info_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"LOCKSS_box_info_id_seq"', 7, true);
--
-- TOC entry 2418 (class 0 OID 0)
-- Dependencies: 186
-- Name: Peers_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"Peers_id_seq"', 11, true);
--
-- TOC entry 2419 (class 0 OID 0)
-- Dependencies: 184
-- Name: Person_id_seq; Type: SEQUENCE SET; Schema: plnmonitor; Owner: plnmonitor
--
SELECT pg_catalog.setval('"Person_id_seq"', 10, true);