PHPackages                             regur/lmvc-database-migration - 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. [Framework](/categories/framework)
4. /
5. regur/lmvc-database-migration

ActiveComposer-plugin[Framework](/categories/framework)

regur/lmvc-database-migration
=============================

A lightweight database migration system for LMVC-based PHP applications.

v1.0.0(2mo ago)059MITPHPPHP &gt;=7.4

Since Dec 24Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/ravimajithiya786/lmvc-database-migration)[ Packagist](https://packagist.org/packages/regur/lmvc-database-migration)[ Docs](https://github.com/regur/lmvc-database-migration)[ RSS](/packages/regur-lmvc-database-migration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

 [![Regur Technology Solutions](https://camo.githubusercontent.com/a96cbc38a39cc580751c32aad6364b1d386fdf23e70cc03fdcc331baeaef54e9/68747470733a2f2f7777772e72656775722e6e65742f5f6e6578742f7374617469632f6d656469612f6c6f676f2e38376362653431652e737667)](https://camo.githubusercontent.com/a96cbc38a39cc580751c32aad6364b1d386fdf23e70cc03fdcc331baeaef54e9/68747470733a2f2f7777772e72656775722e6e65742f5f6e6578742f7374617469632f6d656469612f6c6f676f2e38376362653431652e737667)

Regur Technology Solutions - LMVC DB Migration Library
======================================================

[](#regur-technology-solutions---lmvc-db-migration-library)

A simple database migration package for PHP applications, inspired by Laravel's Artisan.

---

📌 Features
----------

[](#-features)

- Create and manage database migrations
- CLI command similar to Laravel Artisan
- Auto-generates migration files
- Supports custom database schemas

---

🚀 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require regur/lmvc-database-migration
```

After installation, the CLI command will be available at:

```
php lmvcdb
```

Important - the .env file is also needed for database credentials

below of lmvcdb file (same like atrisan file)

```
load();

$dbcred = [
    'host' => $_ENV['DB_HOST'],
    'driver'=> $_ENV['DB_DRIVER'],
    'database' => $_ENV['DB_NAME'],
    'username' => $_ENV['DB_UNAME'],
    'password' => $_ENV['DB_PWD'],
    'port' => $_ENV['DB_PORT']
];

Bootstrap::init($dbcred);

?>
```

Now you can run:

```
php lmvcdb migrate
```

---

🛠 Usage
-------

[](#-usage)

### Create a New Migration

[](#create-a-new-migration)

```
php lmvcdb make:migration create_users_table
```

This will generate a migration file inside `database/migrations`.

### Run Migrations

[](#run-migrations)

```
php lmvcdb migrate
```

Applies all pending migrations.

### Fresh Migrations (Reset &amp; Run All)

[](#fresh-migrations-reset--run-all)

```
php lmvcdb migrate:fresh
```

Drops all tables and runs migrations from scratch.

### Apply Pending Migrations

[](#apply-pending-migrations)

```
php lmvcdb migrate:up
```

Runs the next batch of pending migrations.

### Rollback the Last Migration Batch

[](#rollback-the-last-migration-batch)

```
php lmvcdb migrate:down
```

Rolls back the last executed migration batch.

### Refresh Migrations (Rollback &amp; Reapply)

[](#refresh-migrations-rollback--reapply)

```
php lmvcdb migrate:refresh
```

Rolls back all migrations and runs them again.

---

### Make Seeder

[](#make-seeder)

```
php lmvcdb make:seeder UsersSeeder
```

It will create new seeder

### Run all seeders

[](#run-all-seeders)

```
php lmvcdb seed
```

It will run all seeders at once

### Run specific seeder

[](#run-specific-seeder)

```
php lmvcdb seed --class=UsersSeeder
```

It will run specific seeder

---

📂 Project Structure
-------------------

[](#-project-structure)

```
lmvc-database-migration/
│── src/
│   ├── Database/
│   │   ├── Core/                                # Core migration classes
│   │   │   ├── Migration.php
│   │   │   ├── Schema.php
│   │   │   ├── Blueprint.php
│   │   │   ├── DB.php
│   │   ├── Libs/                                # Relevent custom libraries
│   │   │   ├── Dotenv.php
│   ├── Composer/
│   │   ├── Installer.php                        # This will create a file lmvc at root of your project
│   ├── Cli/                                     # This contains commands registered in symfony CLI
│   │   ├── InstallCommand.php                   # php vendor/cli/lmvcdb install
│   │   ├── MakeMigrationCommand.php             # php lmvcdb make:migration
│   │   ├── MakeRawMigrationCommand.php          # php lmvcdb make:raw-migration
│   │   ├── MigrateCommand.php                   # php lmvcdb migrate
│   │   ├── MakeSeederCommand.php                # php lmvcdb make:seeder
│   │   ├── SeedCommand.php                      # php lmvcdb seed
│   ├── Bootstrap.php                            # Main bootstrap file
│── bin/
│   ├── lmvcdb                                   # CLI command file
│── composer.json                                # Composer JSON file (for versioning and maintaining relevent packages)
│── README.md

```

---

🔧 Configuration
---------------

[](#-configuration)

Configure the database connection in `lmvcdb`:

```
Regur\LMVC\Framework\Database\Bootstrap::init([
    'host' => $_ENV['DB_HOST'],
    'driver'=> $_ENV['DB_DRIVER'],
    'database' => $_ENV['DB_NAME'],
    'username' => $_ENV['DB_UNAME'],
    'password' => $_ENV['DB_PWD'],
    'port' => $_ENV['DB_PORT']
]);
```

For docker you need to run commands under docker container

```
docker exec -it pinlocal "your desired command"
```

---

📜 License
---------

[](#-license)

This package is open-source and available under the MIT License.

💡 **Need help?** Feel free to create an issue or contribute!

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance84

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

82d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd8e19fde1b9712eb87aa90417621f323fd62d96947e06235f513d1dcb03ebbe?d=identicon)[ravimajithiya786](/maintainers/ravimajithiya786)

---

Top Contributors

[![ravimajithiya786](https://avatars.githubusercontent.com/u/196941135?v=4)](https://github.com/ravimajithiya786 "ravimajithiya786 (81 commits)")

---

Tags

phpcliframeworkmigrationdatabaselibrarylmvc

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/regur-lmvc-database-migration/health.svg)

```
[![Health](https://phpackages.com/badges/regur-lmvc-database-migration/health.svg)](https://phpackages.com/packages/regur-lmvc-database-migration)
```

###  Alternatives

[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

883.9k3](/packages/digitalstars-simplevk)

PHPackages © 2026

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