2022-06-05 08:58:50 +12:00
|
|
|
defmodule AshHq.Repo.Migrations.MigrateResources6 do
|
|
|
|
@moduledoc """
|
|
|
|
Updates resources based on their most recent snapshots.
|
|
|
|
|
|
|
|
This file was autogenerated with `mix ash_postgres.generate_migrations`
|
|
|
|
"""
|
|
|
|
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def up do
|
|
|
|
alter table(:library_versions) do
|
2022-09-30 05:56:07 +13:00
|
|
|
remove(:processed)
|
|
|
|
remove(:data)
|
2022-06-05 08:58:50 +12:00
|
|
|
end
|
|
|
|
|
|
|
|
alter table(:libraries) do
|
2022-09-30 05:56:07 +13:00
|
|
|
remove(:description)
|
2022-06-05 08:58:50 +12:00
|
|
|
|
2022-09-30 05:56:07 +13:00
|
|
|
modify(:track_branches, {:array, :text}, default: nil)
|
2022-06-05 08:58:50 +12:00
|
|
|
end
|
|
|
|
|
|
|
|
alter table(:functions) do
|
2022-09-30 05:56:07 +13:00
|
|
|
modify(:heads, {:array, :text}, default: nil)
|
2022-06-05 08:58:50 +12:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down do
|
|
|
|
alter table(:functions) do
|
2022-09-30 05:56:07 +13:00
|
|
|
modify(:heads, {:array, :text}, default: [])
|
2022-06-05 08:58:50 +12:00
|
|
|
end
|
|
|
|
|
|
|
|
alter table(:libraries) do
|
2022-09-30 05:56:07 +13:00
|
|
|
modify(:track_branches, {:array, :text}, default: [])
|
|
|
|
add(:description, :text)
|
2022-06-05 08:58:50 +12:00
|
|
|
end
|
|
|
|
|
|
|
|
alter table(:library_versions) do
|
2022-09-30 05:56:07 +13:00
|
|
|
add(:data, :map)
|
|
|
|
add(:processed, :boolean, default: false)
|
2022-06-05 08:58:50 +12:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|