Browse Source

fix: remove timestamps from join tables, rename note_links to notes_links

main
Inhji Y. 8 months ago
parent
commit
ce32f7889f
  1. 2
      lib/mirage/notes/note_link.ex
  2. 17
      priv/repo/migrations/20210210184450_remove_timestamps_from_join_tables.exs

2
lib/mirage/notes/note_link.ex

@ -2,7 +2,7 @@ defmodule Mirage.Notes.NoteLink do
use Ecto.Schema
import Ecto.Changeset
schema "note_links" do
schema "notes_links" do
field :title, :string
field :url, :string

17
priv/repo/migrations/20210210184450_remove_timestamps_from_join_tables.exs

@ -0,0 +1,17 @@
defmodule Mirage.Repo.Migrations.RemoveTimestampsFromJoinTables do
use Ecto.Migration
def change do
alter table(:notes_topics) do
remove :inserted_at
remove :updated_at
end
alter table(:note_links) do
remove :inserted_at
remove :updated_at
end
rename table(:note_links), to: table(:notes_links)
end
end
Loading…
Cancel
Save