mix ash_scylla.migrate (AshScylla v0.11.0)

Copy Markdown View Source

Runs AshScylla schema migrations for all resources or a specific resource.

This task compares Ash resource definitions against the live ScyllaDB schema and executes the necessary DDL statements to bring the schema in sync.

It also runs schema migration files from priv/migrations that use AshScylla.Schema. These files are executed before resource migrations.

Usage

# Migrate all resources and schema files
mix ash_scylla.migrate

# Migrate a specific resource
mix ash_scylla.migrate --resource MyApp.User

# Dry run (show what would be executed)
mix ash_scylla.migrate --dry-run

# Use a specific repo
mix ash_scylla.migrate --repo MyApp.Repo

# Create keyspace before migrating
mix ash_scylla.migrate --create-keyspace

# Only run schema files from priv/migrations
mix ash_scylla.migrate --schemas-only

Options

  • --repo - The repo module to use (defaults to auto-detected repo)
  • --resource - A specific resource module to migrate
  • --dry-run - Print DDL statements without executing them
  • --create-keyspace - Create the keyspace before running migrations
  • --keyspace - Override the keyspace name
  • --nodes - Override the ScyllaDB nodes (comma-separated)
  • --schemas-only - Only run schema files from priv/migrations