Sha256: 75e8283143cf213ca4b54a159e7077e1475073172b1a8b676b7d5fd07c857502

Contents?: true

Size: 369 Bytes

Versions: 1

Compression:

Stored size: 369 Bytes

Contents

class AddTenantIdToAuditLog < ActiveRecord::Migration
  def up
    unless column_exists? :audit_logs, :tenant_id
      add_column :audit_logs, :tenant_id, :integer

      add_index :audit_logs, :tenant_id, name: 'audit_logs_tenant_id'
    end
  end

  def down
    if column_exists? :audit_log, :tenant_id
      remove_column :audit_logs, :tenant_id
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
erp_tech_svcs-4.2.0 db/migrate/20160313161611_add_tenant_id_to_audit_log.rb