class CreateLogs < ActiveRecord::Migration[5.0]
  def change
    create_table :logs do |t|
      t.string :message # text message
      t.string :level # 'info' or 'warning'
      t.string :section # 'importer' or 'upload'
      t.string :token # cookie session token to track users (if available)
      t.inet   :ip_address # IP address of the user (if available)

      t.timestamps null: false
    end
  end
end
