X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4424cd5b947432848fe7f5bc7518fd1b718ecf6c..cf304fe60f05f48251a480d19ce3ea9440f8a10e:/db/migrate/015_key_constraints.rb?ds=sidebyside diff --git a/db/migrate/015_key_constraints.rb b/db/migrate/015_key_constraints.rb index 6a070b2da..40f98be02 100644 --- a/db/migrate/015_key_constraints.rb +++ b/db/migrate/015_key_constraints.rb @@ -11,6 +11,15 @@ class KeyConstraints < ActiveRecord::Migration add_primary_key :nodes, [:id, :version] + # Remove indexes superseded by primary keys + remove_index :current_way_tags, :name => :current_way_tags_id_idx + remove_index :current_relation_tags, :name => :current_relation_tags_id_idx + + remove_index :way_tags, :name => :way_tags_id_version_idx + remove_index :relation_tags, :name => :relation_tags_id_version_idx + + remove_index :nodes, :name => :nodes_uid_idx + # Foreign keys (between ways, way_tags, way_nodes, etc.) add_foreign_key :current_node_tags, [:id], :current_nodes add_foreign_key :node_tags, [:id, :version], :nodes