Schemify database manager for PostgreSQL — dynamic multi-schema "layer" connections with per-layer migrate / seed / wipe via a --layer option.
dskripchenko/laravel-schemify is a Laravel package for schemify database manager for postgresql — dynamic multi-schema "layer" connections with per-layer migrate / seed / wipe via a --layer option..
It currently has 0 GitHub stars and 342 downloads on Packagist (latest version v3.4.2).
Install it with composer require dskripchenko/laravel-schemify.
Discover more Laravel packages by dskripchenko
or browse all Laravel packages to compare alternatives.
Last updated
Dynamic multi-schema PostgreSQL connections for Laravel. Schemify models
each PostgreSQL schema as a layer (a layer_items row pointing at a
db_connections row) and adds a --layer option to Laravel's migrate,
db:seed and db:wipe commands so you can run them against any layer's schema
on the fly. Layers can live in the same database (different schemas) or in
entirely different databases.
Schemify is a lightweight schema/connection switcher wired into the migration commands — not a full tenancy framework. If you need automatic tenant identification, cache/queue/filesystem isolation or single-DB row scoping, reach for stancl/tenancy or spatie/laravel-multitenancy.
| | Versions | |---|---| | PHP | 8.2 · 8.3 · 8.4 · 8.5 | | Laravel | 11 · 12 · 13 | | Database | PostgreSQL |
composer require dskripchenko/laravel-schemify
php artisan layers:install
The provider is auto-discovered. layers:install publishes the config and core
migration, creates the db_connections / layer_items tables on the central
connection, and registers the default main layer.
php artisan layers:new acme --schema=acme --migrate # create a layer + schema, run tenant migrations
php artisan migrate --layer=acme # migrate a single layer
php artisan layers:list # list layers
use Dskripchenko\Schemify\Facades\Schemify;
$total = Schemify::use('acme', fn () => Invoice::sum('amount'));
Upgrading from 2.x? See UPGRADE.md and the CHANGELOG.
MIT © Denis Skripchenko