]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/020_populate_node_tags_and_remove.rb
Cleanup trailing whitespace
[rails.git] / db / migrate / 020_populate_node_tags_and_remove.rb
index 0e2fae06399ad022e6df6705b426b74d01650d33..b5932bbe82e8f4c46cbafce9e578c59c32724d97 100644 (file)
@@ -1,4 +1,4 @@
-require 'lib/migrate'
+require 'migrate'
 
 class PopulateNodeTagsAndRemove < ActiveRecord::Migration
   def self.up
@@ -9,7 +9,7 @@ class PopulateNodeTagsAndRemove < ActiveRecord::Migration
 
       cmd = "db/migrate/020_populate_node_tags_and_remove_helper"
       src = "#{cmd}.c"
-      if not File.exists? cmd or File.mtime(cmd) < File.mtime(src) then 
+      if not File.exists? cmd or File.mtime(cmd) < File.mtime(src) then
         system 'cc -O3 -Wall `mysql_config --cflags --libs` ' +
           "#{src} -o #{cmd}" or fail
       end
@@ -27,17 +27,17 @@ class PopulateNodeTagsAndRemove < ActiveRecord::Migration
     remove_column :nodes, :tags
     remove_column :current_nodes, :tags
 
-    add_column :nodes, :version, :bigint, :limit => 20, :null => false
+    add_column :nodes, :version, :bigint, :null => false
 
-    create_table :current_node_tags, innodb_table do |t|
-      t.column :id,          :bigint, :limit => 64, :null => false
+    create_table :current_node_tags, :id => false do |t|
+      t.column :id,          :bigint, :null => false
       t.column :k,          :string, :default => "", :null => false
       t.column :v,          :string, :default => "", :null => false
     end
 
-    create_table :node_tags, innodb_table do |t|
-      t.column :id,          :bigint, :limit => 64, :null => false
-      t.column :version,     :bigint, :limit => 20, :null => false
+    create_table :node_tags, :id => false do |t|
+      t.column :id,          :bigint, :null => false
+      t.column :version,     :bigint, :null => false
       t.column :k,          :string, :default => "", :null => false
       t.column :v,          :string, :default => "", :null => false
     end