Loading data from MusicBrainz Web Service, stability fixes, database reorganized. Closes #39

This commit is contained in:
magnolia-fan
2011-06-18 01:49:32 +04:00
parent a66300c8e4
commit 17f5edf841
15 changed files with 179 additions and 170 deletions
@@ -0,0 +1,11 @@
class AddTypeAndMbidToArtists < ActiveRecord::Migration
def self.up
add_column :artists, :type, :string
add_column :artists, :mbid, :string
end
def self.down
remove_column :artists, :mbid
remove_column :artists, :type
end
end
@@ -0,0 +1,13 @@
class AddTypeAndMbidToAlbums < ActiveRecord::Migration
def self.up
remove_column :albums, :status
add_column :albums, :type, :string
add_column :albums, :mbid, :string
end
def self.down
remove_column :albums, :mbid
remove_column :albums, :type
add_column :albums, :type, :integer
end
end
@@ -0,0 +1,9 @@
class AddCountryToTrack < ActiveRecord::Migration
def self.up
add_column :tracks, :country, :string
end
def self.down
remove_column :tracks, :country
end
end
@@ -0,0 +1,11 @@
class FixColumnNames < ActiveRecord::Migration
def self.up
rename_column :artists, :type, :artist_type
rename_column :albums, :type, :album_type
end
def self.down
rename_column :artists, :artist_type, :type
rename_column :albums, :album_type, :type
end
end