Class: RequestLogAnalyzer::Database::Warning

Inherits:
Base
  • Object
show all
Defined in:
lib/request_log_analyzer/database/warning.rb

Class Method Summary (collapse)

Methods inherited from Base

#<=>, column_type, drop_table!, #format, #format=, #line_type, subclass_from_line_definition, subclass_from_table

Class Method Details

+ (Object) create_table!



3
4
5
6
7
8
9
10
11
12
# File 'lib/request_log_analyzer/database/warning.rb', line 3

def self.create_table!
  unless database.connection.table_exists?(:warnings)
    database.connection.create_table(:warnings) do |t|
      t.column  :warning_type, :string, :limit => 30, :null => false
      t.column  :message, :string
      t.column  :source_id, :integer
      t.column  :lineno, :integer
    end
  end
end