Class: CreateLogTypes

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/geostats/migrations/004_create_log_types.rb

Class Method Summary collapse

Class Method Details

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/geostats/migrations/004_create_log_types.rb', line 2

def self.up
  create_table :log_types do |t|
    t.string    :name
  end

  log_types = ["Found it", "Didn't find it", "Note", "Needs archived",
    "Needs maintenance", "Archive", "Enable Listing","Temporarily Disable Listing",
    "Update Coordinates", "Owner Maintenance", "Will attend", "Attended"]

  log_types.each do |log_type|
    Geostats::LogType.create! :name => log_type
  end
end