DynamoMigration (DynamoMigration v0.1.0)
Version management module for migration file of DynamoDB. Dependes on ExAws and ExAws.Dynamo. See also https://github.com/ex-aws/ex_aws_dynamo. Usage:
- $ mix dynamo.setup # Creates migrations table.
- $ mix dynamo.gen.migration create_tests_table # Generates migration file.
defmodule Dynamo.Migrations.CreateTestsTable do def change do # Rewrite any migration code. ExAws.Dynamo.create_table( "Tests", [id: :hash], %{id: :number}, 1, 1, :provisioned ) |> ExAws.request!() end end
- $ mix dynamo.migrate # Migrates
priv/dynamo/migrations/*
.
Link to this section Summary
Functions
Called from mix dynamo.migrate
Executes migration files if there had not migrated.
Returns true if migration version does not exists in migrations table.
Creates migrations table for version management.
Called from mix dynamo.setup
Link to this section Functions
Link to this function
migrate()
Specs
migrate() :: :ok
Called from mix dynamo.migrate
Executes migration files if there had not migrated.
Link to this function
migration_file_path()
Specs
migration_file_path() :: String.t()
Link to this function
migration_required?(version)
Specs
Returns true if migration version does not exists in migrations table.
Link to this function
setup()
Specs
setup() :: :ok
Creates migrations table for version management.
Called from mix dynamo.setup