Sha256: af7b226538ebaf1fc620b5a361402da56d47133e4827370bed1abca744ef2597

Contents?: true

Size: 260 Bytes

Versions: 10

Compression:

Stored size: 260 Bytes

Contents

require 'yaml'
require 'gdshowsdb'

class ImportSongRefs < ActiveRecord::Migration[5.0]
	def up		
		Gdshowsdb::SongRefYAMLParser.from_yaml.parse.each do |song_ref_hash|
			SongRef.create_from(song_ref_hash)
		end		
	end

	def down
		SongRef.delete_all
	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gdshowsdb-4.0.2 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-4.0.1 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-4.0.0 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-3.0.0 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-2.1.0 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-2.0.0 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-1.0.3 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-1.0.2 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-1.0.1 lib/gdshowsdb/db/migrations/002_import_song_refs.rb
gdshowsdb-1.0.0 lib/gdshowsdb/db/migrations/002_import_song_refs.rb