X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f042a797c65fc96e79c2618e8653fbfb6488b67d..e5ff2959bc756a97d10b130d1ad6d0376eb57d83:/db/migrate/001_create_osm_db.rb?ds=sidebyside diff --git a/db/migrate/001_create_osm_db.rb b/db/migrate/001_create_osm_db.rb index e5840b380..2c80dd8ad 100644 --- a/db/migrate/001_create_osm_db.rb +++ b/db/migrate/001_create_osm_db.rb @@ -2,9 +2,6 @@ require 'lib/migrate' class CreateOsmDb < ActiveRecord::Migration def self.up - myisam_table = { :id => false, :force => true, :options => "ENGINE=MyIsam DEFAULT CHARSET=utf8" } - innodb_table = { :id => false, :force => true, :options => "ENGINE=InnoDB DEFAULT CHARSET=utf8" } - create_table "current_nodes", innodb_table do |t| t.column "id", :bigint, :limit => 64, :null => false t.column "latitude", :double @@ -62,7 +59,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "visible", :boolean end - add_primary_key "current_ways", ["id"], :name => "current_ways_id_idx", :unique => true + add_primary_key "current_ways", ["id"] change_column "current_ways", "id", :bigint, :limit => 64, :null => false, :options => "AUTO_INCREMENT" @@ -75,7 +72,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "updated_at", :datetime end - add_primary_key "diary_entries", ["id"], :name => "diary_entries_id_idx", :unique => true + add_primary_key "diary_entries", ["id"] change_column "diary_entries", "id", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT" @@ -85,7 +82,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "friend_user_id", :bigint, :limit => 20, :null => false end - add_primary_key "friends", ["id"], :name => "friends_id_idx", :unique => true + add_primary_key "friends", ["id"] add_index "friends", ["friend_user_id"], :name => "user_id_idx" change_column "friends", "id", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT" @@ -110,7 +107,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "id", :integer, :limit => 20, :null => false end - add_primary_key "gpx_file_tags", ["id"], :name => "gpx_file_tags_id_idx", :unique => true + add_primary_key "gpx_file_tags", ["id"] add_index "gpx_file_tags", ["gpx_id"], :name => "gpx_file_tags_gpxid_idx" change_column "gpx_file_tags", "id", :integer, :limit => 20, :null => false, :options => "AUTO_INCREMENT" @@ -129,7 +126,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "inserted", :boolean end - add_primary_key "gpx_files", ["id"], :name => "gpx_files_id_idx", :unique => true + add_primary_key "gpx_files", ["id"] add_index "gpx_files", ["timestamp"], :name => "gpx_files_timestamp_idx" add_index "gpx_files", ["visible", "public"], :name => "gpx_files_visible_public_idx" @@ -153,7 +150,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "to_user_id", :bigint, :limit => 20, :null => false end - add_primary_key "messages", ["id"], :name => "messages_id_idx", :unique => true + add_primary_key "messages", ["id"] add_index "messages", ["from_display_name"], :name => "from_name_idx" change_column "messages", "id", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT" @@ -164,7 +161,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "timestamp", :datetime end - add_primary_key "meta_areas", ["id"], :name => "meta_areas_id_idx", :unique => true + add_primary_key "meta_areas", ["id"] change_column "meta_areas", "id", :bigint, :limit => 64, :null => false, :options => "AUTO_INCREMENT" @@ -214,7 +211,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "home_zoom", :integer, :limit => 2, :default => 3 end - add_primary_key "users", ["id"], :name => "users_id_idx", :unique => true + add_primary_key "users", ["id"] add_index "users", ["email"], :name => "users_email_idx" add_index "users", ["display_name"], :name => "users_display_name_idx" @@ -227,7 +224,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "sequence_id", :bigint, :limit => 11, :null => false end - add_primary_key "way_segments", ["id", "version", "sequence_id"], :name => "way_segments_id_version_sequence_idx", :unique => true + add_primary_key "way_segments", ["id", "version", "sequence_id"] change_column "way_segments", "sequence_id", :bigint, :limit => 11, :null => false, :options => "AUTO_INCREMENT" @@ -248,7 +245,7 @@ class CreateOsmDb < ActiveRecord::Migration t.column "visible", :boolean, :default => true end - add_primary_key "ways", ["id", "version"], :name => "ways_primary_idx", :unique => true + add_primary_key "ways", ["id", "version"] add_index "ways", ["id"], :name => "ways_id_version_idx" change_column "ways", "version", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT"