3 class CleanupOsmDb < ActiveRecord::Migration[5.0]
5 change_column "current_nodes", "latitude", :float, :limit => 53, :null => false
6 change_column "current_nodes", "longitude", :float, :limit => 53, :null => false
7 change_column "current_nodes", "user_id", :bigint, :null => false
8 change_column "current_nodes", "visible", :boolean, :null => false
9 change_column "current_nodes", "timestamp", :datetime, :null => false
10 add_primary_key "current_nodes", ["id"]
11 remove_index "current_nodes", :name => "current_nodes_id_idx"
13 change_column "current_segments", "node_a", :bigint, :null => false
14 change_column "current_segments", "node_b", :bigint, :null => false
15 change_column "current_segments", "user_id", :bigint, :null => false
16 change_column "current_segments", "visible", :boolean, :null => false
17 change_column "current_segments", "timestamp", :datetime, :null => false
18 add_primary_key "current_segments", ["id"]
19 remove_index "current_segments", :name => "current_segments_id_visible_idx"
21 change_column "current_way_segments", "id", :bigint, :null => false
22 change_column "current_way_segments", "segment_id", :bigint, :null => false
23 change_column "current_way_segments", "sequence_id", :bigint, :null => false
24 add_primary_key "current_way_segments", %w[id sequence_id]
25 remove_index "current_way_segments", :name => "current_way_segments_id_idx"
27 change_column "current_way_tags", "id", :bigint, :null => false
29 change_column "current_ways", "user_id", :bigint, :null => false
30 change_column "current_ways", "timestamp", :datetime, :null => false
31 change_column "current_ways", "visible", :boolean, :null => false
33 change_column "diary_entries", "title", :string, :null => false
34 change_column "diary_entries", "body", :text, :null => false
35 change_column "diary_entries", "created_at", :datetime, :null => false
36 change_column "diary_entries", "updated_at", :datetime, :null => false
38 add_index "friends", ["user_id"], :name => "friends_user_id_idx"
40 remove_index "gps_points", :name => "points_uid_idx"
41 remove_index "gps_points", :name => "points_idx"
42 remove_column "gps_points", "user_id"
43 add_index "gps_points", %w[latitude longitude], :name => "points_idx"
44 change_column "gps_points", "trackid", :integer, :null => false
45 change_column "gps_points", "latitude", :integer, :null => false
46 change_column "gps_points", "longitude", :integer, :null => false
47 change_column "gps_points", "gpx_id", :bigint, :null => false
49 change_column "gpx_file_tags", "tag", :string, :null => false
51 change_column "gpx_files", "user_id", :bigint, :null => false
52 change_column "gpx_files", "timestamp", :datetime, :null => false
53 change_column "gpx_files", "description", :string, :default => "", :null => false
54 change_column "gpx_files", "inserted", :boolean, :null => false
56 drop_table "gpx_pending_files"
58 remove_index "messages", :name => "from_name_idx"
59 remove_column "messages", "user_id"
60 remove_column "messages", "from_display_name"
61 change_column "messages", "title", :string, :null => false
62 change_column "messages", "body", :text, :null => false
63 change_column "messages", "sent_on", :datetime, :null => false
64 change_column "messages", "message_read", :boolean, :default => false, :null => false
65 add_index "messages", ["to_user_id"], :name => "messages_to_user_id_idx"
67 drop_table "meta_areas"
69 change_column "nodes", "id", :bigint, :null => false
70 change_column "nodes", "latitude", :float, :limit => 53, :null => false
71 change_column "nodes", "longitude", :float, :limit => 53, :null => false
72 change_column "nodes", "user_id", :bigint, :null => false
73 change_column "nodes", "visible", :boolean, :null => false
74 change_column "nodes", "timestamp", :datetime, :null => false
75 add_index "nodes", ["timestamp"], :name => "nodes_timestamp_idx"
77 change_column "segments", "id", :bigint, :null => false
78 change_column "segments", "node_a", :bigint, :null => false
79 change_column "segments", "node_b", :bigint, :null => false
80 change_column "segments", "user_id", :bigint, :null => false
81 change_column "segments", "visible", :boolean, :null => false
82 change_column "segments", "timestamp", :datetime, :null => false
83 add_index "segments", ["timestamp"], :name => "segments_timestamp_idx"
85 remove_column "users", "preferences"
86 change_column "users", "email", :string, :null => false
87 change_column "users", "pass_crypt", :string, :null => false
88 change_column "users", "creation_time", :datetime, :null => false
89 change_column "users", "display_name", :string, :default => "", :null => false
90 change_column "users", "data_public", :boolean, :default => false, :null => false
91 change_column "users", "home_lat", :float, :limit => 53, :default => nil
92 change_column "users", "home_lon", :float, :limit => 53, :default => nil
93 remove_index "users", :name => "users_email_idx"
94 add_index "users", ["email"], :name => "users_email_idx", :unique => true
95 remove_index "users", :name => "users_display_name_idx"
96 add_index "users", ["display_name"], :name => "users_display_name_idx", :unique => true
98 change_column "way_segments", "segment_id", :bigint, :null => false
100 change_column "way_tags", "k", :string, :null => false
101 change_column "way_tags", "v", :string, :null => false
102 change_column "way_tags", "version", :bigint, :null => false
104 change_column "ways", "user_id", :bigint, :null => false
105 change_column "ways", "timestamp", :datetime, :null => false
106 change_column "ways", "visible", :boolean, :default => true, :null => false
107 remove_index "ways", :name => "ways_id_version_idx"
108 add_index "ways", ["timestamp"], :name => "ways_timestamp_idx"
112 remove_index "ways", :name => "ways_timestamp_idx"
113 add_index "ways", ["id"], :name => "ways_id_version_idx"
114 change_column "ways", "visible", :boolean, :default => true
115 change_column "ways", "timestamp", :datetime
116 change_column "ways", "user_id", :bigint
118 change_column "way_tags", "version", :bigint
119 change_column "way_tags", "v", :string, :default => nil
120 change_column "way_tags", "k", :string, :default => nil
122 change_column "way_segments", "segment_id", :integer
124 remove_index "users", :name => "users_display_name_idx"
125 add_index "users", ["display_name"], :name => "users_display_name_idx"
126 remove_index "users", :name => "users_email_idx"
127 add_index "users", ["email"], :name => "users_email_idx"
128 change_column "users", "home_lon", :float, :limit => 53, :default => 1
129 change_column "users", "home_lat", :float, :limit => 53, :default => 1
130 change_column "users", "data_public", :boolean, :default => false
131 change_column "users", "display_name", :string, :default => ""
132 change_column "users", "creation_time", :datetime
133 change_column "users", "pass_crypt", :string, :default => nil
134 change_column "users", "email", :string, :default => nil
135 add_column "users", "preferences", :text
137 remove_index "segments", :name => "segments_timestamp_idx"
138 change_column "segments", "timestamp", :datetime
139 change_column "segments", "visible", :boolean
140 change_column "segments", "user_id", :bigint
141 change_column "segments", "node_b", :bigint
142 change_column "segments", "node_a", :bigint
143 change_column "segments", "id", :bigint
145 remove_index "nodes", :name => "nodes_timestamp_idx"
146 change_column "nodes", "timestamp", :datetime
147 change_column "nodes", "visible", :boolean
148 change_column "nodes", "user_id", :bigint
149 change_column "nodes", "longitude", :float, :limit => 53
150 change_column "nodes", "latitude", :float, :limit => 53
151 change_column "nodes", "id", :bigint
153 create_table "meta_areas", :id => false do |t|
154 t.column "id", :bigserial, :primary_key => true, :null => false
155 t.column "user_id", :bigint
156 t.column "timestamp", :datetime
159 remove_index "messages", :name => "messages_to_user_id_idx"
160 change_column "messages", "message_read", :boolean, :default => false
161 change_column "messages", "sent_on", :datetime
162 change_column "messages", "body", :text
163 change_column "messages", "title", :string, :default => nil
164 add_column "messages", "from_display_name", :string, :default => ""
165 add_column "messages", "user_id", :bigint, :null => false
166 add_index "messages", ["from_display_name"], :name => "from_name_idx"
168 create_table "gpx_pending_files", :id => false do |t|
169 t.column "originalname", :string
170 t.column "tmpname", :string
171 t.column "user_id", :bigint
174 change_column "gpx_files", "inserted", :boolean
175 change_column "gpx_files", "description", :string, :default => ""
176 change_column "gpx_files", "timestamp", :datetime
177 change_column "gpx_files", "user_id", :bigint
179 change_column "gpx_file_tags", "tag", :string, :default => nil
181 change_column "gps_points", "gpx_id", :integer
182 change_column "gps_points", "longitude", :integer
183 change_column "gps_points", "latitude", :integer
184 change_column "gps_points", "trackid", :integer
185 add_column "gps_points", "user_id", :integer
186 add_index "gps_points", ["user_id"], :name => "points_uid_idx"
188 remove_index "friends", :name => "friends_user_id_idx"
190 change_column "diary_entries", "updated_at", :datetime
191 change_column "diary_entries", "created_at", :datetime
192 change_column "diary_entries", "body", :text
193 change_column "diary_entries", "title", :string, :default => nil
195 change_column "current_ways", "visible", :boolean
196 change_column "current_ways", "timestamp", :datetime
197 change_column "current_ways", "user_id", :bigint
199 change_column "current_way_tags", "id", :bigint
201 add_index "current_way_segments", ["id"], :name => "current_way_segments_id_idx"
202 remove_primary_key "current_way_segments"
203 change_column "current_way_segments", "sequence_id", :bigint
204 change_column "current_way_segments", "segment_id", :bigint
205 change_column "current_way_segments", "id", :bigint
207 add_index "current_segments", %w[id visible], :name => "current_segments_id_visible_idx"
208 remove_primary_key "current_segments"
209 change_column "current_segments", "timestamp", :datetime
210 change_column "current_segments", "visible", :boolean
211 change_column "current_segments", "user_id", :bigint
212 change_column "current_segments", "node_b", :bigint
213 change_column "current_segments", "node_a", :bigint
215 add_index "current_nodes", ["id"], :name => "current_nodes_id_idx"
216 remove_primary_key "current_nodes"
217 change_column "current_nodes", "timestamp", :datetime
218 change_column "current_nodes", "visible", :boolean
219 change_column "current_nodes", "user_id", :bigint
220 change_column "current_nodes", "longitude", :float, :limit => 53
221 change_column "current_nodes", "latitude", :float, :limit => 53