Sha256: 07a45488ac5395cb92f38faa09f0288560acb14f42111c9aa591576c4942f80e

Contents?: true

Size: 760 Bytes

Versions: 20

Compression:

Stored size: 760 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 Models::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
      Group.delete_all
      GroupTeam.delete_all
      Round.delete_all
      Badge.delete_all

      Run.delete_all
      Race.delete_all
      Roster.delete_all

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sportdb-1.8.1 lib/sportdb/deleter.rb
sportdb-1.8.0 lib/sportdb/deleter.rb
sportdb-1.7.9 lib/sportdb/deleter.rb
sportdb-1.7.8 lib/sportdb/deleter.rb
sportdb-1.7.7 lib/sportdb/deleter.rb
sportdb-1.7.6 lib/sportdb/deleter.rb
sportdb-1.7.5 lib/sportdb/deleter.rb
sportdb-1.7.4 lib/sportdb/deleter.rb
sportdb-1.7.3 lib/sportdb/deleter.rb
sportdb-1.7.2 lib/sportdb/deleter.rb
sportdb-1.7.1 lib/sportdb/deleter.rb
sportdb-1.7.0 lib/sportdb/deleter.rb
sportdb-1.6.18 lib/sportdb/deleter.rb
sportdb-1.6.17 lib/sportdb/deleter.rb
sportdb-1.6.16 lib/sportdb/deleter.rb
sportdb-1.6.15 lib/sportdb/deleter.rb
sportdb-1.6.14 lib/sportdb/deleter.rb
sportdb-1.6.13 lib/sportdb/deleter.rb
sportdb-1.6.12 lib/sportdb/deleter.rb
sportdb-1.6.11 lib/sportdb/deleter.rb