Update DBIServer to add a relationship to itself and the sync on attribute.
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
defmodule DecentralisedBookIndex.Repo.Migrations.UpdateDbiServerToAddRelationshipToItselfAndSyncOnAttribute 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(:dbi_servers) do
|
||||
add :sync_on?, :boolean, default: false
|
||||
|
||||
add :dbi_server_id,
|
||||
references(:dbi_servers,
|
||||
column: :id,
|
||||
name: "dbi_servers_dbi_server_id_fkey",
|
||||
type: :uuid,
|
||||
prefix: "public"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
drop constraint(:dbi_servers, "dbi_servers_dbi_server_id_fkey")
|
||||
|
||||
alter table(:dbi_servers) do
|
||||
remove :dbi_server_id
|
||||
remove :sync_on?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user