Class: Timetrap::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/timetrap/schema.rb

Direct Known Subclasses

EntrySchema, MetaSchema

Class Method Summary collapse

Class Method Details

.create_tableObject



11
12
13
# File 'lib/timetrap/schema.rb', line 11

def self.create_table
  self.new.create_table
end

.create_table!Object



6
7
8
9
# File 'lib/timetrap/schema.rb', line 6

def self.create_table!
  DB.drop_table(self::TABLE)
  create_table
end

.try_create_tableObject



15
16
17
# File 'lib/timetrap/schema.rb', line 15

def self.try_create_table
  create_table unless DB.table_exists?(self::TABLE)
end