Loading data from MusicBrainz Web Service, stability fixes, database reorganized. Closes #39
This commit is contained in:
@@ -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
|
||||
+6
-2
@@ -10,16 +10,17 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110614175827) do
|
||||
ActiveRecord::Schema.define(:version => 20110617213912) do
|
||||
|
||||
create_table "albums", :force => true do |t|
|
||||
t.string "name"
|
||||
t.integer "artist_id"
|
||||
t.integer "year"
|
||||
t.integer "status"
|
||||
t.string "pic_url"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "album_type"
|
||||
t.string "mbid"
|
||||
end
|
||||
|
||||
create_table "artists", :force => true do |t|
|
||||
@@ -28,6 +29,8 @@ ActiveRecord::Schema.define(:version => 20110614175827) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "pic_url"
|
||||
t.string "artist_type"
|
||||
t.string "mbid"
|
||||
end
|
||||
|
||||
create_table "tracks", :force => true do |t|
|
||||
@@ -40,6 +43,7 @@ ActiveRecord::Schema.define(:version => 20110614175827) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "length"
|
||||
t.string "country"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user