Adding Log model for database-based log messages
This commit is contained in:
parent
e1bef18152
commit
ac3d52a66e
4 changed files with 61 additions and 0 deletions
13
db/migrate/20150426141106_create_logs.rb
Normal file
13
db/migrate/20150426141106_create_logs.rb
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue