]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/053_add_map_bug_tables.rb
Tidy up some of the map bugs code
[rails.git] / db / migrate / 053_add_map_bug_tables.rb
index 2d3b7348bd3d62bc953a51f1dc0ba935b667f488..8d444a49fdb1bdc45f65b326ef3e66a1a47eaa19 100644 (file)
@@ -2,8 +2,7 @@ require 'lib/migrate'
 
 class AddMapBugTables < ActiveRecord::Migration
   def self.up
 
 class AddMapBugTables < ActiveRecord::Migration
   def self.up
-
-       create_enumeration :map_bug_status_enum, ["open", "closed","hidden"]
+    create_enumeration :map_bug_status_enum, ["open", "closed", "hidden"]
 
     create_table :map_bugs do |t|
       t.column :id, :bigint, :null => false 
 
     create_table :map_bugs do |t|
       t.column :id, :bigint, :null => false 
@@ -14,20 +13,21 @@ class AddMapBugTables < ActiveRecord::Migration
       t.datetime :date_created, :null => false 
       t.string :nearby_place 
       t.string :text
       t.datetime :date_created, :null => false 
       t.string :nearby_place 
       t.string :text
-         t.column :status, :map_bug_status_enum, :null => false
-         
+      t.column :status, :map_bug_status_enum, :null => false
     end
 
     end
 
-    add_index :map_bugs, [:tile,:status], :name => "map_bugs_tile_idx"
-       add_index :map_bugs, [:last_changed], :name => "map_bugs_changed_idx"
-       add_index :map_bugs, [:date_created], :name => "map_bugs_created_idx"
+    add_index :map_bugs, [:tile, :status], :name => "map_bugs_tile_idx"
+    add_index :map_bugs, [:last_changed], :name => "map_bugs_changed_idx"
+    add_index :map_bugs, [:date_created], :name => "map_bugs_created_idx"
   end
 
   def self.down
     remove_index :map_bugs, :name => "map_bugs_tile_idx"
   end
 
   def self.down
     remove_index :map_bugs, :name => "map_bugs_tile_idx"
-       remove_index :map_bugs, :name => "map_bugs_changed_idx"
-       remove_index :map_bugs, :name => "map_bugs_created_idx"
+    remove_index :map_bugs, :name => "map_bugs_changed_idx"
+    remove_index :map_bugs, :name => "map_bugs_created_idx"
+
     drop_table :map_bugs
     drop_table :map_bugs
-       drop_enumeration :map_bug_status_enum
+
+    drop_enumeration :map_bug_status_enum
   end
 end
   end
 end