Sha256: e4f60ba37867909da4d2312b227bb94f7c3fc9aacbb3ed2e23c83002320754fc

Contents?: true

Size: 832 Bytes

Versions: 8

Compression:

Stored size: 832 Bytes

Contents

class CreateActivities < ActiveRecord::Migration[4.2]
  def self.up
    create_table :activities, force: true do |t|
      t.references :user                                           # User who's activity gets recorded.
      t.references :subject, polymorphic: true                  # Points to related asset (account, contact, etc.).
      t.string :action,  limit: 32, default: "created"   # Action taken: created, updated, deleted.
      t.string :info,    default: ""                        # Extra information related to the asset and the action.
      t.boolean :private, default: false                     # True if the action shouldn't be shared with others.
      t.timestamps
    end

    add_index :activities, :user_id
    add_index :activities, :created_at
  end

  def self.down
    drop_table :activities
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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