Skip to content

Commit

Permalink
Remove note about multi-tenancy from README
Browse files Browse the repository at this point in the history
  • Loading branch information
arturz committed Feb 25, 2025
1 parent 4e49c9a commit 77e4d33
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,32 +148,26 @@ defmodule MyApp.Repo.Migrations.AddKantaTranslationsTable do
Kanta.Migration.up(version: 4)
end

# We specify `version: 1` because we want to rollback all the way down.
# We specify `version: 1` because we want to rollback all the way down including the first migration.
def down do
Kanta.Migration.down(version: 1)
end
end
```

If you are using multitenancy with i.e. [triplex](https://github.com/ateliware/triplex), you can pass the schema prefix to the migration.

```elixir
Kanta.Migration.up(version: ..., prefix: prefix())
```

### SQLite3

```elixir
defmodule MyApp.Repo.Migrations.AddKantaTranslationsTable do
use Ecto.Migration

def up do
Kanta.Migration.up(version: 3, prefix: prefix()) # Prefix is needed if you are using multitenancy with i.e. triplex
Kanta.Migration.up(version: 3)
end

# We specify `version: 1` because we want to rollback all the way down.
# We specify `version: 1` because we want to rollback all the way down including the first migration.
def down do
Kanta.Migration.down(version: 1, prefix: prefix()) # Prefix is needed if you are using multitenancy with i.e. triplex
Kanta.Migration.down(version: 1)
end
end
```
Expand Down

0 comments on commit 77e4d33

Please sign in to comment.