]> git.openstreetmap.org Git - rails.git/commitdiff
added migration to add a primary key on nodes id and version - should be run after...
authorNick Black <nickb@svn.openstreetmap.org>
Wed, 23 Jan 2008 17:10:16 +0000 (17:10 +0000)
committerNick Black <nickb@svn.openstreetmap.org>
Wed, 23 Jan 2008 17:10:16 +0000 (17:10 +0000)
db/migrate/015_add_primary_key_on_nodes_id_version.rb [new file with mode: 0644]

diff --git a/db/migrate/015_add_primary_key_on_nodes_id_version.rb b/db/migrate/015_add_primary_key_on_nodes_id_version.rb
new file mode 100644 (file)
index 0000000..680a7ba
--- /dev/null
@@ -0,0 +1,10 @@
+class AddPrimaryKeyOnNodesIdVersion < ActiveRecord::Migration
+
+  #Migration will fail to run unless rake db:node_version has been run previously
+  def self.up
+    add_primary_key "nodes", ["id", "version"] 
+  end
+
+  def self.down
+  end
+end