Skip to content

Commit

Permalink
remove warning from rollback in adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasdarruda committed Oct 30, 2022
1 parent fd208ac commit c978657
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
- name: Run tests spawn_statestores
run: |
cd spawn_statestores/statestores
cd spawn_statestores/statestores_mysql
mix deps.get
MIX_ENV=test PROXY_DATABASE_TYPE=mysql PROXY_CLUSTER_STRATEGY=epmd PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test
MIX_ENV=test PROXY_CLUSTER_STRATEGY=epmd PROXY_HTTP_PORT=9005 SPAWN_STATESTORE_KEY=3Jnb0hZiHIzHTOih7t2cTEPEpY98Tu1wvQkPfq/XwqE= elixir --name [email protected] -S mix test
cd ../../
- name: Run tests proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule Statestores.Adapters.Behaviour do

@callback migrate :: {:ok, any(), any()}

@callback rollback(term()) :: {:ok, any(), any()}
@callback rollback_migration(term()) :: {:ok, any(), any()}

defmacro __using__(_opts) do
quote do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ defmodule Statestores.Migrator do
def rollback(adapter, version) do
load_app()

adapter.rollback(version)
adapter.rollback_migration(version)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ defmodule Statestores.Adapters.CockroachDB do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :up, all: true))
end

def rollback(version) do
def rollback_migration(version) do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :down, to: version))
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ defmodule Statestores.Adapters.MSSQL do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :up, all: true))
end

def rollback(version) do
def rollback_migration(version) do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :down, to: version))
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule Statestores.Adapters.MySQL do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :up, all: true))
end

def rollback(version) do
def rollback_migration(version) do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :down, to: version))
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ defmodule Statestores.Adapters.Postgres do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :up, all: true))
end

def rollback(version) do
def rollback_migration(version) do
{:ok, _, _} = Ecto.Migrator.with_repo(__MODULE__, &Ecto.Migrator.run(&1, :down, to: version))
end
end

0 comments on commit c978657

Please sign in to comment.