PHPackages                             hiblaphp/schema-manager - 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. hiblaphp/schema-manager

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

hiblaphp/schema-manager
=======================

Schema, Migration, and Seeding Management for the Hibla Database Ecosystem

1.0.0-beta-4(1mo ago)131MITPHPPHP ^8.4CI passing

Since Jun 9Pushed 1mo agoCompare

[ Source](https://github.com/hiblaphp/schema-manager)[ Packagist](https://packagist.org/packages/hiblaphp/schema-manager)[ GitHub Sponsors](https://github.com/hiblaphp)[ GitHub Sponsors](https://github.com/rcalicdan)[ RSS](/packages/hiblaphp-schema-manager/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (10)Versions (5)Used By (1)

Hibla Schema Manager
====================

[](#hibla-schema-manager)

**Asynchronous migrations, seeders, and programmatic schema definition for PHP 8.4+.**

> **Note:** This repository provides the CLI tooling and schema builder for the [Hibla Database Ecosystem](https://github.com/hiblaphp/database). For complete, comprehensive documentation covering all CLI commands, Blueprint definitions, and Query Builder features, please visit the main **[hiblaphp/database meta-package](https://github.com/hiblaphp/database)**.

Overview
--------

[](#overview)

`hiblaphp/schema-manager` is a standalone database lifecycle management toolkit. It equips any PHP application or microframework with Laravel-style migrations, programmatic blueprints, asynchronous database seeders, and advanced production safeguards like "Safe Mode" and native Schema Dumping (Squashing).

It supports **MySQL, PostgreSQL, and SQLite** out of the box. Notably, it fully overcomes SQLite's infamous `ALTER TABLE` limitations by safely orchestrating atomic table-recreation and index-preservation within asynchronous transactions automatically.

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

[](#installation)

> This package is currently in **beta**. Before installing, ensure your `composer.json`allows beta releases:

Install the package via Composer. *(This automatically installs the required `hiblaphp/query-builder` dependency).*

```
composer require hiblaphp/schema-manager
```

Run the initialization command to auto-scaffold your configuration files:

```
# Places configs in a /config directory for instant auto-discovery
./vendor/bin/hibla-db init --dir=config
```

Quick Start
-----------

[](#quick-start)

> **Zero-Config Default:** By default, Hibla resolves to an in-memory SQLite database (`:memory:`), meaning you can start running migrations and seeders immediately without configuring a database server!

### 1. Create a Migration

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

Generate your first migration using the CLI. The command automatically detects table creation intents based on the name:

```
./vendor/bin/hibla-db make:migration create_users_table
```

This generates a safe, anonymous class in your `database/migrations` folder:

```
