circles-learning-labs / ecto_adapters_dynamodb

DynamoDB adapter for Elixir's Ecto Database layer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace Keyword.get() with Keyword.fetch!() in execute/5, referring to migration source

darrenklein opened this issue · comments

In line 255, we see the use of Keyword.get() to retrieve the name of the migration source table (and provide a default value if it's not in the config) -

migration_source = Keyword.get(repo.config, :migration_source, "schema_migrations")

however, in the init/1 function, we've already guaranteed that the default value will be provided if one hasn't been otherwise, so this logic is redundant. Since we can be sure that a value will have been set, we can use Keyword.fetch!() instead.

The correct fix for this is in 3a909f2