ash_hq/priv/repo/migrations/20220604165434_migrate_resources6.exs

43 lines
926 B
Elixir
Raw Normal View History

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
remove(:processed)
remove(:data)
2022-06-05 08:58:50 +12:00
end
alter table(:libraries) do
remove(:description)
2022-06-05 08:58:50 +12:00
modify(:track_branches, {:array, :text}, default: nil)
2022-06-05 08:58:50 +12:00
end
alter table(:functions) do
modify(:heads, {:array, :text}, default: nil)
2022-06-05 08:58:50 +12:00
end
end
def down do
alter table(:functions) do
modify(:heads, {:array, :text}, default: [])
2022-06-05 08:58:50 +12:00
end
alter table(:libraries) do
modify(:track_branches, {:array, :text}, default: [])
add(:description, :text)
2022-06-05 08:58:50 +12:00
end
alter table(:library_versions) do
add(:data, :map)
add(:processed, :boolean, default: false)
2022-06-05 08:58:50 +12:00
end
end
end