diff --git a/changelog.md b/changelog.md index 4eb42d3..81042ba 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # v0.1.10 - Improve accessibility +- Code quality improvements # v0.1.9 - Improve server log diff --git a/lib/memex/contexts/context.ex b/lib/memex/contexts/context.ex index d4aba9b..69e470e 100644 --- a/lib/memex/contexts/context.ex +++ b/lib/memex/contexts/context.ex @@ -27,7 +27,7 @@ defmodule Memex.Contexts.Context do field :tags_string, :string, virtual: true field :visibility, Ecto.Enum, values: [:public, :private, :unlisted] - belongs_to :user, User + field :user_id, :binary_id timestamps() end @@ -38,7 +38,6 @@ defmodule Memex.Contexts.Context do tags: [String.t()] | nil, tags_string: String.t() | nil, visibility: :public | :private | :unlisted, - user: User.t() | Ecto.Association.NotLoaded.t(), user_id: User.id(), inserted_at: NaiveDateTime.t(), updated_at: NaiveDateTime.t() diff --git a/lib/memex/notes/note.ex b/lib/memex/notes/note.ex index ec3aed7..2c8bb3c 100644 --- a/lib/memex/notes/note.ex +++ b/lib/memex/notes/note.ex @@ -26,7 +26,7 @@ defmodule Memex.Notes.Note do field :tags_string, :string, virtual: true field :visibility, Ecto.Enum, values: [:public, :private, :unlisted] - belongs_to :user, User + field :user_id, :binary_id timestamps() end @@ -37,7 +37,6 @@ defmodule Memex.Notes.Note do tags: [String.t()] | nil, tags_string: String.t() | nil, visibility: :public | :private | :unlisted, - user: User.t() | Ecto.Association.NotLoaded.t(), user_id: User.id(), inserted_at: NaiveDateTime.t(), updated_at: NaiveDateTime.t() diff --git a/lib/memex/pipelines/pipeline.ex b/lib/memex/pipelines/pipeline.ex index 8d5a1af..75b9676 100644 --- a/lib/memex/pipelines/pipeline.ex +++ b/lib/memex/pipelines/pipeline.ex @@ -27,7 +27,7 @@ defmodule Memex.Pipelines.Pipeline do field :tags_string, :string, virtual: true field :visibility, Ecto.Enum, values: [:public, :private, :unlisted] - belongs_to :user, User + field :user_id, :binary_id has_many :steps, Step, preload_order: [asc: :position] @@ -40,7 +40,6 @@ defmodule Memex.Pipelines.Pipeline do tags: [String.t()] | nil, tags_string: String.t() | nil, visibility: :public | :private | :unlisted, - user: User.t() | Ecto.Association.NotLoaded.t(), user_id: User.id(), inserted_at: NaiveDateTime.t(), updated_at: NaiveDateTime.t() diff --git a/lib/memex/pipelines/step.ex b/lib/memex/pipelines/step.ex index 99f2c83..0a58a61 100644 --- a/lib/memex/pipelines/step.ex +++ b/lib/memex/pipelines/step.ex @@ -23,7 +23,7 @@ defmodule Memex.Pipelines.Steps.Step do field :position, :integer belongs_to :pipeline, Pipeline - belongs_to :user, User + field :user_id, :binary_id timestamps() end @@ -34,7 +34,6 @@ defmodule Memex.Pipelines.Steps.Step do position: non_neg_integer(), pipeline: Pipeline.t() | Ecto.Association.NotLoaded.t(), pipeline_id: Pipeline.id(), - user: User.t() | Ecto.Association.NotLoaded.t(), user_id: User.id(), inserted_at: NaiveDateTime.t(), updated_at: NaiveDateTime.t() diff --git a/priv/gettext/de/LC_MESSAGES/errors.po b/priv/gettext/de/LC_MESSAGES/errors.po index e775d41..8405abd 100644 --- a/priv/gettext/de/LC_MESSAGES/errors.po +++ b/priv/gettext/de/LC_MESSAGES/errors.po @@ -73,12 +73,12 @@ msgstr "" msgid "must have the @ sign and no spaces" msgstr "" -#: lib/memex/contexts/context.ex:58 -#: lib/memex/contexts/context.ex:71 -#: lib/memex/notes/note.ex:57 -#: lib/memex/notes/note.ex:70 -#: lib/memex/pipelines/pipeline.ex:60 -#: lib/memex/pipelines/pipeline.ex:73 +#: lib/memex/contexts/context.ex:57 +#: lib/memex/contexts/context.ex:70 +#: lib/memex/notes/note.ex:56 +#: lib/memex/notes/note.ex:69 +#: lib/memex/pipelines/pipeline.ex:59 +#: lib/memex/pipelines/pipeline.ex:72 #, elixir-autogen, elixir-format msgid "invalid format: only numbers, letters and hyphen are accepted" msgstr "" @@ -103,9 +103,9 @@ msgstr "" msgid "unauthorized" msgstr "" -#: lib/memex/contexts/context.ex:84 -#: lib/memex/notes/note.ex:83 -#: lib/memex/pipelines/pipeline.ex:86 +#: lib/memex/contexts/context.ex:83 +#: lib/memex/notes/note.ex:82 +#: lib/memex/pipelines/pipeline.ex:85 #, elixir-autogen, elixir-format, fuzzy msgid "invalid format: only numbers, letters and hyphen are accepted. tags must be comma-delimited" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/errors.po b/priv/gettext/en/LC_MESSAGES/errors.po index 69b2c81..32f5595 100644 --- a/priv/gettext/en/LC_MESSAGES/errors.po +++ b/priv/gettext/en/LC_MESSAGES/errors.po @@ -74,12 +74,12 @@ msgstr "" msgid "must have the @ sign and no spaces" msgstr "" -#: lib/memex/contexts/context.ex:58 -#: lib/memex/contexts/context.ex:71 -#: lib/memex/notes/note.ex:57 -#: lib/memex/notes/note.ex:70 -#: lib/memex/pipelines/pipeline.ex:60 -#: lib/memex/pipelines/pipeline.ex:73 +#: lib/memex/contexts/context.ex:57 +#: lib/memex/contexts/context.ex:70 +#: lib/memex/notes/note.ex:56 +#: lib/memex/notes/note.ex:69 +#: lib/memex/pipelines/pipeline.ex:59 +#: lib/memex/pipelines/pipeline.ex:72 #, elixir-autogen, elixir-format msgid "invalid format: only numbers, letters and hyphen are accepted" msgstr "" @@ -104,9 +104,9 @@ msgstr "" msgid "unauthorized" msgstr "" -#: lib/memex/contexts/context.ex:84 -#: lib/memex/notes/note.ex:83 -#: lib/memex/pipelines/pipeline.ex:86 +#: lib/memex/contexts/context.ex:83 +#: lib/memex/notes/note.ex:82 +#: lib/memex/pipelines/pipeline.ex:85 #, elixir-autogen, elixir-format msgid "invalid format: only numbers, letters and hyphen are accepted. tags must be comma-delimited" msgstr "" diff --git a/priv/gettext/errors.pot b/priv/gettext/errors.pot index 8b4e21d..2f6189d 100644 --- a/priv/gettext/errors.pot +++ b/priv/gettext/errors.pot @@ -73,12 +73,12 @@ msgstr "" msgid "must have the @ sign and no spaces" msgstr "" -#: lib/memex/contexts/context.ex:58 -#: lib/memex/contexts/context.ex:71 -#: lib/memex/notes/note.ex:57 -#: lib/memex/notes/note.ex:70 -#: lib/memex/pipelines/pipeline.ex:60 -#: lib/memex/pipelines/pipeline.ex:73 +#: lib/memex/contexts/context.ex:57 +#: lib/memex/contexts/context.ex:70 +#: lib/memex/notes/note.ex:56 +#: lib/memex/notes/note.ex:69 +#: lib/memex/pipelines/pipeline.ex:59 +#: lib/memex/pipelines/pipeline.ex:72 #, elixir-autogen, elixir-format msgid "invalid format: only numbers, letters and hyphen are accepted" msgstr "" @@ -103,9 +103,9 @@ msgstr "" msgid "unauthorized" msgstr "" -#: lib/memex/contexts/context.ex:84 -#: lib/memex/notes/note.ex:83 -#: lib/memex/pipelines/pipeline.ex:86 +#: lib/memex/contexts/context.ex:83 +#: lib/memex/notes/note.ex:82 +#: lib/memex/pipelines/pipeline.ex:85 #, elixir-autogen, elixir-format msgid "invalid format: only numbers, letters and hyphen are accepted. tags must be comma-delimited" msgstr ""