Sha256: ef0ca7031b867273db1e518276ce5f9c6e003f4f32408dd52905166200cf305e
Contents?: true
Size: 793 Bytes
Versions: 2
Compression:
Stored size: 793 Bytes
Contents
class CreateAddresses < ActiveRecord::Migration def self.up create_table :addresses do |t| t.column :addressable_id, :integer, :null => false, :references => nil t.column :addressable_type, :string, :null => false t.column :street_1, :string, :null => false, :limit => 100 t.column :street_2, :string, :limit => 100 t.column :city, :string, :null => false, :limit => 255 t.column :region_id, :integer t.column :custom_region, :string, :limit => 50 t.column :postal_code, :string, :null => false, :limit => 5 t.column :country_id, :integer, :default => 223 t.column :created_at, :timestamp, :null => false t.column :updated_at, :datetime, :null => false end end def self.down drop_table :addresses end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
has_addresses-0.0.1 | db/migrate/003_create_addresses.rb |
has_addresses-0.0.2 | db/migrate/003_create_addresses.rb |