COPY mix.exs mix.lock ./
This file contains hidden or 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
| iex> Repo | |
| MyApp.Repo | |
| iex> example_variable | |
| ["a", "b", "c"] |
This file contains hidden or 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
| example_variable = ["a", "b", "c"] |
This file contains hidden or 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
| Error while evaluating: /opt/app/myapp/.iex.exs | |
| ** (TokenMissingError) .iex.exs:64: missing terminator: ] (for "[" starting at line 1) |
COPY .iex.exs mix.exs mix.lock ./
This file contains hidden or 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
| iex> Repo | |
| MyApp.Repo |
This file contains hidden or 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
| - ./.iex.exs:/opt/app/my_app/.iex.exs |
This file contains hidden or 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
| ["path", "to", "file"] | |
| |> CSVUtil.data_from_csv() | |
| |> Enum.each(fn attrs -> | |
| %Product{} | |
| |> Product.changeset(attrs) | |
| |> Repo.insert!() | |
| end) |
This file contains hidden or 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
| ** (Ecto.InvalidChangesetError) could not perform insert because changeset is invalid. | |
| Errors | |
| %{ | |
| vendor_id: [{"can't be blank", [validation: :required]}] | |
| } | |
| Applied changes | |
| %{ | |
| expense_account_number: 500000, | |
| income_account_number: 400000, | |
| name: "Discount" |
This file contains hidden or 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
| head -n 4 ~/downloads/data_dump.csv | xxd |