Class: Charted::Migrate

Inherits:
Object
  • Object
show all
Defined in:
lib/charted/model.rb

Class Method Summary collapse

Class Method Details

.runObject



3
4
5
6
7
8
9
10
# File 'lib/charted/model.rb', line 3

def self.run
  Sequel.extension :migration
  Sequel::Migrator.run(Charted.database, File.join(File.dirname(__FILE__), '..', '..', 'migrate'))
  # re-parse the schema after table changes
  [Site, Visitor, Visit, Event, Conversion, Experiment].each do |table|
    table.dataset = table.dataset
  end
end