Commit 0860e7b8f00b36bea23d84aee5e0278c3a9c3273

Authored by MoisesMachado
1 parent 81a4c24d

ActionItem261: added migration to support geokit


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1659 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 20 additions and 0 deletions   Show diff stats
db/migrate/028_add_geokit_support.rb 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +class AddGeokitSupport < ActiveRecord::Migration
  2 +
  3 + TABLES = [ :profiles, :categories ]
  4 +
  5 + def self.up
  6 + TABLES.each do |table|
  7 + add_column table, :lat, :float
  8 + add_column table, :lng, :float
  9 + end
  10 + add_column :profiles, :geocode_precision, :integer
  11 + end
  12 +
  13 + def self.down
  14 + TABLES.each do |t|
  15 + remove_column t, :lat
  16 + remove_column t, :lng
  17 + end
  18 + remove_column :profiles, :geocode_precision
  19 + end
  20 +end
... ...