Adding Log model for database-based log messages

This commit is contained in:
Christoph Haas 2015-04-27 00:15:55 +02:00
parent e1bef18152
commit ac3d52a66e
4 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,13 @@
class CreateLogs < ActiveRecord::Migration
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