Class: ImportShows

Inherits:
Object
  • Object
show all
Includes:
Gdshowsdb
Defined in:
lib/gdshowsdb/db/migrations/009_import_shows.rb

Constant Summary

Constants included from Gdshowsdb

Gdshowsdb::VERSION

Instance Method Summary collapse

Methods included from Gdshowsdb

#generate_uuid, init, load, load_yaml, load_yaml_for_year, write_yaml, yaml_file_location

Instance Method Details

#downObject



16
17
18
19
20
# File 'lib/gdshowsdb/db/migrations/009_import_shows.rb', line 16

def down
  Song.delete_all
  ShowSet.delete_all
  Show.delete_all
end

#upObject



8
9
10
11
12
13
14
# File 'lib/gdshowsdb/db/migrations/009_import_shows.rb', line 8

def up
  (1965..1995).each do |year|
    create_shows(year)
    create_sets(year)
    create_songs(year)      
  end
end