Sha256: 679cab19b389b7b49d9e958d025fd821adcfccbeb39d5de6ab522d817fa2ecf7

Contents?: true

Size: 809 Bytes

Versions: 4

Compression:

Stored size: 809 Bytes

Contents

module SportDb

  class Deleter
    ######
    # NB: make models available in sportdb module by default with namespace
    #  e.g. lets you use Team instead of Model::Team
    include SportDb::Models

    def run
      # for now delete all tables
      
      Goal.delete_all
      Record.delete_all

      Game.delete_all
      Event.delete_all
      EventTeam.delete_all
      EventGround.delete_all
      Group.delete_all
      GroupTeam.delete_all
      Round.delete_all
      Badge.delete_all

      Run.delete_all
      Race.delete_all
      Roster.delete_all

      Track.delete_all
      Team.delete_all
      
      League.delete_all
      Season.delete_all
      
      Ground.delete_all   # stadiums
    end
    
  end # class Deleter
  
end # module SportDb

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sportdb-1.8.26 lib/sportdb/deleter.rb
sportdb-1.8.25 lib/sportdb/deleter.rb
sportdb-1.8.24 lib/sportdb/deleter.rb
sportdb-1.8.23 lib/sportdb/deleter.rb