Skip to content

Commit

Permalink
small doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
maltoe committed Dec 1, 2024
1 parent 6a447a2 commit de3bf5e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/carbonite/migrations.ex
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ defmodule Carbonite.Migrations do
:ok
end

# ------------------------------ data migration s---------------------------------
# ------------------------------ data migrations ---------------------------------

@type insert_migration_transaction_option :: {:carbonite_prefix, prefix()} | {:meta, map()}

Expand All @@ -333,7 +333,7 @@ defmodule Carbonite.Migrations do
import Carbonite.Migrations
def change do
insert_migration_transaction()
insert_migration_transaction("some-data-migration")
execute("UPDATE ...", "...")
end
Expand All @@ -347,13 +347,13 @@ defmodule Carbonite.Migrations do
import Carbonite.Migrations
def up do
insert_migration_transaction("some-data-migrated")
insert_migration_transaction("some-data-migration")
execute("INSERT ...")
end
def down do
insert_migration_transaction("some-data-rolled-back")
insert_migration_transaction("some-data-migration")
execute("DELETE ...")
end
Expand Down Expand Up @@ -394,7 +394,7 @@ defmodule Carbonite.Migrations do
This determines the `name` of the transaction from the migration's module name.
{"direction": "up","name": "my_app/repo/migrations/example", "type": "migration"}
{"direction": "up", "name": "my_app/repo/migrations/example", "type": "migration"}
## Example
Expand All @@ -411,7 +411,7 @@ defmodule Carbonite.Migrations do
Alternatively, if you define your own migration template module:
defmodule MyApp.Migration do
defmodule MyApp.DataMigration do
defmacro __using__ do
quote do
use Ecto.Migration
Expand Down

0 comments on commit de3bf5e

Please sign in to comment.