Loading ru/en artist bio, all image sizes
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class CreateArtistInfos < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :artist_infos do |t|
|
||||
t.integer :artist_id
|
||||
t.string :lang
|
||||
t.text :bio
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
class CreateImages < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :images do |t|
|
||||
t.text :sizes
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
class RemoveArtistBioAndImageFields < ActiveRecord::Migration
|
||||
def up
|
||||
remove_column :artists, :bio
|
||||
remove_column :artists, :pic
|
||||
remove_column :albums, :pic
|
||||
|
||||
add_column :artists, :image_id, :integer, default: nil
|
||||
add_column :albums, :image_id, :integer, default: nil
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :artists, :bio, :text, default: nil
|
||||
add_column :artists, :pic, :string, default: nil
|
||||
add_column :albums, :pic, :string, default: nil
|
||||
|
||||
remove_column :artists, :image_id
|
||||
remove_column :albums, :image_id
|
||||
end
|
||||
end
|
||||
+17
-4
@@ -11,17 +11,17 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20120901191655) do
|
||||
ActiveRecord::Schema.define(:version => 20120917185417) do
|
||||
|
||||
create_table "albums", :force => true do |t|
|
||||
t.integer "artist_id"
|
||||
t.string "rovi_id"
|
||||
t.string "title"
|
||||
t.integer "year"
|
||||
t.string "pic"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.boolean "is_hidden", :default => false
|
||||
t.integer "image_id"
|
||||
end
|
||||
|
||||
create_table "artist_genres", :force => true do |t|
|
||||
@@ -31,14 +31,21 @@ ActiveRecord::Schema.define(:version => 20120901191655) do
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "artist_infos", :force => true do |t|
|
||||
t.integer "artist_id"
|
||||
t.string "lang"
|
||||
t.text "bio"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "artists", :force => true do |t|
|
||||
t.string "rovi_id"
|
||||
t.string "name"
|
||||
t.boolean "is_group"
|
||||
t.text "bio"
|
||||
t.string "pic"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "image_id"
|
||||
end
|
||||
|
||||
create_table "genres", :force => true do |t|
|
||||
@@ -48,6 +55,12 @@ ActiveRecord::Schema.define(:version => 20120901191655) do
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "images", :force => true do |t|
|
||||
t.text "sizes"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "performers", :force => true do |t|
|
||||
t.integer "track_id"
|
||||
t.integer "artist_id"
|
||||
|
||||
Reference in New Issue
Block a user