mjaric / ecto_sql Goto Github PK
View Code? Open in Web Editor NEWThis project forked from elixir-ecto/ecto_sql
SQL-based adapters for Ecto and database migrations
License: Apache License 2.0
This project forked from elixir-ecto/ecto_sql
SQL-based adapters for Ecto and database migrations
License: Apache License 2.0
Erlang/OTP 21 [erts-10.2] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]
Elixir 1.9.4 (compiled with Erlang/OTP 20)
Database and version (PostgreSQL 9.4, MongoDB 3.2, etc.):
SQL Server 12.0.6024
Ecto version (mix deps):
ecto 3.3.2 (Hex package) (mix)
locked at 3.3.2 (ecto) 002aa428
* tds 2.1.0 (https://github.com/livehelpnow/tds) (mix)
locked at 90bb001 (branch: master)
ok
* ecto_sql 3.3.2 (https://github.com/mjaric/ecto_sql) (mix)
locked at 035017b (branch: tds-support)
ok
Windows 10
When I'm starting from a fresh database (the database has been created, but no tables exist) and run mix ecto.reset
I get the following error. The strange thing, is that the "schema_migrations" table does get created, but nothing else happens.
15:42:11.353 [error] Could not create schema migrations table. This error usually happens due to the following:
* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
migrations, was defined by another library
* There is a deadlock while migrating (such as using concurrent
indexes with a migration_lock)
To fix the first issue, run "mix ecto.create".
To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table for managing migrations:
config :rti, Rti.Repo,
migration_source: "some_other_table_for_schema_migrations"
The full error report is shown below.
** (Tds.Error) Line 1 (Error 2714): There is already an object named 'schema_migrations' in the database.
(ecto_sql) lib/ecto/adapters/sql.ex:629: Ecto.Adapters.SQL.raise_sql_call_error/1
(elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
(ecto_sql) lib/ecto/adapters/sql.ex:719: Ecto.Adapters.SQL.execute_ddl/4
(ecto_sql) lib/ecto/migrator.ex:635: Ecto.Migrator.verbose_schema_migration/3
(ecto_sql) lib/ecto/migrator.ex:479: Ecto.Migrator.lock_for_migrations/4
(ecto_sql) lib/ecto/migrator.ex:613: anonymous fn/5 in Ecto.Migrator.migrate/4
(elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
(ecto_sql) lib/ecto/migrator.ex:612: Ecto.Migrator.migrate/4
(ecto_sql) lib/ecto/migrator.ex:149: Ecto.Migrator.with_repo/3
(ecto_sql) lib/mix/tasks/ecto.migrate.ex:117: anonymous fn/5 in Mix.Tasks.Ecto.Migrate.run/2
(elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
(ecto_sql) lib/mix/tasks/ecto.migrate.ex:105: Mix.Tasks.Ecto.Migrate.run/2
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
(mix) lib/mix/task.ex:365: Mix.Task.run_alias/3
(mix) lib/mix/task.ex:292: Mix.Task.run/2
(mix) lib/mix/task.ex:365: Mix.Task.run_alias/3
(mix) lib/mix/task.ex:292: Mix.Task.run/2
(mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2
After the migrations table was created, I exected the migrations that are defined to get executed.
I'm migrating from using mssqlex/mssql_ecto where the migrations worked. I'm not sure if that's helpful information or not, but I thought I'd mention it just in case.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.