2021-04-21 09:03:39 +00:00
|
|
|
defmodule Bonfire.Social.Repo.Migrations.ProfileImages do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
import Pointers.Migration
|
|
|
|
|
|
|
|
def up do
|
2022-09-12 04:34:14 +00:00
|
|
|
drop_if_exists(
|
|
|
|
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_icon_id_fkey")
|
|
|
|
)
|
2021-04-21 09:03:39 +00:00
|
|
|
|
2022-09-12 04:34:14 +00:00
|
|
|
drop_if_exists(
|
|
|
|
constraint("bonfire_data_social_profile", "bonfire_data_social_profile_image_id_fkey")
|
|
|
|
)
|
2021-04-21 09:03:39 +00:00
|
|
|
|
|
|
|
alter table("bonfire_data_social_profile") do
|
2022-09-12 04:34:14 +00:00
|
|
|
Ecto.Migration.add_if_not_exists(:icon_id, strong_pointer(Bonfire.Files.Media))
|
|
|
|
Ecto.Migration.add_if_not_exists(:image_id, strong_pointer(Bonfire.Files.Media))
|
2021-04-21 09:03:39 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-09-12 04:34:14 +00:00
|
|
|
def down, do: nil
|
2021-04-21 09:03:39 +00:00
|
|
|
end
|