Newer
Older
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
# CreateTestSchema creates the tables used in test_helper.rb
class CreateTestSchema < ActiveRecord::Migration
def self.up
[
:places,
:place_reverse_geocodeds
].each do |table|
create_table table do |t|
t.column :name, :string
t.column :address, :string
t.column :latitude, :decimal
t.column :longitude, :decimal
end
end
[
:place_with_custom_lookup_procs,
:place_with_custom_lookups,
:place_reverse_geocoded_with_custom_lookups
].each do |table|
create_table table do |t|
t.column :name, :string
t.column :address, :string
t.column :latitude, :decimal
t.column :longitude, :decimal
t.column :result_class, :string
end
end
create_table :place_with_forward_and_reverse_geocodings do |t|
t.column :name, :string
t.column :location, :string
t.column :lat, :decimal
t.column :lon, :decimal
t.column :address, :string
end
create_table :place_reverse_geocoded_with_custom_results_handlings do |t|
t.column :name, :string
t.column :address, :string
t.column :latitude, :decimal
t.column :longitude, :decimal
t.column :country, :string
end
create_table :place_with_custom_results_handlings do |t|
t.column :name, :string
t.column :address, :string
t.column :latitude, :decimal
t.column :longitude, :decimal
t.column :coords_string, :string
end
end
end