Sha256: 792b0176cccb21df145aeb5b28ae90f20d00b38d432bba7245c8a50bc6514b10

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

class CreateCustomers < ActiveRecord::Migration
  def change
    create_table :customers do |t|
      t.string	:name	, :limit => 120, :null => false
      t.string	:doc	, :limit => 14
      t.string	:doc_rg	, :limit => 22
		
      t.string	:name_sec	, :limit => 120 #
      t.string	:address	, :limit => 150
      t.integer	:district_id
      t.integer	:city_id
      t.integer	:state_id
      t.string	:postal	  , :limit => 8
      t.text  	:notes
      t.date  	:birthday
		  
      t.string	:phone	        , :limit => 35
      t.string	:social_link	, :limit => 200
      t.string	:site	        , :limit => 200
      t.boolean	:is_customer	, :default => false
      #dont use field name type, its used for inharitance and crashs on restore
      #t.boolean	:type         , :default => true #legal entity or individual
      t.integer	:parent_id
      
      t.boolean :enabled, :default => true
      
      t.references :person, :polymorphic => true
      
      t.boolean :complete      
      t.float	:annual_revenue
      t.integer :external_key
      
      t.timestamps
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guara-0.0.3 db/migrate/20120621095918_create_customers.rb
guara-0.0.1.rc db/migrate/20120621095918_create_customers.rb