Module: Mimi::DB::Extensions

Defined in:
lib/mimi/db/extensions.rb

Class Method Summary collapse

Class Method Details

.startObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/mimi/db/extensions.rb', line 4

def self.start
  adapter_name = Mimi::DB.sequel_config[:adapter]
  require_relative 'extensions/sequel-database'
  case adapter_name
  when 'sqlite'
    require_relative 'extensions/sequel-sqlite'
  when 'postgres'
    require_relative 'extensions/sequel-postgres'
  when 'cockroachdb'
    require_relative 'extensions/sequel-postgres'
    require_relative 'extensions/sequel-cockroachdb'
  else
    # load nothing
  end
  Sequel::Model.plugin :timestamps
end