Behaviour for schema migration modules loaded from priv/migrations.
Schema files are optional Elixir modules that return CQL statements from
change/0. They are useful for generated or hand-written schema changes that
should run before AshScylla's resource-driven migrations.
Example
defmodule MyApp.Migrations.AddUserTable do
use AshScylla.Schema
def change do
[
"CREATE TABLE IF NOT EXISTS users (id UUID PRIMARY KEY, name TEXT)"
]
end
end
Summary
Types
@type cql() :: String.t()
Callbacks
@callback change() :: [cql()]