Sha256: 5fadb915f52eece8082858318cc049c155139939b40e961765c8bc3d303ecba5

Contents?: true

Size: 591 Bytes

Versions: 15

Compression:

Stored size: 591 Bytes

Contents

class AddLeadScoringRules < ActiveRecord::Migration
  def up
   create_table :lead_scoring_rules do |t|
      t.string  :event
      t.string  :match
      t.integer :points, :default => 0
      t.boolean :once
      t.timestamps
    end

    create_table :lead_scoring_rule_counts do |t|
      t.integer :lead_id
      t.integer :lead_scoring_rule_id
      t.integer :count, :default => 0
    end

    add_column :leads, :score, :integer, :default => 0
  end

  def down
    drop_table :lead_scoring_rules
    drop_table :lead_scoring_rule_counts
    remove_column :leads, :score
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ffcrm_cloudfuji-0.4.1 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.3.1 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.3.0 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.11 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.10 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.9 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.8 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.7 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.6 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.5 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.4 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.3 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.2 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.1 db/migrate/20120515194445_add_lead_scoring_rules.rb
ffcrm_cloudfuji-0.2.0 db/migrate/20120515194445_add_lead_scoring_rules.rb