From 2a4b9be5c67496e3d2d67a00ee1a6407a0f33356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20W=C3=B6ginger?= Date: Sun, 22 Dec 2024 13:12:16 +0100 Subject: [PATCH] remove _type attribute from nodes again we now are using node containers for these purposes. the attribute is not used anymore --- lib/radiator/outline/node.ex | 4 ---- .../migrations/20241222120855_remove_type_from_nodes.exs | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 priv/repo/migrations/20241222120855_remove_type_from_nodes.exs diff --git a/lib/radiator/outline/node.ex b/lib/radiator/outline/node.ex index 2f7e64d6..6311b364 100644 --- a/lib/radiator/outline/node.ex +++ b/lib/radiator/outline/node.ex @@ -17,9 +17,6 @@ defmodule Radiator.Outline.Node do field :content, :string field :creator_id, :integer - field :_type, Ecto.Enum, - values: [:node, :global_root, :global_inbox, :episode_inbox, :episode_root] - field :level, :integer, virtual: true belongs_to :outline_node_container, NodeContainer @@ -48,7 +45,6 @@ defmodule Radiator.Outline.Node do :parent_id, :prev_id, :show_id, - :_type, :outline_node_container_id ]) |> put_uuid() diff --git a/priv/repo/migrations/20241222120855_remove_type_from_nodes.exs b/priv/repo/migrations/20241222120855_remove_type_from_nodes.exs new file mode 100644 index 00000000..fa6951ed --- /dev/null +++ b/priv/repo/migrations/20241222120855_remove_type_from_nodes.exs @@ -0,0 +1,9 @@ +defmodule Radiator.Repo.Migrations.RemoveTypeFromNodes do + use Ecto.Migration + + def change do + alter table(:outline_nodes) do + remove :_type, :string, default: "node" + end + end +end