X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6f6e827702fb2e56c0f7cd6aaf43d98f9c7f5fb2..602b7b6d3fc602288804ebe16d00181f4acfa239:/db/migrate/014_create_temp_old_nodes.rb?ds=sidebyside diff --git a/db/migrate/014_create_temp_old_nodes.rb b/db/migrate/014_create_temp_old_nodes.rb index 7b768425c..60edb8406 100644 --- a/db/migrate/014_create_temp_old_nodes.rb +++ b/db/migrate/014_create_temp_old_nodes.rb @@ -1,21 +1,21 @@ class CreateTempOldNodes < ActiveRecord::Migration def self.up - create_table "temp_nodes", myisam_table do |t| - t.column "id", :bigint, :limit => 64 - t.column "version", :bigint, :limit => 20, :default => 0, :null => false - t.column "latitude", :double - t.column "longitude", :double - t.column "user_id", :bigint, :limit => 20 - t.column "visible", :boolean - t.column "timestamp", :datetime - t.column "tile", :integer, :null => false + t.column "id", :bigint, :limit => 64, :null => false + t.column "version", :bigint, :limit => 20, :null => false + t.column "latitude", :double, :null => false + t.column "longitude", :double, :null => false + t.column "user_id", :bigint, :limit => 20, :null => false + t.column "visible", :boolean, :null => false + t.column "timestamp", :datetime, :null => false + t.column "tile", :integer, :null => false end - add_primary_key "temp_nodes", ["id", "version"] - add_index "temp_nodes", ["timestamp"], :name => "temp_nodes_timestamp_idx" - add_index "temp_nodes", ["tile"], :name => "temp_nodes_tile_idx" + add_primary_key "temp_nodes", ["id", "version"] + add_index "temp_nodes", ["timestamp"], :name => "temp_nodes_timestamp_idx" + add_index "temp_nodes", ["tile"], :name => "temp_nodes_tile_idx" + change_column "temp_nodes", "version", :bigint, :limit => 20, :null => false, :options => "AUTO_INCREMENT" end def self.down