Class: SportDb::Deleter

Inherits:
Object
  • Object
show all
Includes:
Models
Defined in:
lib/sportdb/models/deleter.rb

Instance Method Summary collapse

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/sportdb/models/deleter.rb', line 10

def run
  # for now delete all tables

  ## stats
  AlltimeStandingEntry.delete_all
  AlltimeStanding.delete_all
  GroupStandingEntry.delete_all
  GroupStanding.delete_all


  Goal.delete_all

  Match.delete_all
  Event.delete_all
  EventTeam.delete_all
  EventGround.delete_all
  Group.delete_all
  GroupTeam.delete_all
  Stage.delete_all
  StageTeam.delete_all
  Round.delete_all
  Badge.delete_all

  Lineup.delete_all

  Team.delete_all

  League.delete_all
  Season.delete_all

  Ground.delete_all   # stadiums

  Assoc.delete_all       # associations / organizations
  AssocAssoc.delete_all  # associations / organizations
end