]> git.openstreetmap.org Git - rails.git/blob - db/migrate/031_create_countries.rb
Add frozen_string_literal comments to ruby files
[rails.git] / db / migrate / 031_create_countries.rb
1 # frozen_string_literal: true
2
3 require "rexml/document"
4
5 class CreateCountries < ActiveRecord::Migration[4.2]
6   def self.up
7     create_table :countries, :id => false do |t|
8       t.column :id,      :primary_key, :null => false
9       t.column :code,    :string, :limit => 2, :null => false
10       t.column :min_lat, :float, :limit => 53, :null => false
11       t.column :max_lat, :float, :limit => 53, :null => false
12       t.column :min_lon, :float, :limit => 53, :null => false
13       t.column :max_lon, :float, :limit => 53, :null => false
14     end
15
16     add_index :countries, [:code], :name => "countries_code_idx", :unique => true
17   end
18
19   def self.down
20     drop_table :countries
21   end
22 end