Sha256: 02d560404a097de10b4f042522daa315577f3235e56537fc6b11e81497c55d79

Contents?: true

Size: 714 Bytes

Versions: 31

Compression:

Stored size: 714 Bytes

Contents

class CreateEffectiveLogging < ActiveRecord::Migration
  def self.up
    create_table <%= @logs_table_name %> do |t|
      t.integer       :parent_id
      t.integer       :user_id

      t.string        :associated_type
      t.integer       :associated_id

      t.integer       :logs_count

      t.string        :message
      t.text          :details

      t.string        :status

      t.timestamps
    end

    add_index <%= @logs_table_name %>, :user_id
    add_index <%= @logs_table_name %>, :parent_id
    add_index <%= @logs_table_name %>, [:associated_type, :associated_id]
    add_index <%= @logs_table_name %>, :associated_id
  end

  def self.down
    drop_table <%= @logs_table_name %>
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
effective_logging-1.9.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.8.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.8.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.7.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.7.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.6.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.9 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.8 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.7 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.6 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.5 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.4 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.3 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.2 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.5.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.4.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.4.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.3.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.3.0 db/migrate/01_create_effective_logging.rb.erb