Sha256: cd24074df8d5244a23789acf9d59e2ab44e169c73f1d7262770020555f245a35

Contents?: true

Size: 815 Bytes

Versions: 26

Compression:

Stored size: 815 Bytes

Contents

class CreateEffectiveLogging < ActiveRecord::Migration[4.2]
  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.string        :associated_to_s

      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
    add_index <%= @logs_table_name %>, :associated_to_s
  end

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
effective_logging-2.1.2 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.1.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.1.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.8 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.7 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.6 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.5 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.4 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.3 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.2 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-2.0.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.11.5 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.11.4 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.11.3 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.11.2 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.11.1 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.11.0 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.10.18 db/migrate/01_create_effective_logging.rb.erb
effective_logging-1.10.17 db/migrate/01_create_effective_logging.rb.erb