bodhilogic
Mysql errors when using mssql
I’m trying to create an API that interfaces to a MS SQL database. My mix deps.get reports no errors or problems, but when I mix run --no-halt, I get a series of warnings about SQL and migrations (my app is a read-only app for an existing MS SQL database so I have no migrations).
How do I deal with this problem?
==> ecto
Compiling 70 files (.ex)
warning: redefining module Ecto.Adapters.MySQL (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Adapters.MySQL.beam)
lib/ecto/adapters/mysql.ex:1
warning: redefining module Ecto.Adapters.SQL.Stream (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Adapters.SQL.Stream.beam)
lib/ecto/adapters/sql/stream.ex:1
warning: redefining module Ecto.Adapter.Migration (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Adapter.Migration.beam)
lib/ecto/adapter/migration.ex:1
warning: redefining module Ecto.Adapters.SQL.Sandbox (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Adapters.SQL.Sandbox.beam)
lib/ecto/adapters/sql/sandbox.ex:1
warning: redefining module Ecto.Migration.Runner (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Migration.Runner.beam)
lib/ecto/migration/runner.ex:1
warning: redefining module Ecto.Adapters.SQL.Sandbox.Connection (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Adapters.SQL.Sandbox.Connection.beam)
lib/ecto/adapters/sql/sandbox.ex:296
warning: redefining module Ecto.Migration.SchemaMigration (current version loaded from /Users/steve/Sites/ade_umbrella/_build/dev/lib/ecto_sql/ebin/Elixir.Ecto.Migration.SchemaMigration.beam)
lib/ecto/migration/schema_migration.ex:1
== Compilation error in file lib/ecto/adapters/mysql.ex ==
** (FunctionClauseError) no function clause matching in Keyword.fetch!/2
The following arguments were given to Keyword.fetch!/2:
# 1
:mariaex
# 2
:driver
Attempted function clauses (showing 1 out of 1):
def fetch!(keywords, key) when is_list(keywords) and is_atom(key)
(elixir) lib/keyword.ex:390: Keyword.fetch!/2
lib/ecto/adapters/mysql.ex:118: (module)
(stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
Here is my mix deps declaration:
defp deps do
[
{:jason, "~> 1.0"},
{:mssql_ecto, "~> 1.2.0"},
{:mssqlex, "~> 1.1.0"},
{:poison, "~> 3.0"},
{:plug, "~> 1.8"},
{:cowboy, "~> 2.7"},
]
end
First Post!
matreyes
Not sure why it’s calling to MYSQL (not mssql), maybe you should check the Repo configuration for the adapter. It should be
config :my_app, MyApp.Repo,
adapter: MssqlEcto
(it seems to be MySql)
FYI, I had a similar use case (read only) and I’ve avoided using ecto (another dependency), and I just used raw sql queries from mssqlex. It was way simpler for this case. Maybe it’s a good idea also for you?
Popular in Questions
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Is there a way to rollback a specific migration and only that one ("skipping" all the other ones)?
Would
mix ecto.rollback -v 2008090...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Hi all,
I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I'm trying to use Postg...
New
Hi all,
Trying to get some more clarity over utc_datetime and naive_datetime for Ecto:
https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Other popular topics
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition)
It’s been a while since we first asked this, I...
New
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
New
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something…
Haskell reminds me of Java, and e...
New
Hi!
Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New








