Sha256: 2ae950663cb38b0656ba846d5528c38f8ec0f41ff2126addca9a6285f0f6e9f1

Contents?: true

Size: 1.24 KB

Versions: 8

Compression:

Stored size: 1.24 KB

Contents

class CreateLeads < ActiveRecord::Migration[4.2]
  def self.up
    create_table :leads, force: true do |t|
      t.string :uuid,   limit: 36
      t.references :user
      t.references :campaign
      t.integer :assigned_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 :company,     limit: 64
      t.string :source,      limit: 32
      t.string :status,      limit: 32
      t.string :referred_by, limit: 64
      t.string :email,       limit: 64
      t.string :alt_email,   limit: 64
      t.string :phone,       limit: 32
      t.string :mobile,      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.integer :rating,      null: false, default: 0
      t.boolean :do_not_call, null: false, default: false
      t.datetime :deleted_at
      t.timestamps
    end

    add_index :leads, %i[user_id last_name deleted_at], unique: true
    add_index :leads, :assigned_to
  end

  def self.down
    drop_table :leads
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fat_free_crm-0.15.2 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.16.4 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.15.1 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.16.3 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.16.2 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.16.1 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.16.0 db/migrate/20100928030606_create_leads.rb
fat_free_crm-0.15.0 db/migrate/20100928030606_create_leads.rb