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
|
||||
Reference in New Issue
Block a user