Class: BStats::DataPersistence

Inherits:
Object
  • Object
show all
Defined in:
lib/bstats/data_persistence.rb

Instance Method Summary collapse

Instance Method Details

#initialize_dbObject



6
7
8
9
# File 'lib/bstats/data_persistence.rb', line 6

def initialize_db()
  CreatePlayersTable.migrate(:up)
  CreatePlayerBattingStatsTable.migrate(:up)
end

#teardown_dbObject



11
12
13
14
# File 'lib/bstats/data_persistence.rb', line 11

def teardown_db()
  CreatePlayersTable.migrate(:down)
  CreatePlayerBattingStatsTable.migrate(:down)
end