Sha256: 4cfff4a704c66655353152c7c6f1e521a567e6fd93f4061578c93f22bfc0503e

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

class CreateRegions < ActiveRecord::Migration
  def self.up
    create_table :regions do |t|
      t.string :name
      t.string :description
      t.integer :county_id
      t.integer :state_id
      t.integer :country_id
      t.boolean :active, :default => false

      t.timestamps
    end
    
    Region.create(:name => 'San Francisco Bay Area', 
                  :description => 'Home of the 49ers, Silicon Valley, and redwood trees!', 
                  :active => true)
  end

  def self.down
    drop_table :regions
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
welike-geography-0.0.2 generators/geography/templates/migrations/regions.rb