lookup_by 0.10.9 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +17 -9
  4. data/Appraisals +6 -6
  5. data/CHANGELOG.md +58 -0
  6. data/Gemfile +6 -10
  7. data/MIT-LICENSE +1 -1
  8. data/README.md +30 -27
  9. data/Rakefile +20 -2
  10. data/circle.yml +4 -2
  11. data/gemfiles/rails_6.0.gemfile +17 -0
  12. data/gemfiles/rails_6.1.gemfile +17 -0
  13. data/gemfiles/rails_7.0.gemfile +17 -0
  14. data/lib/lookup_by/association.rb +9 -3
  15. data/lib/lookup_by/cache.rb +17 -21
  16. data/lib/lookup_by/caching/safe_lru.rb +1 -1
  17. data/lib/lookup_by/hooks/formtastic.rb +2 -1
  18. data/lib/lookup_by/hooks/simple_form.rb +2 -1
  19. data/lib/lookup_by/lookup.rb +27 -13
  20. data/lib/lookup_by/version.rb +1 -1
  21. data/lib/lookup_by.rb +2 -0
  22. data/lookup_by.gemspec +2 -2
  23. data/spec/association_spec.rb +1 -0
  24. data/spec/cache_spec.rb +10 -0
  25. data/spec/{dummy → internal}/app/models/account.rb +0 -0
  26. data/spec/{dummy → internal}/app/models/address.rb +0 -0
  27. data/spec/{dummy → internal}/app/models/city.rb +0 -0
  28. data/spec/{dummy → internal}/app/models/country.rb +0 -0
  29. data/spec/{dummy → internal}/app/models/email_address.rb +0 -0
  30. data/spec/{dummy → internal}/app/models/ip_address.rb +0 -0
  31. data/spec/{dummy → internal}/app/models/path.rb +0 -0
  32. data/spec/{dummy → internal}/app/models/phone_number.rb +0 -0
  33. data/spec/{dummy → internal}/app/models/postal_code.rb +0 -0
  34. data/spec/{dummy → internal}/app/models/raisin.rb +0 -0
  35. data/spec/{dummy → internal}/app/models/read_through_raisin.rb +0 -0
  36. data/spec/{dummy → internal}/app/models/state.rb +0 -0
  37. data/spec/{dummy → internal}/app/models/status.rb +0 -0
  38. data/spec/{dummy → internal}/app/models/street.rb +0 -0
  39. data/spec/{dummy → internal}/app/models/uncacheable.rb +0 -0
  40. data/spec/{dummy → internal}/app/models/unfindable.rb +0 -0
  41. data/spec/{dummy → internal}/app/models/unsynchronizable.rb +0 -0
  42. data/spec/{dummy → internal}/app/models/user_agent.rb +0 -0
  43. data/spec/internal/config/database.yml +8 -0
  44. data/spec/internal/db/schema.rb +49 -0
  45. data/spec/{dummy → internal}/lib/missing.rb +0 -0
  46. data/spec/internal/log/.gitignore +1 -0
  47. data/spec/lookup_by_spec.rb +22 -6
  48. data/spec/rails_helper.rb +6 -13
  49. data/spec/support/shared_examples_for_a_lookup.rb +28 -7
  50. metadata +58 -94
  51. data/gemfiles/rails_4.0.gemfile +0 -22
  52. data/gemfiles/rails_4.1.gemfile +0 -22
  53. data/gemfiles/rails_4.2.gemfile +0 -22
  54. data/spec/dummy/Rakefile +0 -22
  55. data/spec/dummy/app/models/.gitkeep +0 -0
  56. data/spec/dummy/bin/bundle +0 -3
  57. data/spec/dummy/bin/rails +0 -4
  58. data/spec/dummy/bin/rake +0 -4
  59. data/spec/dummy/config/application.rb +0 -28
  60. data/spec/dummy/config/boot.rb +0 -6
  61. data/spec/dummy/config/database.yml +0 -44
  62. data/spec/dummy/config/environment.rb +0 -5
  63. data/spec/dummy/config/environments/development.rb +0 -20
  64. data/spec/dummy/config/environments/test.rb +0 -19
  65. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  66. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  67. data/spec/dummy/config/initializers/inflections.rb +0 -16
  68. data/spec/dummy/config/locales/en.yml +0 -23
  69. data/spec/dummy/config.ru +0 -4
  70. data/spec/dummy/db/migrate/20121019040009_create_tables.rb +0 -41
  71. data/spec/dummy/db/seeds.rb +0 -1
  72. data/spec/dummy/db/structure.sql +0 -1053
  73. data/spec/dummy/log/.gitkeep +0 -0
  74. data/spec/dummy/script/rails +0 -6
