Class: RequestLogAnalyzer::Database::Source

Inherits:
Base
  • Object
show all
Defined in:
lib/request_log_analyzer/database/source.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
# File 'lib/request_log_analyzer/database/source.rb', line 3

def self.create_table!
  unless database.connection.table_exists?(:sources)
    database.connection.create_table(:sources) do |t|
      t.column :filename, :string
      t.column :mtime,    :datetime
      t.column :filesize, :integer
    end
  end
end