GitPedia
ateliware

ateliware/triplex

Database multitenancy for Elixir applications!

5 Releases
Latest: 7y ago
1.3.0v1.3.0Latest
kelvinstkelvinstยท7y agoยทMay 31, 2019
GitHub

๐Ÿ› Bug fixes

  • Fixed compilation error when optional adapters are not included in downstream project.

๐Ÿ“‹ Changed

  • docker-compose configuration that allows easy setup for test databases.
  • `Triplex.create/1,2` now rolls back the prefix creation if the `func` fails with error tuple
  • Now we support to Ecto 3! :tada: But be aware that this new version does not support
  • the old versions of Ecto, only 3.0 and up

๐Ÿ’ฅ Breaking changes

  • It's not our fault, but there is a breaking change if you upgrade it because migration on
  • Ecto 3 are ran on a different process.
  • The problem you may find is basically with this kind of code:
  • ```elixir
  • Repo.transaction(fn ->
  • {:ok, _} = Triplex.create("tenant")
  • User.insert!(%{name: "Demo user 1"})
  • User.insert!(%{name: "Demo user 2"})
  • + 21 more
v1.3.0-rc.1Pre-release
mgiacominimgiacominiยท7y agoยทMarch 7, 2019
GitHub

๐Ÿ› Bug fixes

  • Fixed compilation error when optional adapters are not included in downstream project.

๐Ÿ“‹ Changed

  • docker-compose configuration that allows easy setup for test databases.
1.3.0-rc.0v1.3.0-rc.0Pre-release
kelvinstkelvinstยท7y agoยทMarch 3, 2019
GitHub

โœจ Added

  • Support to MySQL :dolphin:

๐Ÿ“‹ Changed

  • `Triplex.create/1,2` now rolls back the prefix creation if the `func` fails with error tuple
  • Now we support to Ecto 3! :tada: But be aware that this new version does not support
  • the old versions of Ecto, only 3.0 and up

๐Ÿ’ฅ Breaking changes

  • It's not our fault, but there is a breaking change if you upgrade it because migration on
  • Ecto 3 are ran on a different process.
  • The problem you may find is basically with this kind of code:
  • ```elixir
  • Repo.transaction(fn ->
  • {:ok, _} = Triplex.create("tenant")
  • User.insert!(%{name: "Demo user 1"})
  • User.insert!(%{name: "Demo user 2"})
  • + 21 more
1.2.0
kelvinstkelvinstยท8y agoยทDecember 19, 2017
GitHub

This is the official release of the candidate 1.2.0-rc.0 For more details check the [release canditate](https://github.com/ateliware/triplex/releases/tag/v1.2.0-rc.0).

1.2.0-rc.0v1.2.0-rc.0Pre-release
kelvinstkelvinstยท8y agoยทNovember 24, 2017
GitHub

๐Ÿ“‹ Changelog

  • In short, this release has this three main changes:
  • Plug as an optional dependency, so if you don't use any plug on your app, triplex will not add this dependency on your project.
  • The support for using triplex on OTP releases, which I really didn't know we had a problem with, but now, thanks to @dustinfarris, we do not have it anymore! PS: if anyone does need this correction on a `1.1` patch release, please let me know.
  • Docs and README improved.
  • Refactors on plug configs and method return values.
  • The PR's in this release are:
  • Defining a return for all the commands on `Triplex` (#42) @kelvinst
  • Refactoring plug configuration (#43) @kelvinst
  • + 5 more

๐Ÿ’ฅ Breaking changes

  • For those who wonder, there were not big changes, but here is the list of what can break on your code.

๐Ÿ“‹ 1. Some method return values changed on PR #42

  • If you use any of the second element of the return on the following methods, be sure to check if they still work:
  • [`Triplex.create_schema/3`](https://hexdocs.pm/triplex/1.2.0-rc.0/Triplex.html#create_schema/3) - this method was returning either the given `func` result (the 3rd param), which could be pretty much anything, or the result of a [`Ecto.Adapters.SQL.query/4`](https://hexdocs.pm/ecto/Ecto.Adapters.SQL.html#query/4) call, which also can change depending on ecto's version. Now it returns `{:ok, tenant}`, where `tenant` is the name of the tenant.
  • If you need your `func` result, you can change your code as follows:
  • ```elixir
  • case Triplex.create_schema("test", Repo, your_func) do
  • {:ok, func_return} -> func_return
  • {:error, reason} -> raise reason
  • end
  • + 21 more

โ™ป๏ธ 2. Refactored `Triplex.PlugConfig` on #43

  • This was a restructuring on the plugs configuration, which was only one configuration for all the plugs and now we changed to specific configs for each plug type.
  • This only affects you if you were using the module `Triplex.PlugConfig` (which was completely removed) explicitly, otherwise you should be ok!