@@ -1,1053 +0,0 @@
1
- --
2
- -- PostgreSQL database dump
3
- --
4
-
5
- -- Dumped from database version 9.6.1
6
- -- Dumped by pg_dump version 9.6.1
7
-
8
- SET statement_timeout = 0;
9
- SET lock_timeout = 0;
10
- SET idle_in_transaction_session_timeout = 0;
11
- SET client_encoding = 'UTF8';
12
- SET standard_conforming_strings = on;
13
- SET check_function_bodies = false;
14
- SET client_min_messages = warning;
15
- SET row_security = off;
16
-
17
- --
18
- -- Name: traffic; Type: SCHEMA; Schema: -; Owner: -
19
- --
20
-
21
- CREATE SCHEMA traffic;
22
-
23
-
24
- --
25
- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
26
- --
27
-
28
- CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
29
-
30
-
31
- --
32
- -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
33
- --
34
-
35
- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
36
-
37
-
38
- --
39
- -- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
40
- --
41
-
42
- CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
43
-
44
-
45
- --
46
- -- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: -
47
- --
48
-
49
- COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
50
-
51
-
52
- SET search_path = public, pg_catalog;
53
-
54
- SET default_tablespace = '';
55
-
56
- SET default_with_oids = false;
57
-
58
- --
59
- -- Name: accounts; Type: TABLE; Schema: public; Owner: -
60
- --
61
-
62
- CREATE TABLE accounts (
63
- account_id integer NOT NULL,
64
- account text NOT NULL,
65
- phone_number_id integer
66
- );
67
-
68
-
69
- --
70
- -- Name: accounts_account_id_seq; Type: SEQUENCE; Schema: public; Owner: -
71
- --
72
-
73
- CREATE SEQUENCE accounts_account_id_seq
74
- START WITH 1
75
- INCREMENT BY 1
76
- NO MINVALUE
77
- NO MAXVALUE
78
- CACHE 1;
79
-
80
-
81
- --
82
- -- Name: accounts_account_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
83
- --
84
-
85
- ALTER SEQUENCE accounts_account_id_seq OWNED BY accounts.account_id;
86
-
87
-
88
- --
89
- -- Name: addresses; Type: TABLE; Schema: public; Owner: -
90
- --
91
-
92
- CREATE TABLE addresses (
93
- address_id integer NOT NULL,
94
- address text NOT NULL,
95
- city_id integer,
96
- state_id integer,
97
- postal_code_id integer,
98
- street_id integer,
99
- country_id integer
100
- );
101
-
102
-
103
- --
104
- -- Name: addresses_address_id_seq; Type: SEQUENCE; Schema: public; Owner: -
105
- --
106
-
107
- CREATE SEQUENCE addresses_address_id_seq
108
- START WITH 1
109
- INCREMENT BY 1
110
- NO MINVALUE
111
- NO MAXVALUE
112
- CACHE 1;
113
-
114
-
115
- --
116
- -- Name: addresses_address_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
117
- --
118
-
119
- ALTER SEQUENCE addresses_address_id_seq OWNED BY addresses.address_id;
120
-
121
-
122
- --
123
- -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
124
- --
125
-
126
- CREATE TABLE ar_internal_metadata (
127
- key character varying NOT NULL,
128
- value character varying,
129
- created_at timestamp without time zone NOT NULL,
130
- updated_at timestamp without time zone NOT NULL
131
- );
132
-
133
-
134
- --
135
- -- Name: cities; Type: TABLE; Schema: public; Owner: -
136
- --
137
-
138
- CREATE TABLE cities (
139
- city_id integer NOT NULL,
140
- city text NOT NULL
141
- );
142
-
143
-
144
- --
145
- -- Name: cities_city_id_seq; Type: SEQUENCE; Schema: public; Owner: -
146
- --
147
-
148
- CREATE SEQUENCE cities_city_id_seq
149
- START WITH 1
150
- INCREMENT BY 1
151
- NO MINVALUE
152
- NO MAXVALUE
153
- CACHE 1;
154
-
155
-
156
- --
157
- -- Name: cities_city_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
158
- --
159
-
160
- ALTER SEQUENCE cities_city_id_seq OWNED BY cities.city_id;
161
-
162
-
163
- --
164
- -- Name: countries; Type: TABLE; Schema: public; Owner: -
165
- --
166
-
167
- CREATE TABLE countries (
168
- country_id integer NOT NULL,
169
- country text NOT NULL
170
- );
171
-
172
-
173
- --
174
- -- Name: countries_country_id_seq; Type: SEQUENCE; Schema: public; Owner: -
175
- --
176
-
177
- CREATE SEQUENCE countries_country_id_seq
178
- START WITH 1
179
- INCREMENT BY 1
180
- NO MINVALUE
181
- NO MAXVALUE
182
- CACHE 1;
183
-
184
-
185
- --
186
- -- Name: countries_country_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
187
- --
188
-
189
- ALTER SEQUENCE countries_country_id_seq OWNED BY countries.country_id;
190
-
191
-
192
- --
193
- -- Name: email_addresses; Type: TABLE; Schema: public; Owner: -
194
- --
195
-
196
- CREATE TABLE email_addresses (
197
- email_address_id integer NOT NULL,
198
- email_address text NOT NULL
199
- );
200
-
201
-
202
- --
203
- -- Name: email_addresses_email_address_id_seq; Type: SEQUENCE; Schema: public; Owner: -
204
- --
205
-
206
- CREATE SEQUENCE email_addresses_email_address_id_seq
207
- START WITH 1
208
- INCREMENT BY 1
209
- NO MINVALUE
210
- NO MAXVALUE
211
- CACHE 1;
212
-
213
-
214
- --
215
- -- Name: email_addresses_email_address_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
216
- --
217
-
218
- ALTER SEQUENCE email_addresses_email_address_id_seq OWNED BY email_addresses.email_address_id;
219
-
220
-
221
- --
222
- -- Name: ip_addresses; Type: TABLE; Schema: public; Owner: -
223
- --
224
-
225
- CREATE TABLE ip_addresses (
226
- ip_address_id integer NOT NULL,
227
- ip_address inet NOT NULL
228
- );
229
-
230
-
231
- --
232
- -- Name: ip_addresses_ip_address_id_seq; Type: SEQUENCE; Schema: public; Owner: -
233
- --
234
-
235
- CREATE SEQUENCE ip_addresses_ip_address_id_seq
236
- START WITH 1
237
- INCREMENT BY 1
238
- NO MINVALUE
239
- NO MAXVALUE
240
- CACHE 1;
241
-
242
-
243
- --
244
- -- Name: ip_addresses_ip_address_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
245
- --
246
-
247
- ALTER SEQUENCE ip_addresses_ip_address_id_seq OWNED BY ip_addresses.ip_address_id;
248
-
249
-
250
- --
251
- -- Name: phone_numbers; Type: TABLE; Schema: public; Owner: -
252
- --
253
-
254
- CREATE TABLE phone_numbers (
255
- phone_number_id integer NOT NULL,
256
- phone_number text NOT NULL
257
- );
258
-
259
-
260
- --
261
- -- Name: phone_numbers_phone_number_id_seq; Type: SEQUENCE; Schema: public; Owner: -
262
- --
263
-
264
- CREATE SEQUENCE phone_numbers_phone_number_id_seq
265
- START WITH 1
266
- INCREMENT BY 1
267
- NO MINVALUE
268
- NO MAXVALUE
269
- CACHE 1;
270
-
271
-
272
- --
273
- -- Name: phone_numbers_phone_number_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
274
- --
275
-
276
- ALTER SEQUENCE phone_numbers_phone_number_id_seq OWNED BY phone_numbers.phone_number_id;
277
-
278
-
279
- --
280
- -- Name: postal_codes; Type: TABLE; Schema: public; Owner: -
281
- --
282
-
283
- CREATE TABLE postal_codes (
284
- postal_code_id integer NOT NULL,
285
- postal_code text NOT NULL
286
- );
287
-
288
-
289
- --
290
- -- Name: postal_codes_postal_code_id_seq; Type: SEQUENCE; Schema: public; Owner: -
291
- --
292
-
293
- CREATE SEQUENCE postal_codes_postal_code_id_seq
294
- START WITH 1
295
- INCREMENT BY 1
296
- NO MINVALUE
297
- NO MAXVALUE
298
- CACHE 1;
299
-
300
-
301
- --
302
- -- Name: postal_codes_postal_code_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
303
- --
304
-
305
- ALTER SEQUENCE postal_codes_postal_code_id_seq OWNED BY postal_codes.postal_code_id;
306
-
307
-
308
- --
309
- -- Name: raisins; Type: TABLE; Schema: public; Owner: -
310
- --
311
-
312
- CREATE TABLE raisins (
313
- raisin_id integer NOT NULL,
314
- raisin text NOT NULL
315
- );
316
-
317
-
318
- --
319
- -- Name: raisins_raisin_id_seq; Type: SEQUENCE; Schema: public; Owner: -
320
- --
321
-
322
- CREATE SEQUENCE raisins_raisin_id_seq
323
- START WITH 1
324
- INCREMENT BY 1
325
- NO MINVALUE
326
- NO MAXVALUE
327
- CACHE 1;
328
-
329
-
330
- --
331
- -- Name: raisins_raisin_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
332
- --
333
-
334
- ALTER SEQUENCE raisins_raisin_id_seq OWNED BY raisins.raisin_id;
335
-
336
-
337
- --
338
- -- Name: read_through_raisins; Type: TABLE; Schema: public; Owner: -
339
- --
340
-
341
- CREATE TABLE read_through_raisins (
342
- read_through_raisin_id integer NOT NULL,
343
- read_through_raisin text NOT NULL
344
- );
345
-
346
-
347
- --
348
- -- Name: read_through_raisins_read_through_raisin_id_seq; Type: SEQUENCE; Schema: public; Owner: -
349
- --
350
-
351
- CREATE SEQUENCE read_through_raisins_read_through_raisin_id_seq
352
- START WITH 1
353
- INCREMENT BY 1
354
- NO MINVALUE
355
- NO MAXVALUE
356
- CACHE 1;
357
-
358
-
359
- --
360
- -- Name: read_through_raisins_read_through_raisin_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
361
- --
362
-
363
- ALTER SEQUENCE read_through_raisins_read_through_raisin_id_seq OWNED BY read_through_raisins.read_through_raisin_id;
364
-
365
-
366
- --
367
- -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
368
- --
369
-
370
- CREATE TABLE schema_migrations (
371
- version character varying NOT NULL
372
- );
373
-
374
-
375
- --
376
- -- Name: states; Type: TABLE; Schema: public; Owner: -
377
- --
378
-
379
- CREATE TABLE states (
380
- state_id integer NOT NULL,
381
- state text NOT NULL
382
- );
383
-
384
-
385
- --
386
- -- Name: states_state_id_seq; Type: SEQUENCE; Schema: public; Owner: -
387
- --
388
-
389
- CREATE SEQUENCE states_state_id_seq
390
- START WITH 1
391
- INCREMENT BY 1
392
- NO MINVALUE
393
- NO MAXVALUE
394
- CACHE 1;
395
-
396
-
397
- --
398
- -- Name: states_state_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
399
- --
400
-
401
- ALTER SEQUENCE states_state_id_seq OWNED BY states.state_id;
402
-
403
-
404
- --
405
- -- Name: statuses; Type: TABLE; Schema: public; Owner: -
406
- --
407
-
408
- CREATE TABLE statuses (
409
- status_id smallint NOT NULL,
410
- status text NOT NULL
411
- );
412
-
413
-
414
- --
415
- -- Name: statuses_status_id_seq; Type: SEQUENCE; Schema: public; Owner: -
416
- --
417
-
418
- CREATE SEQUENCE statuses_status_id_seq
419
- START WITH 1
420
- INCREMENT BY 1
421
- NO MINVALUE
422
- NO MAXVALUE
423
- CACHE 1;
424
-
425
-
426
- --
427
- -- Name: statuses_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
428
- --
429
-
430
- ALTER SEQUENCE statuses_status_id_seq OWNED BY statuses.status_id;
431
-
432
-
433
- --
434
- -- Name: streets; Type: TABLE; Schema: public; Owner: -
435
- --
436
-
437
- CREATE TABLE streets (
438
- street_id integer NOT NULL,
439
- street text NOT NULL
440
- );
441
-
442
-
443
- --
444
- -- Name: streets_street_id_seq; Type: SEQUENCE; Schema: public; Owner: -
445
- --
446
-
447
- CREATE SEQUENCE streets_street_id_seq
448
- START WITH 1
449
- INCREMENT BY 1
450
- NO MINVALUE
451
- NO MAXVALUE
452
- CACHE 1;
453
-
454
-
455
- --
456
- -- Name: streets_street_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
457
- --
458
-
459
- ALTER SEQUENCE streets_street_id_seq OWNED BY streets.street_id;
460
-
461
-
462
- --
463
- -- Name: uncacheables; Type: TABLE; Schema: public; Owner: -
464
- --
465
-
466
- CREATE TABLE uncacheables (
467
- uncacheable_id integer NOT NULL,
468
- uncacheable text NOT NULL
469
- );
470
-
471
-
472
- --
473
- -- Name: uncacheables_uncacheable_id_seq; Type: SEQUENCE; Schema: public; Owner: -
474
- --
475
-
476
- CREATE SEQUENCE uncacheables_uncacheable_id_seq
477
- START WITH 1
478
- INCREMENT BY 1
479
- NO MINVALUE
480
- NO MAXVALUE
481
- CACHE 1;
482
-
483
-
484
- --
485
- -- Name: uncacheables_uncacheable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
486
- --
487
-
488
- ALTER SEQUENCE uncacheables_uncacheable_id_seq OWNED BY uncacheables.uncacheable_id;
489
-
490
-
491
- --
492
- -- Name: unfindables; Type: TABLE; Schema: public; Owner: -
493
- --
494
-
495
- CREATE TABLE unfindables (
496
- unfindable_id integer NOT NULL,
497
- unfindable text NOT NULL
498
- );
499
-
500
-
501
- --
502
- -- Name: unfindables_unfindable_id_seq; Type: SEQUENCE; Schema: public; Owner: -
503
- --
504
-
505
- CREATE SEQUENCE unfindables_unfindable_id_seq
506
- START WITH 1
507
- INCREMENT BY 1
508
- NO MINVALUE
509
- NO MAXVALUE
510
- CACHE 1;
511
-
512
-
513
- --
514
- -- Name: unfindables_unfindable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
515
- --
516
-
517
- ALTER SEQUENCE unfindables_unfindable_id_seq OWNED BY unfindables.unfindable_id;
518
-
519
-
520
- --
521
- -- Name: unsynchronizables; Type: TABLE; Schema: public; Owner: -
522
- --
523
-
524
- CREATE TABLE unsynchronizables (
525
- unsynchronizable_id integer NOT NULL,
526
- unsynchronizable text NOT NULL
527
- );
528
-
529
-
530
- --
531
- -- Name: unsynchronizables_unsynchronizable_id_seq; Type: SEQUENCE; Schema: public; Owner: -
532
- --
533
-
534
- CREATE SEQUENCE unsynchronizables_unsynchronizable_id_seq
535
- START WITH 1
536
- INCREMENT BY 1
537
- NO MINVALUE
538
- NO MAXVALUE
539
- CACHE 1;
540
-
541
-
542
- --
543
- -- Name: unsynchronizables_unsynchronizable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
544
- --
545
-
546
- ALTER SEQUENCE unsynchronizables_unsynchronizable_id_seq OWNED BY unsynchronizables.unsynchronizable_id;
547
-
548
-
549
- --
550
- -- Name: user_agents; Type: TABLE; Schema: public; Owner: -
551
- --
552
-
553
- CREATE TABLE user_agents (
554
- user_agent_id integer NOT NULL,
555
- user_agent text NOT NULL
556
- );
557
-
558
-
559
- --
560
- -- Name: user_agents_user_agent_id_seq; Type: SEQUENCE; Schema: public; Owner: -
561
- --
562
-
563
- CREATE SEQUENCE user_agents_user_agent_id_seq
564
- START WITH 1
565
- INCREMENT BY 1
566
- NO MINVALUE
567
- NO MAXVALUE
568
- CACHE 1;
569
-
570
-
571
- --
572
- -- Name: user_agents_user_agent_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
573
- --
574
-
575
- ALTER SEQUENCE user_agents_user_agent_id_seq OWNED BY user_agents.user_agent_id;
576
-
577
-
578
- SET search_path = traffic, pg_catalog;
579
-
580
- --
581
- -- Name: paths; Type: TABLE; Schema: traffic; Owner: -
582
- --
583
-
584
- CREATE TABLE paths (
585
- path_id uuid DEFAULT public.uuid_generate_v4() NOT NULL,
586
- path text NOT NULL
587
- );
588
-
589
-
590
- SET search_path = public, pg_catalog;
591
-
592
- --
593
- -- Name: accounts account_id; Type: DEFAULT; Schema: public; Owner: -
594
- --
595
-
596
- ALTER TABLE ONLY accounts ALTER COLUMN account_id SET DEFAULT nextval('accounts_account_id_seq'::regclass);
597
-
598
-
599
- --
600
- -- Name: addresses address_id; Type: DEFAULT; Schema: public; Owner: -
601
- --
602
-
603
- ALTER TABLE ONLY addresses ALTER COLUMN address_id SET DEFAULT nextval('addresses_address_id_seq'::regclass);
604
-
605
-
606
- --
607
- -- Name: cities city_id; Type: DEFAULT; Schema: public; Owner: -
608
- --
609
-
610
- ALTER TABLE ONLY cities ALTER COLUMN city_id SET DEFAULT nextval('cities_city_id_seq'::regclass);
611
-
612
-
613
- --
614
- -- Name: countries country_id; Type: DEFAULT; Schema: public; Owner: -
615
- --
616
-
617
- ALTER TABLE ONLY countries ALTER COLUMN country_id SET DEFAULT nextval('countries_country_id_seq'::regclass);
618
-
619
-
620
- --
621
- -- Name: email_addresses email_address_id; Type: DEFAULT; Schema: public; Owner: -
622
- --
623
-
624
- ALTER TABLE ONLY email_addresses ALTER COLUMN email_address_id SET DEFAULT nextval('email_addresses_email_address_id_seq'::regclass);
625
-
626
-
627
- --
628
- -- Name: ip_addresses ip_address_id; Type: DEFAULT; Schema: public; Owner: -
629
- --
630
-
631
- ALTER TABLE ONLY ip_addresses ALTER COLUMN ip_address_id SET DEFAULT nextval('ip_addresses_ip_address_id_seq'::regclass);
632
-
633
-
634
- --
635
- -- Name: phone_numbers phone_number_id; Type: DEFAULT; Schema: public; Owner: -
636
- --
637
-
638
- ALTER TABLE ONLY phone_numbers ALTER COLUMN phone_number_id SET DEFAULT nextval('phone_numbers_phone_number_id_seq'::regclass);
639
-
640
-
641
- --
642
- -- Name: postal_codes postal_code_id; Type: DEFAULT; Schema: public; Owner: -
643
- --
644
-
645
- ALTER TABLE ONLY postal_codes ALTER COLUMN postal_code_id SET DEFAULT nextval('postal_codes_postal_code_id_seq'::regclass);
646
-
647
-
648
- --
649
- -- Name: raisins raisin_id; Type: DEFAULT; Schema: public; Owner: -
650
- --
651
-
652
- ALTER TABLE ONLY raisins ALTER COLUMN raisin_id SET DEFAULT nextval('raisins_raisin_id_seq'::regclass);
653
-
654
-
655
- --
656
- -- Name: read_through_raisins read_through_raisin_id; Type: DEFAULT; Schema: public; Owner: -
657
- --
658
-
659
- ALTER TABLE ONLY read_through_raisins ALTER COLUMN read_through_raisin_id SET DEFAULT nextval('read_through_raisins_read_through_raisin_id_seq'::regclass);
660
-
661
-
662
- --
663
- -- Name: states state_id; Type: DEFAULT; Schema: public; Owner: -
664
- --
665
-
666
- ALTER TABLE ONLY states ALTER COLUMN state_id SET DEFAULT nextval('states_state_id_seq'::regclass);
667
-
668
-
669
- --
670
- -- Name: statuses status_id; Type: DEFAULT; Schema: public; Owner: -
671
- --
672
-
673
- ALTER TABLE ONLY statuses ALTER COLUMN status_id SET DEFAULT nextval('statuses_status_id_seq'::regclass);
674
-
675
-
676
- --
677
- -- Name: streets street_id; Type: DEFAULT; Schema: public; Owner: -
678
- --
679
-
680
- ALTER TABLE ONLY streets ALTER COLUMN street_id SET DEFAULT nextval('streets_street_id_seq'::regclass);
681
-
682
-
683
- --
684
- -- Name: uncacheables uncacheable_id; Type: DEFAULT; Schema: public; Owner: -
685
- --
686
-
687
- ALTER TABLE ONLY uncacheables ALTER COLUMN uncacheable_id SET DEFAULT nextval('uncacheables_uncacheable_id_seq'::regclass);
688
-
689
-
690
- --
691
- -- Name: unfindables unfindable_id; Type: DEFAULT; Schema: public; Owner: -
692
- --
693
-
694
- ALTER TABLE ONLY unfindables ALTER COLUMN unfindable_id SET DEFAULT nextval('unfindables_unfindable_id_seq'::regclass);
695
-
696
-
697
- --
698
- -- Name: unsynchronizables unsynchronizable_id; Type: DEFAULT; Schema: public; Owner: -
699
- --
700
-
701
- ALTER TABLE ONLY unsynchronizables ALTER COLUMN unsynchronizable_id SET DEFAULT nextval('unsynchronizables_unsynchronizable_id_seq'::regclass);
702
-
703
-
704
- --
705
- -- Name: user_agents user_agent_id; Type: DEFAULT; Schema: public; Owner: -
706
- --
707
-
708
- ALTER TABLE ONLY user_agents ALTER COLUMN user_agent_id SET DEFAULT nextval('user_agents_user_agent_id_seq'::regclass);
709
-
710
-
711
- --
712
- -- Name: accounts accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
713
- --
714
-
715
- ALTER TABLE ONLY accounts
716
- ADD CONSTRAINT accounts_pkey PRIMARY KEY (account_id);
717
-
718
-
719
- --
720
- -- Name: addresses addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
721
- --
722
-
723
- ALTER TABLE ONLY addresses
724
- ADD CONSTRAINT addresses_pkey PRIMARY KEY (address_id);
725
-
726
-
727
- --
728
- -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
729
- --
730
-
731
- ALTER TABLE ONLY ar_internal_metadata
732
- ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
733
-
734
-
735
- --
736
- -- Name: cities cities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
737
- --
738
-
739
- ALTER TABLE ONLY cities
740
- ADD CONSTRAINT cities_pkey PRIMARY KEY (city_id);
741
-
742
-
743
- --
744
- -- Name: countries countries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
745
- --
746
-
747
- ALTER TABLE ONLY countries
748
- ADD CONSTRAINT countries_pkey PRIMARY KEY (country_id);
749
-
750
-
751
- --
752
- -- Name: email_addresses email_addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
753
- --
754
-
755
- ALTER TABLE ONLY email_addresses
756
- ADD CONSTRAINT email_addresses_pkey PRIMARY KEY (email_address_id);
757
-
758
-
759
- --
760
- -- Name: ip_addresses ip_addresses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
761
- --
762
-
763
- ALTER TABLE ONLY ip_addresses
764
- ADD CONSTRAINT ip_addresses_pkey PRIMARY KEY (ip_address_id);
765
-
766
-
767
- --
768
- -- Name: phone_numbers phone_numbers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
769
- --
770
-
771
- ALTER TABLE ONLY phone_numbers
772
- ADD CONSTRAINT phone_numbers_pkey PRIMARY KEY (phone_number_id);
773
-
774
-
775
- --
776
- -- Name: postal_codes postal_codes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
777
- --
778
-
779
- ALTER TABLE ONLY postal_codes
780
- ADD CONSTRAINT postal_codes_pkey PRIMARY KEY (postal_code_id);
781
-
782
-
783
- --
784
- -- Name: raisins raisins_pkey; Type: CONSTRAINT; Schema: public; Owner: -
785
- --
786
-
787
- ALTER TABLE ONLY raisins
788
- ADD CONSTRAINT raisins_pkey PRIMARY KEY (raisin_id);
789
-
790
-
791
- --
792
- -- Name: read_through_raisins read_through_raisins_pkey; Type: CONSTRAINT; Schema: public; Owner: -
793
- --
794
-
795
- ALTER TABLE ONLY read_through_raisins
796
- ADD CONSTRAINT read_through_raisins_pkey PRIMARY KEY (read_through_raisin_id);
797
-
798
-
799
- --
800
- -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
801
- --
802
-
803
- ALTER TABLE ONLY schema_migrations
804
- ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
805
-
806
-
807
- --
808
- -- Name: states states_pkey; Type: CONSTRAINT; Schema: public; Owner: -
809
- --
810
-
811
- ALTER TABLE ONLY states
812
- ADD CONSTRAINT states_pkey PRIMARY KEY (state_id);
813
-
814
-
815
- --
816
- -- Name: statuses statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
817
- --
818
-
819
- ALTER TABLE ONLY statuses
820
- ADD CONSTRAINT statuses_pkey PRIMARY KEY (status_id);
821
-
822
-
823
- --
824
- -- Name: streets streets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
825
- --
826
-
827
- ALTER TABLE ONLY streets
828
- ADD CONSTRAINT streets_pkey PRIMARY KEY (street_id);
829
-
830
-
831
- --
832
- -- Name: uncacheables uncacheables_pkey; Type: CONSTRAINT; Schema: public; Owner: -
833
- --
834
-
835
- ALTER TABLE ONLY uncacheables
836
- ADD CONSTRAINT uncacheables_pkey PRIMARY KEY (uncacheable_id);
837
-
838
-
839
- --
840
- -- Name: unfindables unfindables_pkey; Type: CONSTRAINT; Schema: public; Owner: -
841
- --
842
-
843
- ALTER TABLE ONLY unfindables
844
- ADD CONSTRAINT unfindables_pkey PRIMARY KEY (unfindable_id);
845
-
846
-
847
- --
848
- -- Name: unsynchronizables unsynchronizables_pkey; Type: CONSTRAINT; Schema: public; Owner: -
849
- --
850
-
851
- ALTER TABLE ONLY unsynchronizables
852
- ADD CONSTRAINT unsynchronizables_pkey PRIMARY KEY (unsynchronizable_id);
853
-
854
-
855
- --
856
- -- Name: user_agents user_agents_pkey; Type: CONSTRAINT; Schema: public; Owner: -
857
- --
858
-
859
- ALTER TABLE ONLY user_agents
860
- ADD CONSTRAINT user_agents_pkey PRIMARY KEY (user_agent_id);
861
-
862
-
863
- SET search_path = traffic, pg_catalog;
864
-
865
- --
866
- -- Name: paths paths_pkey; Type: CONSTRAINT; Schema: traffic; Owner: -
867
- --
868
-
869
- ALTER TABLE ONLY paths
870
- ADD CONSTRAINT paths_pkey PRIMARY KEY (path_id);
871
-
872
-
873
- SET search_path = public, pg_catalog;
874
-
875
- --
876
- -- Name: accounts__u_account; Type: INDEX; Schema: public; Owner: -
877
- --
878
-
879
- CREATE UNIQUE INDEX accounts__u_account ON accounts USING btree (account);
880
-
881
-
882
- --
883
- -- Name: addresses__u_address; Type: INDEX; Schema: public; Owner: -
884
- --
885
-
886
- CREATE UNIQUE INDEX addresses__u_address ON addresses USING btree (address);
887
-
888
-
889
- --
890
- -- Name: cities__u_city; Type: INDEX; Schema: public; Owner: -
891
- --
892
-
893
- CREATE UNIQUE INDEX cities__u_city ON cities USING btree (city);
894
-
895
-
896
- --
897
- -- Name: countries__u_country; Type: INDEX; Schema: public; Owner: -
898
- --
899
-
900
- CREATE UNIQUE INDEX countries__u_country ON countries USING btree (country);
901
-
902
-
903
- --
904
- -- Name: email_addresses__u_email_address; Type: INDEX; Schema: public; Owner: -
905
- --
906
-
907
- CREATE UNIQUE INDEX email_addresses__u_email_address ON email_addresses USING btree (email_address);
908
-
909
-
910
- --
911
- -- Name: index_accounts_on_phone_number_id; Type: INDEX; Schema: public; Owner: -
912
- --
913
-
914
- CREATE INDEX index_accounts_on_phone_number_id ON accounts USING btree (phone_number_id);
915
-
916
-
917
- --
918
- -- Name: index_addresses_on_city_id; Type: INDEX; Schema: public; Owner: -
919
- --
920
-
921
- CREATE INDEX index_addresses_on_city_id ON addresses USING btree (city_id);
922
-
923
-
924
- --
925
- -- Name: index_addresses_on_country_id; Type: INDEX; Schema: public; Owner: -
926
- --
927
-
928
- CREATE INDEX index_addresses_on_country_id ON addresses USING btree (country_id);
929
-
930
-
931
- --
932
- -- Name: index_addresses_on_postal_code_id; Type: INDEX; Schema: public; Owner: -
933
- --
934
-
935
- CREATE INDEX index_addresses_on_postal_code_id ON addresses USING btree (postal_code_id);
936
-
937
-
938
- --
939
- -- Name: index_addresses_on_state_id; Type: INDEX; Schema: public; Owner: -
940
- --
941
-
942
- CREATE INDEX index_addresses_on_state_id ON addresses USING btree (state_id);
943
-
944
-
945
- --
946
- -- Name: index_addresses_on_street_id; Type: INDEX; Schema: public; Owner: -
947
- --
948
-
949
- CREATE INDEX index_addresses_on_street_id ON addresses USING btree (street_id);
950
-
951
-
952
- --
953
- -- Name: ip_addresses__u_ip_address; Type: INDEX; Schema: public; Owner: -
954
- --
955
-
956
- CREATE UNIQUE INDEX ip_addresses__u_ip_address ON ip_addresses USING btree (ip_address);
957
-
958
-
959
- --
960
- -- Name: phone_numbers__u_phone_number; Type: INDEX; Schema: public; Owner: -
961
- --
962
-
963
- CREATE UNIQUE INDEX phone_numbers__u_phone_number ON phone_numbers USING btree (phone_number);
964
-
965
-
966
- --
967
- -- Name: postal_codes__u_postal_code; Type: INDEX; Schema: public; Owner: -
968
- --
969
-
970
- CREATE UNIQUE INDEX postal_codes__u_postal_code ON postal_codes USING btree (postal_code);
971
-
972
-
973
- --
974
- -- Name: raisins__u_raisin; Type: INDEX; Schema: public; Owner: -
975
- --
976
-
977
- CREATE UNIQUE INDEX raisins__u_raisin ON raisins USING btree (raisin);
978
-
979
-
980
- --
981
- -- Name: read_through_raisins__u_read_through_raisin; Type: INDEX; Schema: public; Owner: -
982
- --
983
-
984
- CREATE UNIQUE INDEX read_through_raisins__u_read_through_raisin ON read_through_raisins USING btree (read_through_raisin);
985
-
986
-
987
- --
988
- -- Name: states__u_state; Type: INDEX; Schema: public; Owner: -
989
- --
990
-
991
- CREATE UNIQUE INDEX states__u_state ON states USING btree (state);
992
-
993
-
994
- --
995
- -- Name: statuses__u_status; Type: INDEX; Schema: public; Owner: -
996
- --
997
-
998
- CREATE UNIQUE INDEX statuses__u_status ON statuses USING btree (status);
999
-
1000
-
1001
- --
1002
- -- Name: streets__u_street; Type: INDEX; Schema: public; Owner: -
1003
- --
1004
-
1005
- CREATE UNIQUE INDEX streets__u_street ON streets USING btree (street);
1006
-
1007
-
1008
- --
1009
- -- Name: uncacheables__u_uncacheable; Type: INDEX; Schema: public; Owner: -
1010
- --
1011
-
1012
- CREATE UNIQUE INDEX uncacheables__u_uncacheable ON uncacheables USING btree (uncacheable);
1013
-
1014
-
1015
- --
1016
- -- Name: unfindables__u_unfindable; Type: INDEX; Schema: public; Owner: -
1017
- --
1018
-
1019
- CREATE UNIQUE INDEX unfindables__u_unfindable ON unfindables USING btree (unfindable);
1020
-
1021
-
1022
- --
1023
- -- Name: unsynchronizables__u_unsynchronizable; Type: INDEX; Schema: public; Owner: -
1024
- --
1025
-
1026
- CREATE UNIQUE INDEX unsynchronizables__u_unsynchronizable ON unsynchronizables USING btree (unsynchronizable);
1027
-
1028
-
1029
- --
1030
- -- Name: user_agents__u_user_agent; Type: INDEX; Schema: public; Owner: -
1031
- --
1032
-
1033
- CREATE UNIQUE INDEX user_agents__u_user_agent ON user_agents USING btree (user_agent);
1034
-
1035
-
1036
- SET search_path = traffic, pg_catalog;
1037
-
1038
- --
1039
- -- Name: paths__u_path; Type: INDEX; Schema: traffic; Owner: -
1040
- --
1041
-
1042
- CREATE UNIQUE INDEX paths__u_path ON paths USING btree (path);
1043
-
1044
-
1045
- --
1046
- -- PostgreSQL database dump complete
1047
- --
1048
-
1049
- SET search_path TO "$user", public;
1050
-
1051
- INSERT INTO schema_migrations (version) VALUES ('20121019040009');
1052
-
1053
-