```ruby
class AddSlugToPhotos < ActiveRecord::Migration
  def change
    add_column :photos, :slug, :string
    add_index :photos, :slug

    Photo.initialize_urls
  end
end
```

Fix db:migrate after removing photo slugs
user
```ruby
class AddSlugToPhotos < ActiveRecord::Migration
  def change
    add_column :photos, :slug, :string
    add_index :photos, :slug
  end
end
```
assistant