View Source Polyn.Migration.Migrator (Polyn v0.6.5)
Manages the creation and updating of streams and consumers that an application owns
Link to this section Summary
Types
Tuple of {command_name, command_options}
:direction
- Which direction to migrate:migrations_function
- The function to run inside the migration module (e.g.change
,up
,down
):migrations_dir
- Location of migration files:running_migration_id
- The timestamp/id of the migration file being run. Taken from the beginning of the file name:migration_bucket_info
- The Stream info for the migration KV bucket:runner
- Process for keeping commands to run:migration_files
- The file names of migration files:migration_modules
- A list of tuples with the migration id and module code:already_run_migrations
- Migrations we've determined have already been executed on the server:commands
- map of migration_id and commands to run
Link to this section Types
Tuple of {command_name, command_options}
@type t() :: %Polyn.Migration.Migrator{ already_run_migrations: [binary()], commands: %{required(binary()) => [command()]}, direction: :up | :down, migration_bucket_info: Jetstream.API.Stream.info() | nil, migration_files: [binary()], migration_function: :change | :up | :down, migration_modules: [{integer(), module()}], migrations_dir: binary(), runner: pid() | nil, running_migration_id: non_neg_integer() | nil }
:direction
- Which direction to migrate:migrations_function
- The function to run inside the migration module (e.g.change
,up
,down
):migrations_dir
- Location of migration files:running_migration_id
- The timestamp/id of the migration file being run. Taken from the beginning of the file name:migration_bucket_info
- The Stream info for the migration KV bucket:runner
- Process for keeping commands to run:migration_files
- The file names of migration files:migration_modules
- A list of tuples with the migration id and module code:already_run_migrations
- Migrations we've determined have already been executed on the server:commands
- map of migration_id and commands to run