-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from podlove/connect-outline-nodes-to-episodes
Connect outline nodes to episodes
- Loading branch information
Showing
12 changed files
with
183 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
priv/repo/migrations/20231216182723_add_outline_reference_to_episode.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defmodule Radiator.Repo.Migrations.AddOutlineReferenceToEpisode do | ||
use Ecto.Migration | ||
|
||
def change do | ||
alter table(:outline_nodes) do | ||
add :episode_id, references(:episodes, on_delete: :nothing) | ||
end | ||
end | ||
end |
9 changes: 9 additions & 0 deletions
9
priv/repo/migrations/20231223124852_add_number_to_episodes.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defmodule Radiator.Repo.Migrations.AddNumberToEpisodes do | ||
use Ecto.Migration | ||
|
||
def change do | ||
alter table(:episodes) do | ||
add :number, :integer | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,6 @@ alias Radiator.{Accounts, Outline, Podcast} | |
{:ok, _user_jim} = | ||
Accounts.register_user(%{email: "[email protected]", password: "supersupersecret"}) | ||
|
||
{:ok, _node} = | ||
Outline.create_node(%{content: "This is my first node"}) | ||
|
||
{:ok, _node} = | ||
Outline.create_node(%{content: "Second node"}) | ||
|
||
{:ok, network} = | ||
Podcast.create_network(%{title: "Podcast network"}) | ||
|
||
|
@@ -28,5 +22,11 @@ alias Radiator.{Accounts, Outline, Podcast} | |
{:ok, _episode} = | ||
Podcast.create_episode(%{title: "past episode", show_id: show.id}) | ||
|
||
{:ok, _episode} = | ||
{:ok, current_episode} = | ||
Podcast.create_episode(%{title: "current episode", show_id: show.id}) | ||
|
||
{:ok, _node} = | ||
Outline.create_node(%{content: "This is my first node", episode_id: current_episode.id}) | ||
|
||
{:ok, _node} = | ||
Outline.create_node(%{content: "Second node", episode_id: current_episode.id}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters