PHPackages                             scriptburn/db-version-update - 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. scriptburn/db-version-update

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

scriptburn/db-version-update
============================

Package to update db structure acording to a target package version

1.0.1(8y ago)08071BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jul 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/scriptburn/db-version-update)[ Packagist](https://packagist.org/packages/scriptburn/db-version-update)[ RSS](/packages/scriptburn-db-version-update/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

Package to update db structure acording to a target package version
-------------------------------------------------------------------

[](#package-to-update-db-structure-acording-to-a-target-package-version)

---

\##Usage:

Create a child class like this (A sample child class has been provided as **sampleDbUpdateService.php**): `class DbUpdateService extends \Scriptburn\UpdateDb{`

`// will be called for target db version 1public function update_routine_1(){    /* make sure to return true    other wise db update will stop propogating    and update process will run again     */    return true;}// will be called for target db version 2public function update_routine_2(){    /* make sure to return true    other wise db update will stop propogating    and update process will run again     */    return true;}``}`

Next we will Call the actual function that checks if db update is needed. Best place for this code will be in a middleware `// make sure composer.json has a key named dbversion in it$optionalVersionData=['type' => 'composer', 'path' => "/path/to/composer.json"];`

`$dbUpdateCheck = new App\Services\DbUpdateService(< instance of \ScriptBurn\Settings >, < instance of pdo connection >, $optionalVersionData);`

`//If you passed $optionalVersionData as 3rd parameter to `App\Services\DbUpdateService` constructor you do not need to pass current db version to method  maybeUpdate as second parameter  $dbUpdateCheck->maybeUpdate('scriptburn/git-auto-deploy',< optional current db version no >');`

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~158 days

Total

2

Last Release

3071d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fea3da4ebf147031886ce207914b6a15bd52d428c36de4d5e841a26deb0d9bf?d=identicon)[codexian](/maintainers/codexian)

---

Top Contributors

[![scriptburn](https://avatars.githubusercontent.com/u/20643070?v=4)](https://github.com/scriptburn "scriptburn (2 commits)")

---

Tags

dbversion

### Embed Badge

![Health badge](/badges/scriptburn-db-version-update/health.svg)

```
[![Health](https://phpackages.com/badges/scriptburn-db-version-update/health.svg)](https://phpackages.com/packages/scriptburn-db-version-update)
```

###  Alternatives

[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.5k46.2M405](/packages/robmorgan-phinx)[spatie/laravel-translation-loader

Store your language lines in the database, yaml or other sources

8362.9M51](/packages/spatie-laravel-translation-loader)[mpociot/versionable

Allows to create Laravel 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 Model versioning and restoring

7841.1M6](/packages/mpociot-versionable)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[laminas/laminas-db

Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations

13922.5M206](/packages/laminas-laminas-db)[envms/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

925511.7k13](/packages/envms-fluentpdo)

PHPackages © 2026

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