Skip to content

[error] Could not retrieve migrated versions. #50

@rschooley

Description

@rschooley

First, thanks for this driver/lib, it's great to get mensia with ecto.

For this issue, sometimes I run my test suite and I get this error. If I just keep rerunning my test suite it will eventually run without the error, not sure what the problem is.

[error] Could not retrieve migrated versions. 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

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 :foo, Foo.Repo,
      migration_source: "some_other_table_for_schema_migrations"

The full error report is shown below.

** (RuntimeError) Schema :schema_migrations does not exist
    lib/ecto_mnesia/table.ex:165: EctoMnesia.Table.transaction/2
    lib/ecto_mnesia/planner.ex:62: EctoMnesia.Planner.execute/6
    (ecto) lib/ecto/repo/queryable.ex:130: Ecto.Repo.Queryable.execute/5
    (ecto) lib/ecto/repo/queryable.ex:35: Ecto.Repo.Queryable.all/4
    (ecto) lib/ecto/migrator.ex:284: Ecto.Migrator.verbose_schema_migration/3
    (ecto) lib/ecto/migrator.ex:155: Ecto.Migrator.run/4
    (ecto) lib/mix/tasks/ecto.migrate.ex:84: anonymous fn/4 in Mix.Tasks.Ecto.Migrate.run/2
    (elixir) lib/enum.ex:675: Enum."-each/2-lists^foreach/1-0-"/2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions