We’re on the Brink of Cryptopunk Help To Test Your Library

DynamoMigration has been released. -Version management tool for DynamoDB migrations.-

DynamoMigration is simple version management tool for dynamo_db migration files.

Links

Usage

  1. Create migrations table.

    $ mix dynamo.setup
  2. Generate and rewrite migration file.

    $ mix dynamo.gen.migration create_tests_table
    # priv/dynamo/migrations/20220130083004_create_tests_table.exs
    defmodule Dynamo.Migrations.CreateTestsTable do
      def change do
        # Rewrite any migration code.
        # Examples.
        ExAws.Dynamo.create_table(
          "Tests",
          [id: :hash],
          %{id: :number},
          1,
          1,
          :provisioned
        )
        |> ExAws.request!()
      end
    end
  3. Migrate.

    # Executes `priv/dynamo/migrations/*` if there had not migrated.
    $ mix dynamo.migrate