3 class CleanupOsmDb < ActiveRecord::Migration
5 change_column "current_nodes", "latitude", :double, :null => false
6 change_column "current_nodes", "longitude", :double, :null => false
7 change_column "current_nodes", "user_id", :bigint, :limit => 20, :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, :limit => 64, :null => false
14 change_column "current_segments", "node_b", :bigint, :limit => 64, :null => false
15 change_column "current_segments", "user_id", :bigint, :limit => 20, :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, :limit => 64, :null => false
22 change_column "current_way_segments", "segment_id", :bigint, :limit => 64, :null => false
23 change_column "current_way_segments", "sequence_id", :bigint, :limit => 11, :null => false
24 add_primary_key "current_way_segments", ["id", "sequence_id"]
25 remove_index "current_way_segments", :name => "current_way_segments_id_idx"
27 change_column "current_way_tags", "id", :bigint, :limit => 64, :null => false
29 change_column "current_ways", "user_id", :bigint, :limit => 20, :null => false
30 change_column "current_ways", "timestamp", :datetime, :null => false
31 change_column "current_ways", "visible", :boolean, :null => false
32 change_engine "current_ways", "InnoDB"
34 change_column "diary_entries", "title", :string, :null => false
35 change_column "diary_entries", "body", :text, :null => false
36 change_column "diary_entries", "created_at", :datetime, :null => false
37 change_column "diary_entries", "updated_at", :datetime, :null => false
39 add_index "friends", ["user_id"], :name => "friends_user_id_idx"
41 remove_index "gps_points", :name => "points_uid_idx"
42 remove_index "gps_points", :name => "points_idx"
43 remove_column "gps_points", "user_id"
44 add_index "gps_points", ["latitude", "longitude"], :name => "points_idx"
45 change_column "gps_points", "trackid", :integer, :null => false
46 change_column "gps_points", "latitude", :integer, :null => false
47 change_column "gps_points", "longitude", :integer, :null => false
48 change_column "gps_points", "gpx_id", :bigint, :limit => 64, :null => false
50 change_column "gpx_file_tags", "tag", :string, :null => false
52 change_column "gpx_files", "user_id", :bigint, :limit => 20, :null => false
53 change_column "gpx_files", "timestamp", :datetime, :null => false
54 change_column "gpx_files", "description", :string, :default => "", :null => false
55 change_column "gpx_files", "inserted", :boolean, :null => false
57 drop_table "gpx_pending_files"
59 remove_index "messages", :name => "from_name_idx"
60 remove_column "messages", "user_id"
61 remove_column "messages", "from_display_name"
62 change_column "messages", "title", :string, :null => false
63 change_column "messages", "body", :text, :null => false
64 change_column "messages", "sent_on", :datetime, :null => false
65 change_column "messages", "message_read", :boolean, :default => false, :null => false
66 add_index "messages", ["to_user_id"], :name => "messages_to_user_id_idx"
68 drop_table "meta_areas"
70 change_column "nodes", "id", :bigint, :limit => 64, :null => false
71 change_column "nodes", "latitude", :double, :null => false
72 change_column "nodes", "longitude", :double, :null => false
73 change_column "nodes", "user_id", :bigint, :limit => 20, :null => false
74 change_column "nodes", "visible", :boolean, :null => false
75 change_column "nodes", "timestamp", :datetime, :null => false
76 add_index "nodes", ["timestamp"], :name => "nodes_timestamp_idx"
78 change_column "segments", "id", :bigint, :limit => 64, :null => false
79 change_column "segments", "node_a", :bigint, :limit => 64, :null => false
80 change_column "segments", "node_b", :bigint, :limit => 64, :null => false
81 change_column "segments", "user_id", :bigint, :limit => 20, :null => false
82 change_column "segments", "visible", :boolean, :null => false
83 change_column "segments", "timestamp", :datetime, :null => false
84 add_index "segments", ["timestamp"], :name => "segments_timestamp_idx"
86 remove_column "users", "preferences"
87 change_column "users", "email", :string, :null => false
88 change_column "users", "pass_crypt", :string, :null => false
89 change_column "users", "creation_time", :datetime, :null => false
90 change_column "users", "display_name", :string, :default => "", :null => false
91 change_column "users", "data_public", :boolean, :default => false, :null => false
92 change_column "users", "home_lat", :double, :default => nil
93 change_column "users", "home_lon", :double, :default => nil
94 remove_index "users", :name => "users_email_idx"
95 add_index "users", ["email"], :name => "users_email_idx", :unique => true
96 remove_index "users", :name => "users_display_name_idx"
97 add_index "users", ["display_name"], :name => "users_display_name_idx", :unique => true
99 change_column "way_segments", "segment_id", :bigint, :limit => 64, :null => false
101 change_column "way_tags", "k", :string, :null => false
102 change_column "way_tags", "v", :string, :null => false
103 change_column "way_tags", "version", :bigint, :limit => 20, :null => false
105 change_column "ways", "user_id", :bigint, :limit => 20, :null => false
106 change_column "ways", "timestamp", :datetime, :null => false
107 change_column "ways", "visible", :boolean, :default => true, :null => false
108 remove_index "ways", :name => "ways_id_version_idx"
109 add_index "ways", ["timestamp"], :name => "ways_timestamp_idx"
113 remove_index "ways", :name => "ways_timestamp_idx"
114 add_index "ways", ["id"], :name => "ways_id_version_idx"
115 change_column "ways", "visible", :boolean, :default => true
116 change_column "ways", "timestamp", :datetime
117 change_column "ways", "user_id", :bigint, :limit => 20
119 change_column "way_tags", "version", :bigint, :limit => 20
120 change_column "way_tags", "v", :string, :default => nil
121 change_column "way_tags", "k", :string, :default => nil
123 change_column "way_segments", "segment_id", :integer
125 remove_index "users", :name => "users_display_name_idx"
126 add_index "users", ["display_name"], :name => "users_display_name_idx"
127 remove_index "users", :name => "users_email_idx"
128 add_index "users", ["email"], :name => "users_email_idx"
129 change_column "users", "home_lon", :double, :default => 1
130 change_column "users", "home_lat", :double, :default => 1
131 change_column "users", "data_public", :boolean, :default => false
132 change_column "users", "display_name", :string, :default => ""
133 change_column "users", "creation_time", :datetime
134 change_column "users", "pass_crypt", :string, :default => nil
135 change_column "users", "email", :string, :default => nil
136 add_column "users", "preferences", :text
138 remove_index "segments", :name => "segments_timestamp_idx"
139 change_column "segments", "timestamp", :datetime
140 change_column "segments", "visible", :boolean
141 change_column "segments", "user_id", :bigint, :limit => 20
142 change_column "segments", "node_b", :bigint, :limit => 64
143 change_column "segments", "node_a", :bigint, :limit => 64
144 change_column "segments", "id", :bigint, :limit => 64
146 remove_index "nodes", :name => "nodes_timestamp_idx"
147 change_column "nodes", "timestamp", :datetime
148 change_column "nodes", "visible", :boolean
149 change_column "nodes", "user_id", :bigint, :limit => 20
150 change_column "nodes", "longitude", :double
151 change_column "nodes", "latitude", :double
152 change_column "nodes", "id", :bigint, :limit => 64
154 create_table "meta_areas", myisam_table do |t|
155 t.column "id", :bigint_pk_64, :null => false
156 t.column "user_id", :bigint, :limit => 20
157 t.column "timestamp", :datetime
160 remove_index "messages", :name => "messages_to_user_id_idx"
161 change_column "messages", "message_read", :boolean, :default => false
162 change_column "messages", "sent_on", :datetime
163 change_column "messages", "body", :text
164 change_column "messages", "title", :string, :default => nil
165 add_column "messages", "from_display_name", :string, :default => ""
166 add_column "messages", "user_id", :bigint, :limit => 20, :null => false
167 add_index "messages", ["from_display_name"], :name => "from_name_idx"
169 create_table "gpx_pending_files", myisam_table do |t|
170 t.column "originalname", :string
171 t.column "tmpname", :string
172 t.column "user_id", :bigint, :limit => 20
175 change_column "gpx_files", "inserted", :boolean
176 change_column "gpx_files", "description", :string, :default => ""
177 change_column "gpx_files", "timestamp", :datetime
178 change_column "gpx_files", "user_id", :bigint, :limit => 20
180 change_column "gpx_file_tags", "tag", :string, :default => nil
182 change_column "gps_points", "gpx_id", :integer, :limit => 20
183 change_column "gps_points", "longitude", :integer
184 change_column "gps_points", "latitude", :integer
185 change_column "gps_points", "trackid", :integer
186 add_column "gps_points", "user_id", :integer, :limit => 20
187 add_index "gps_points", ["user_id"], :name => "points_uid_idx"
189 remove_index "friends", :name => "friends_user_id_idx"
191 change_column "diary_entries", "updated_at", :datetime
192 change_column "diary_entries", "created_at", :datetime
193 change_column "diary_entries", "body", :text
194 change_column "diary_entries", "title", :string, :default => nil
196 change_engine "current_ways", "MyISAM"
197 change_column "current_ways", "visible", :boolean
198 change_column "current_ways", "timestamp", :datetime
199 change_column "current_ways", "user_id", :bigint, :limit => 20
201 change_column "current_way_tags", "id", :bigint, :limit => 64
203 add_index "current_way_segments", ["id"], :name => "current_way_segments_id_idx"
204 remove_primary_key "current_way_segments"
205 change_column "current_way_segments", "sequence_id", :bigint, :limit => 11
206 change_column "current_way_segments", "segment_id", :bigint, :limit => 11
207 change_column "current_way_segments", "id", :bigint, :limit => 64
209 add_index "current_segments", ["id", "visible"], :name => "current_segments_id_visible_idx"
210 remove_primary_key "current_segments"
211 change_column "current_segments", "timestamp", :datetime
212 change_column "current_segments", "visible", :boolean
213 change_column "current_segments", "user_id", :bigint, :limit => 20
214 change_column "current_segments", "node_b", :bigint, :limit => 64
215 change_column "current_segments", "node_a", :bigint, :limit => 64
217 add_index "current_nodes", ["id"], :name => "current_nodes_id_idx"
218 remove_primary_key "current_nodes"
219 change_column "current_nodes", "timestamp", :datetime
220 change_column "current_nodes", "visible", :boolean
221 change_column "current_nodes", "user_id", :bigint, :limit => 20
222 change_column "current_nodes", "longitude", :double
223 change_column "current_nodes", "latitude", :double
224 change_column "current_nodes", "id", :bigint_auto_64