Sha256: 80de74fc18b59f225ea1317e0fa51a14ddfd0d838a258c883d2d36867b9c33fe

Contents?: true

Size: 461 Bytes

Versions: 7

Compression:

Stored size: 461 Bytes

Contents

class CreatePhoneNumbers < ActiveRecord::Migration
  def self.up
    create_table :phone_numbers do |t|
      t.references :phoneable, :polymorphic => true, :null => false
      t.string :country_code, :null => false, :limit => 3, :default => 1 # Default is the United States
      t.string :number, :null => false, :limit => 12
      t.string :extension, :limit => 10
      t.timestamps
    end
  end
  
  def self.down
    drop_table :phone_numbers
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
pluginaweek-has_phone_numbers-0.2.0 db/migrate/001_create_phone_numbers.rb
has_phone_numbers-0.2.1 generators/has_phone_numbers/templates/001_create_phone_numbers.rb
has_phone_numbers-0.0.5 db/migrate/001_create_phone_numbers.rb
has_phone_numbers-0.0.3 db/migrate/001_create_phone_numbers.rb
has_phone_numbers-0.2.0 db/migrate/001_create_phone_numbers.rb
has_phone_numbers-0.1.0 db/migrate/001_create_phone_numbers.rb
has_phone_numbers-0.0.4 db/migrate/001_create_phone_numbers.rb