PHPackages                             simbiat/db-installer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. simbiat/db-installer

ActiveLibrary[Database &amp; ORM](/categories/database)

simbiat/db-installer
====================

Install database dependencies for a library based on the current version.

001PHP

Since Aug 10Pushed 9mo agoCompare

[ Source](https://github.com/Simbiat/db-installer)[ Packagist](https://packagist.org/packages/simbiat/db-installer)[ RSS](/packages/simbiat-db-installer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

DB Installer
============

[](#db-installer)

Small library to install or update database dependencies of a library, based on its current version.

```
new \Simbiat\Database\Installer($dbh)::install(string $pattern, string $version = '0.0.0', string $replace_string = '', string $replace_with = '')
```

The constructor of the `Installer` class requires a `\PDO` object to establish connection, or it can be or `null` if you are using [DB Pool](https://github.com/Simbiat/db-pool) library.

Then pass a pattern for `glob()` to get the files with SQL commands you need to run and current `version` string. The function will scan the respective folder(s) for files and then compare their names to the version provided. Those files that have a "greater" version number (based on `version_compare()`) will be concatenated and then run against the database. If the commands succeed, the function will return `true`, otherwise an exception will be thrown.

You can also pass `$replace_string` and `$replace_with` that will `preg_replace()` in the resulting set of queries. This is useful if you need to customize a database prefix, for example.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance41

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6022665?v=4)[Dmitrii Kustov](/maintainers/Simbiat)[@Simbiat](https://github.com/Simbiat)

### Embed Badge

![Health badge](/badges/simbiat-db-installer/health.svg)

```
[![Health](https://phpackages.com/badges/simbiat-db-installer/health.svg)](https://phpackages.com/packages/simbiat-db-installer)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
