Sync 0.2.0: Ready for PhoenixKit 2.0 and custom database schemas
Sync 0.2.0 moves the data sync module to PhoenixKit 2.0. On a site installed with a schema prefix, its connections and transfer history now live in the same Postgres schema as the rest of PhoenixKit.
Tables in PhoenixKit’s schema
PhoenixKit can be installed into its own Postgres schema with config :phoenix_kit, prefix: "myschema", which keeps its tables apart from the app’s own. Sync’s two tables, phoenix_kit_sync_connections and phoenix_kit_sync_transfers, now follow that setting: every query on connections and transfers goes to the configured schema, so the database role’s search_path no longer has to point at it. Without a prefix, the default public install, nothing changes.
The prefix is read when the app compiles, so it belongs in config/config.exs, not in runtime.exs.
Smaller changes
The Enable Auto Sync checkbox in the connection form now uses PhoenixKit’s shared checkbox component. Automatic syncing itself is not part of this version: the setting is stored, and nothing acts on it yet.
The module now reports its own version as 0.2.0. Every 0.1.x release reported 0.1.0.
Upgrading
Change the dependency to {:phoenix_kit_sync, "~> 0.2"}. It needs PhoenixKit 2.0 or later, below 3.0, so move core to 2.0 first and run mix phoenix_kit.update. The sync tables still come from core’s migrations; the module has no migration of its own in this release. On a site with a schema prefix, make sure the sync tables are in that schema: the module now looks for them there, not wherever the role’s search path leads. A site without a prefix needs nothing else.
Sync 0.2.0. Install or update: {:phoenix_kit_sync, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.