3 class AddMapBugTables < ActiveRecord::Migration
5 create_enumeration :map_bug_status_enum, ["open", "closed", "hidden"]
7 create_table :map_bugs do |t|
8 t.column :id, :bigint, :null => false
9 t.integer :latitude, :null => false
10 t.integer :longitude, :null => false
11 t.column :tile, :bigint, :null => false
12 t.datetime :last_changed, :null => false
13 t.datetime :date_created, :null => false
14 t.string :nearby_place
16 t.column :status, :map_bug_status_enum, :null => false
19 add_index :map_bugs, [:tile, :status], :name => "map_bugs_tile_idx"
20 add_index :map_bugs, [:last_changed], :name => "map_bugs_changed_idx"
21 add_index :map_bugs, [:date_created], :name => "map_bugs_created_idx"
25 remove_index :map_bugs, :name => "map_bugs_tile_idx"
26 remove_index :map_bugs, :name => "map_bugs_changed_idx"
27 remove_index :map_bugs, :name => "map_bugs_created_idx"
31 drop_enumeration :map_bug_status_enum