Sha256: 7340c40fd9c966fc546e3eac8b9d26cf4fdd14015484bbdf31edd581965d54db

Contents?: true

Size: 1.27 KB

Versions: 13

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

class CreateContacts < ActiveRecord::Migration[4.2]
  def self.up
    create_table :contacts, force: true do |t|
      t.string :uuid, limit: 36
      t.references :user
      t.references :lead
      t.integer :assigned_to
      t.integer :reports_to
      t.string :first_name,  limit: 64, null: false, default: ""
      t.string :last_name,   limit: 64, null: false, default: ""
      t.string :access,      limit: 8, default: "Public"
      t.string :title,       limit: 64
      t.string :department,  limit: 64
      t.string :source,      limit: 32
      t.string :email,       limit: 64
      t.string :alt_email,   limit: 64
      t.string :phone,       limit: 32
      t.string :mobile,      limit: 32
      t.string :fax,         limit: 32
      t.string :blog,        limit: 128
      t.string :linkedin,    limit: 128
      t.string :facebook,    limit: 128
      t.string :twitter,     limit: 128
      t.string :address
      t.date :born_on
      t.boolean :do_not_call, null: false, default: false
      t.datetime :deleted_at
      t.timestamps
    end

    add_index :contacts, %i[user_id last_name deleted_at], unique: true, name: 'id_last_name_deleted'
    add_index :contacts, :assigned_to
  end

  def self.down
    drop_table :contacts
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.22.0 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.21.0 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.20.1 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.20.0 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.19.2 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.19.0 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.18.2 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.17.3 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.18.1 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.18.0 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.17.2 db/migrate/20100928030607_create_contacts.rb
fat_free_crm-0.17.1 db/migrate/20100928030607_create_contacts.rb