Loading ru/en artist bio, all image sizes

This commit is contained in:
Gregory Eremin
2012-09-18 00:03:57 +04:00
parent e8fa9e4cda
commit 7cef7bfc9c
10 changed files with 137 additions and 25 deletions
@@ -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