X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8accdb9259d1bfc75d76148b2e8daa06981713cb..7821bf48ad301c4d4253ed0ae7f6d53e2176b6bc:/db/migrate/031_create_countries.rb?ds=sidebyside diff --git a/db/migrate/031_create_countries.rb b/db/migrate/031_create_countries.rb index 923d943f7..180605b26 100644 --- a/db/migrate/031_create_countries.rb +++ b/db/migrate/031_create_countries.rb @@ -1,15 +1,15 @@ -require 'migrate' -require 'rexml/document' +require "migrate" +require "rexml/document" -class CreateCountries < ActiveRecord::Migration +class CreateCountries < ActiveRecord::Migration[5.0] def self.up - create_table :countries, innodb_table do |t| - t.column :id, :integer_pk, :null => false - t.column :code, :string, :limit => 2, :null => false - t.column :min_lat, :double, :null => false - t.column :max_lat, :double, :null => false - t.column :min_lon, :double, :null => false - t.column :max_lon, :double, :null => false + create_table :countries, :id => false do |t| + t.column :id, :primary_key, :null => false + t.column :code, :string, :limit => 2, :null => false + t.column :min_lat, :float, :limit => 53, :null => false + t.column :max_lat, :float, :limit => 53, :null => false + t.column :min_lon, :float, :limit => 53, :null => false + t.column :max_lon, :float, :limit => 53, :null => false end add_index :countries, [:code], :name => "countries_code_idx", :unique => true