-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackup.sql
1677 lines (1258 loc) · 35.5 KB
/
backup.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 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;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: alergies; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE alergies (
id integer NOT NULL,
usuario_id integer,
alimentos boolean,
detalle_alimento text,
picaduras boolean,
detalle_picaduras text,
medicinas boolean,
detalle_medicinas text,
otras text
);
ALTER TABLE public.alergies OWNER TO manuel;
--
-- Name: alergias_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE alergias_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.alergias_id_seq OWNER TO manuel;
--
-- Name: alergias_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE alergias_id_seq OWNED BY alergies.id;
--
-- Name: datos_registros; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE datos_registros (
id integer NOT NULL,
usuario_id integer,
nombre text,
ci integer,
credencial integer,
"fechaNac" date,
nivel_id integer,
region_id integer,
distrito_id integer,
grupo_id integer,
rama_id integer,
unidad_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
ALTER TABLE public.datos_registros OWNER TO manuel;
--
-- Name: datos_registros_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE datos_registros_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.datos_registros_id_seq OWNER TO manuel;
--
-- Name: datos_registros_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE datos_registros_id_seq OWNED BY datos_registros.id;
--
-- Name: datos_usuarios; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE datos_usuarios (
id integer NOT NULL,
usuario_id integer,
tel1 character varying(255),
tel2 character varying(255),
correo character varying(255),
direccion1 text,
direccion2 text,
contacto1 character varying(255),
contacto2 character varying(255),
created_at timestamp without time zone,
updated_at timestamp without time zone,
tipo_sangre_id integer
);
ALTER TABLE public.datos_usuarios OWNER TO manuel;
--
-- Name: datos_usuarios_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE datos_usuarios_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.datos_usuarios_id_seq OWNER TO manuel;
--
-- Name: datos_usuarios_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE datos_usuarios_id_seq OWNED BY datos_usuarios.id;
--
-- Name: distritos; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE distritos (
id integer NOT NULL,
region_id integer,
distrito character varying(64)
);
ALTER TABLE public.distritos OWNER TO manuel;
--
-- Name: distritos_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE distritos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.distritos_id_seq OWNER TO manuel;
--
-- Name: distritos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE distritos_id_seq OWNED BY distritos.id;
--
-- Name: enfermedades; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE enfermedades (
id integer NOT NULL,
usuario_id integer,
diabetes boolean,
cancer boolean,
cardiopatias boolean,
hemofilia boolean,
asma boolean,
amigdalitis boolean,
hipotension boolean,
hipertension boolean,
epilepsia boolean,
sinusitis boolean,
otras text
);
ALTER TABLE public.enfermedades OWNER TO manuel;
--
-- Name: enfermedads_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE enfermedads_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.enfermedads_id_seq OWNER TO manuel;
--
-- Name: enfermedads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE enfermedads_id_seq OWNED BY enfermedades.id;
--
-- Name: eses; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE eses (
id integer NOT NULL,
usuario_id integer
);
ALTER TABLE public.eses OWNER TO manuel;
--
-- Name: eses_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE eses_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.eses_id_seq OWNER TO manuel;
--
-- Name: eses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE eses_id_seq OWNED BY eses.id;
--
-- Name: fichas_medicas; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE fichas_medicas (
id integer NOT NULL,
usuario_id integer,
vacuna_id integer,
enfermedade_id integer,
alergia_id integer,
padecimiento_id integer,
tiposangre_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
ALTER TABLE public.fichas_medicas OWNER TO manuel;
--
-- Name: fichas_medicas_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE fichas_medicas_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.fichas_medicas_id_seq OWNER TO manuel;
--
-- Name: fichas_medicas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE fichas_medicas_id_seq OWNED BY fichas_medicas.id;
--
-- Name: grupos; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE grupos (
id integer NOT NULL,
region_id integer,
distrito_id integer,
grupo character varying(128)
);
ALTER TABLE public.grupos OWNER TO manuel;
--
-- Name: grupos_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE grupos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.grupos_id_seq OWNER TO manuel;
--
-- Name: grupos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE grupos_id_seq OWNED BY grupos.id;
--
-- Name: nivels; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE nivels (
id integer NOT NULL,
nivel character varying(32)
);
ALTER TABLE public.nivels OWNER TO manuel;
--
-- Name: nivels_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE nivels_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.nivels_id_seq OWNER TO manuel;
--
-- Name: nivels_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE nivels_id_seq OWNED BY nivels.id;
--
-- Name: padecimientos; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE padecimientos (
id integer NOT NULL,
usuario_id integer,
lechina boolean,
hepatitis boolean,
rubeola boolean,
apendicitis boolean,
sarampion boolean,
insomnio boolean,
paperas boolean,
sonambulismo boolean,
estrenimiento boolean,
acidez boolean,
ulcera boolean,
asma boolean,
reflujo boolean,
bulimia boolean,
hiv boolean,
otras text
);
ALTER TABLE public.padecimientos OWNER TO manuel;
--
-- Name: padecimientos_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE padecimientos_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.padecimientos_id_seq OWNER TO manuel;
--
-- Name: padecimientos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE padecimientos_id_seq OWNED BY padecimientos.id;
--
-- Name: ramas; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE ramas (
id integer NOT NULL,
rama character(12)
);
ALTER TABLE public.ramas OWNER TO manuel;
--
-- Name: ramas_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE ramas_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.ramas_id_seq OWNER TO manuel;
--
-- Name: ramas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE ramas_id_seq OWNED BY ramas.id;
--
-- Name: regions; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE regions (
id integer NOT NULL,
region character varying(32)
);
ALTER TABLE public.regions OWNER TO manuel;
--
-- Name: regions_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE regions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.regions_id_seq OWNER TO manuel;
--
-- Name: regions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE regions_id_seq OWNED BY regions.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE schema_migrations (
version character varying(255) NOT NULL
);
ALTER TABLE public.schema_migrations OWNER TO manuel;
--
-- Name: tipo_sangres; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE tipo_sangres (
id integer NOT NULL,
tipo character varying(6)
);
ALTER TABLE public.tipo_sangres OWNER TO manuel;
--
-- Name: tiposangres_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE tiposangres_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.tiposangres_id_seq OWNER TO manuel;
--
-- Name: tiposangres_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE tiposangres_id_seq OWNED BY tipo_sangres.id;
--
-- Name: unidads; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE unidads (
id integer NOT NULL,
rama_id integer,
unidad character varying(16)
);
ALTER TABLE public.unidads OWNER TO manuel;
--
-- Name: unidads_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE unidads_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.unidads_id_seq OWNER TO manuel;
--
-- Name: unidads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE unidads_id_seq OWNED BY unidads.id;
--
-- Name: usuarios; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE usuarios (
id integer NOT NULL,
email character varying(255) DEFAULT ''::character varying NOT NULL,
encrypted_password character varying(255) DEFAULT ''::character varying NOT NULL,
reset_password_token character varying(255),
reset_password_sent_at timestamp without time zone,
remember_created_at timestamp without time zone,
sign_in_count integer DEFAULT 0 NOT NULL,
current_sign_in_at timestamp without time zone,
last_sign_in_at timestamp without time zone,
current_sign_in_ip character varying(255),
last_sign_in_ip character varying(255),
created_at timestamp without time zone,
updated_at timestamp without time zone
);
ALTER TABLE public.usuarios OWNER TO manuel;
--
-- Name: usuarios_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE usuarios_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.usuarios_id_seq OWNER TO manuel;
--
-- Name: usuarios_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE usuarios_id_seq OWNED BY usuarios.id;
--
-- Name: usuarios_rutas; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE usuarios_rutas (
id integer NOT NULL,
usuario_id integer,
ruta_id integer
);
ALTER TABLE public.usuarios_rutas OWNER TO manuel;
--
-- Name: usuarios_rutas_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE usuarios_rutas_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.usuarios_rutas_id_seq OWNER TO manuel;
--
-- Name: usuarios_rutas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE usuarios_rutas_id_seq OWNED BY usuarios_rutas.id;
--
-- Name: vacunas; Type: TABLE; Schema: public; Owner: manuel; Tablespace:
--
CREATE TABLE vacunas (
id integer NOT NULL,
usuario_id integer,
tetanos boolean,
sarampion boolean,
rubeola boolean,
tiroidea boolean,
hepatitis boolean,
gripe boolean,
otras text
);
ALTER TABLE public.vacunas OWNER TO manuel;
--
-- Name: vacunas_id_seq; Type: SEQUENCE; Schema: public; Owner: manuel
--
CREATE SEQUENCE vacunas_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.vacunas_id_seq OWNER TO manuel;
--
-- Name: vacunas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: manuel
--
ALTER SEQUENCE vacunas_id_seq OWNED BY vacunas.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY alergies ALTER COLUMN id SET DEFAULT nextval('alergias_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY datos_registros ALTER COLUMN id SET DEFAULT nextval('datos_registros_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY datos_usuarios ALTER COLUMN id SET DEFAULT nextval('datos_usuarios_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY distritos ALTER COLUMN id SET DEFAULT nextval('distritos_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY enfermedades ALTER COLUMN id SET DEFAULT nextval('enfermedads_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY eses ALTER COLUMN id SET DEFAULT nextval('eses_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY fichas_medicas ALTER COLUMN id SET DEFAULT nextval('fichas_medicas_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY grupos ALTER COLUMN id SET DEFAULT nextval('grupos_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY nivels ALTER COLUMN id SET DEFAULT nextval('nivels_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY padecimientos ALTER COLUMN id SET DEFAULT nextval('padecimientos_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY ramas ALTER COLUMN id SET DEFAULT nextval('ramas_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY regions ALTER COLUMN id SET DEFAULT nextval('regions_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY tipo_sangres ALTER COLUMN id SET DEFAULT nextval('tiposangres_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY unidads ALTER COLUMN id SET DEFAULT nextval('unidads_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY usuarios ALTER COLUMN id SET DEFAULT nextval('usuarios_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY usuarios_rutas ALTER COLUMN id SET DEFAULT nextval('usuarios_rutas_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: manuel
--
ALTER TABLE ONLY vacunas ALTER COLUMN id SET DEFAULT nextval('vacunas_id_seq'::regclass);
--
-- Name: alergias_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('alergias_id_seq', 3, true);
--
-- Data for Name: alergies; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY alergies (id, usuario_id, alimentos, detalle_alimento, picaduras, detalle_picaduras, medicinas, detalle_medicinas, otras) FROM stdin;
2 4 \N t Abeja \N polvo
3 5 t \N t
\.
--
-- Data for Name: datos_registros; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY datos_registros (id, usuario_id, nombre, ci, credencial, "fechaNac", nivel_id, region_id, distrito_id, grupo_id, rama_id, unidad_id, created_at, updated_at) FROM stdin;
7 4 Manuel Lucena 15778807 20006627 2000-10-10 \N 20 76 307 5 7 2014-03-16 17:27:01.981419 2014-03-16 17:27:01.981419
8 5 perol 123456 123456 2000-10-10 \N 14 1 1 1 1 2014-03-16 18:01:32.844416 2014-03-16 18:01:32.844416
\.
--
-- Name: datos_registros_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('datos_registros_id_seq', 8, true);
--
-- Data for Name: datos_usuarios; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY datos_usuarios (id, usuario_id, tel1, tel2, correo, direccion1, direccion2, contacto1, contacto2, created_at, updated_at, tipo_sangre_id) FROM stdin;
6 4 04125156029 mlucenap@gmail.com Calle 32 Elvia Pérez 2014-03-16 17:27:18.590105 2014-03-16 17:27:18.590105 7
7 5 123 132 perol@perol.com 123 133 13 123 2014-03-16 18:01:42.451652 2014-03-16 18:01:42.451652 1
\.
--
-- Name: datos_usuarios_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('datos_usuarios_id_seq', 7, true);
--
-- Data for Name: distritos; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY distritos (id, region_id, distrito) FROM stdin;
1 14 Anzoátegui I
2 14 Anzoátegui II
3 14 Anzoátegui III
4 15 Antonio José de Sucre
5 15 Atanasio Girardot
6 15 José Félix Ribas
7 15 Mario Briceño Iragorri
8 15 Santiago Mariño
9 16 Caroní
10 16 Gran Sabana
11 16 Orinoco
12 17 Apure
13 17 Barinas
14 17 CSSN
15 17 Colonia Tovar
16 17 Guarapiche
17 17 Insular
18 17 La Paz
19 17 Moromoy
20 17 Siete Colinas
21 17 Sucre
22 18 Guacara
23 18 Naguanagua
24 18 Puerto Cabello
25 18 San Diego
26 18 Valencia Norte
27 18 Valencia Sur
28 18 Valles Altos
29 19 Acarigua
30 19 Cojedes
31 19 Guanare
32 19 Guárico
33 19 Yaracuy
34 20 Manaure
35 20 Paraguaná
36 21 Andrés Eloy Blanco
37 21 Catedral
38 21 Crepuscular
39 21 Palavecino
40 21 Torres
41 22 Alberto Adriani
42 22 Andrés Bello
43 22 Carí
44 22 Mocotíes
45 22 Tulio Febres Cordero
46 23 23 de Enero
47 23 Ávila
48 23 Baruta
49 23 Caricuao
50 23 Chacao
51 23 José Antonio Páez
52 23 Los Próceres
53 23 Mariscal Sucre
54 23 Santiago de León
55 23 Sucre Norte
56 23 Sucre Sur
57 23 Vargas
58 24 Cristóbal Rojas Urdaneta
59 24 Guaicaipuro
60 24 Independencia Paz Castillo
61 24 Lander
62 24 Los Salias
63 24 Plaza
64 24 Zamora
65 25 Luis Amigó
66 25 Parque Chorro El Indio
67 25 Parque Nacional El Tamá
68 25 Río Torbes
69 25 Trasandino
70 26 Coquivacoa
71 26 Pedro Henríquez Amado
72 26 Samuel Martínez
73 26 San Francisco
74 26 Sur Zulia
75 26 Zulia Oriental
76 27 NO APLICA
\.
--
-- Name: distritos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('distritos_id_seq', 76, true);
--
-- Data for Name: enfermedades; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY enfermedades (id, usuario_id, diabetes, cancer, cardiopatias, hemofilia, asma, amigdalitis, hipotension, hipertension, epilepsia, sinusitis, otras) FROM stdin;
5 4 \N \N \N \N \N t \N t \N t
6 5 t \N \N \N t \N \N \N \N \N
\.
--
-- Name: enfermedads_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('enfermedads_id_seq', 6, true);
--
-- Data for Name: eses; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY eses (id, usuario_id) FROM stdin;
\.
--
-- Name: eses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('eses_id_seq', 1, false);
--
-- Data for Name: fichas_medicas; Type: TABLE DATA; Schema: public; Owner: manuel
--
COPY fichas_medicas (id, usuario_id, vacuna_id, enfermedade_id, alergia_id, padecimiento_id, tiposangre_id, created_at, updated_at) FROM stdin;
5 4 \N \N \N \N \N 2014-03-16 17:27:39.437306 2014-03-16 17:27:39.437306
6 5 \N \N \N \N \N 2014-03-16 18:01:45.829559 2014-03-16 18:01:45.829559
\.
--
-- Name: fichas_medicas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: manuel
--
SELECT pg_catalog.setval('fichas_medicas_id_seq', 6, true);
--
-- Data for Name: grupos; Type: TABLE DATA; Schema: public; Owner: manuel