Artist wipe, local brainz
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class Album < ActiveRecord::Base
|
||||
belongs_to :artist
|
||||
has_many :tracks, :order => 'bonus ASC, position ASC', :dependent => :destroy
|
||||
has_many :local_brainz_releases, :class_name => 'LocalBrainz::Release', :dependent => :destroy
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
class Artist < ActiveRecord::Base
|
||||
has_many :albums, :order => 'has_pic DESC, year ASC, id ASC', :dependent => :destroy
|
||||
has_many :artist_links, :dependent => :destroy
|
||||
end
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class ArtistLink < ActiveRecord::Base
|
||||
belongs_to :artist
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
module LocalBrainz
|
||||
def self.table_name_prefix
|
||||
'local_brainz_'
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
class LocalBrainz::Release < ActiveRecord::Base
|
||||
belongs_to :album, :class_name => 'Album'
|
||||
has_many :local_brainz_tracks, :class_name => 'LocalBrainz::Track', :dependent => :destroy
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
class LocalBrainz::Track < ActiveRecord::Base
|
||||
belongs_to :local_brainz_release, :class_name => 'LocalBrainz::Release'
|
||||
end
|
||||
Reference in New Issue
Block a user