Carbonite.Migrations (Carbonite v0.1.0) View Source

Functions to setup Carbonite transaction logs in your migrations.

Link to this section Summary

Functions

Alters a triggers configuration for a given table.

Removes a Carbonite transaction log from the database.

Removes a change capture trigger from a table.

Installs a Carbonite transaction log.

Installs a change capture trigger on a table.

Link to this section Types

Specs

carbonite_option() :: {:prefix, String.t()}

Specs

table_name() :: String.t()
Link to this type

trigger_config_option()

View Source

Specs

trigger_config_option() :: {:excluded_columns, [String.t()]}

Specs

trigger_option() ::
  {:table_prefix, String.t()} | {:carbonite_prefix, String.t()}

Link to this section Functions

Link to this function

configure_trigger(table_name, opts \\ [])

View Source

Specs

configure_trigger(table_name(), [trigger_option() | trigger_config_option()]) ::
  :ok

Alters a triggers configuration for a given table.

Options

  • table_prefix is the name of the schema the table lives in
  • carbonite_prefix is the schema of the transaction log, defaults to "carbonite_default"
  • excluded_columns is a list of columns to exclude from change captures

Specs

drop_schema([carbonite_option()]) :: :ok

Removes a Carbonite transaction log from the database.

Options

  • prefix defines the transaction log's schema, defaults to "carbonite_default"
Link to this function

drop_trigger(table_name, opts \\ [])

View Source

Specs

drop_trigger(table_name(), [trigger_option()]) :: :ok

Removes a change capture trigger from a table.

Options

  • table_prefix is the name of the schema the table lives in
  • carbonite_prefix is the schema of the transaction log, defaults to "carbonite_default"
Link to this function

install_schema(opts \\ [])

View Source

Specs

install_schema([carbonite_option()]) :: :ok

Installs a Carbonite transaction log.

Options

  • prefix defines the transaction log's schema, defaults to "carbonite_default"
Link to this function

install_trigger(table_name, opts \\ [])

View Source

Specs

install_trigger(table_name(), [trigger_option() | trigger_config_option()]) ::
  :ok

Installs a change capture trigger on a table.

Options

  • table_prefix is the name of the schema the table lives in
  • carbonite_prefix is the schema of the transaction log, defaults to "carbonite_default"
  • excluded_columns is a list of columns to exclude from change captures