PHPackages                             paulobunga/parkman-schema - 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. paulobunga/parkman-schema

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

paulobunga/parkman-schema
=========================

Generate Laravel model and migrations from Prisma Schema

v0.0.2-alpha(1y ago)12MITPHPPHP ^7.4|^8.0CI failing

Since Aug 3Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/paulobunga/parkman-schema)[ Packagist](https://packagist.org/packages/paulobunga/parkman-schema)[ Docs](https://github.com/paulobunga/parkman-schema)[ RSS](/packages/paulobunga-parkman-schema/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

Parkman Schema: Prisma to Laravel Migration Generator
=====================================================

[](#parkman-schema-prisma-to-laravel-migration-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9faed2ef1cce0e031d6be3513dee2790e7109ebfc666a1f4294df6d0f8c8c0a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061756c6f62756e67612f7061726b6d616e2d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/paulobunga/parkman-schema)[![Total Downloads](https://camo.githubusercontent.com/6e3b2bb5661fa58fd09af9b3c6e8aaec5c65fefb0a788c7beba6785f7a6c8cad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7061756c6f62756e67612f7061726b6d616e2d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/paulobunga/parkman-schema)[![GitHub Actions](https://github.com/paulobunga/parkman-schema/actions/workflows/main.yml/badge.svg)](https://github.com/paulobunga/parkman-schema/actions/workflows/main.yml/badge.svg)

Parkman Schema is a powerful Laravel package that generates Laravel migrations and models from Prisma schema files. It simplifies the process of transitioning from Prisma to Laravel by automatically creating the necessary database structure and Eloquent models.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require paulobunga/parkman-schema
```

Usage
-----

[](#usage)

### Generate Migrations

[](#generate-migrations)

To generate Laravel migrations from your Prisma schema:

```
use Paulobunga\ParkmanSchema\Parkman;

$parkman = new Parkman();
$parkman->setSchema(file_get_contents('path/to/your/schema.prisma'));
$parkman->generateMigrations();
```

This will create migration files in your Laravel project's `database/migrations` directory.

### Generate Models

[](#generate-models)

To generate Eloquent models from your Prisma schema:

```
use Paulobunga\ParkmanSchema\Parkman;

$parkman = new Parkman();
$parkman->setSchema(file_get_contents('path/to/your/schema.prisma'));
$parkman->generateModels();
```

This will create model files in your Laravel project's `app/Models` directory.

### Using Artisan Commands

[](#using-artisan-commands)

The package also provides Artisan commands for easy use:

```
# Generate everything
php artisan parkman:generate path/to/your/schema.prisma --all

# Generate specific components (migrations are generated by default if no flags)
php artisan parkman:generate path/to/your/schema.prisma --models --controllers

# Individual commands (legacy)
php artisan parkman:generate-migrations path/to/your/schema.prisma
php artisan parkman:generate-models path/to/your/schema.prisma
```

### Customizing Stubs

[](#customizing-stubs)

You can publish the stub files to customize the generated migrations and models:

```
php artisan vendor:publish --provider="Paulobunga\ParkmanSchema\ParkmanSchemaServiceProvider" --tag="stubs"
```

This will copy the stub files to `resources/stubs/vendor/parkman-schema` in your Laravel project, where you can modify them to fit your needs.

Features
--------

[](#features)

- Generates Laravel migrations from Prisma schema
- Creates Eloquent models with relationships
- Supports table creation, modification, and deletion
- Handles column additions, removals, and renames
- Manages foreign key constraints
- Automatically reorders migrations based on dependencies

Testing
-------

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Paul Obunga](https://github.com/paulobunga)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance56

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 77.8% 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 ~0 days

Total

2

Last Release

699d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/176e994b0297d64b007e2996378c3dc758a69489768eb11a46359c2c8415b454?d=identicon)[paulobunga.one](/maintainers/paulobunga.one)

---

Top Contributors

[![paulobunga](https://avatars.githubusercontent.com/u/10288731?v=4)](https://github.com/paulobunga "paulobunga (7 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (2 commits)")

---

Tags

paulobungaparkman-schema

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/paulobunga-parkman-schema/health.svg)

```
[![Health](https://phpackages.com/badges/paulobunga-parkman-schema/health.svg)](https://phpackages.com/packages/paulobunga-parkman-schema)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.5k](/packages/illuminate-database)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M94](/packages/mongodb-laravel-mongodb)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M1](/packages/glushkovds-phpclickhouse-laravel)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)[laravel-liberu/laravel-gedcom

A package that converts gedcom files to Eloquent models

782.5k1](/packages/laravel-liberu-laravel-gedcom)

PHPackages © 2026

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