feature/share-libs
rb 11 lines 586 Bytes
Raw
1 class ModifySongProviders < ActiveRecord::Migration[6.1]
2 def change
3 add_column :song_providers, :description, :string
4 add_column :song_providers, :image_url, :string
5 change_column :song_providers, :created_at, :datetime, null: false, default: -> { 'CURRENT_TIMESTAMP' }
6 change_column :song_providers, :updated_at, :datetime, null: false, default: -> { 'CURRENT_TIMESTAMP' }
7 remove_column :song_providers, :album_provider_id
8 remove_column :song_providers, :artist_provider_id
9 add_index :song_providers, %i[provider_id provider_type], unique: true
10 end
11 end