PHPackages                             genealabs/laravel-optimized-postgres - 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. genealabs/laravel-optimized-postgres

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

genealabs/laravel-optimized-postgres
====================================

optimizes field types for Postgres.

12.0.1(1y ago)58284.9k↓71.9%1MITPHPPHP ^8.2CI passing

Since Jun 21Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/mikebronner/laravel-optimized-postgres)[ Packagist](https://packagist.org/packages/genealabs/laravel-optimized-postgres)[ GitHub Sponsors](https://github.com/mikebronner)[ RSS](/packages/genealabs-laravel-optimized-postgres/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (17)Used By (0)

Optimized Postgres for Laravel
==============================

[](#optimized-postgres-for-laravel)

[![Optimized Postgres for Laravel](https://repository-images.githubusercontent.com/94943563/38eea380-f344-11e9-95f0-1cd990116866)](https://repository-images.githubusercontent.com/94943563/38eea380-f344-11e9-95f0-1cd990116866)

[![Join the chat at https://gitter.im/GeneaLabs/laravel-optimized-postgres](https://camo.githubusercontent.com/9d976094ec88c7674546c080ec6493b81a5df4c39557aa505c65ec0c5f5942f5/68747470733a2f2f6261646765732e6769747465722e696d2f47656e65614c6162732f6c61726176656c2d6f7074696d697a65642d706f7374677265732e737667)](https://gitter.im/GeneaLabs/laravel-optimized-postgres?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Impetus
-------

[](#impetus)

By default I like my Postgres database to use `text` type for all textual fields. When you run your migrations with this package installed, it will convert the following migration types to `text`: `char`, and `string`.

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

[](#installation)

### Requirements

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, 12, or 13

### Version Support

[](#version-support)

PHPLaravelSupport8.210, 11✅8.310, 11, 12, 13✅8.410, 11, 12, 13✅8.510, 11, 12, 13✅### Composer Command

[](#composer-command)

```
composer require genealabs/laravel-optimized-postgres
```

### Service Provider

[](#service-provider)

If you are on Laravel 5.5, the service provider will auto-register once the package is installed. You can skip this step. If you haven't upgraded to Laravel 5.5 yet, add the following to the `providers` array in your `\config\app.php` file:

```
GeneaLabs\LaravelOptimizedPostgres\Providers\LaravelOptimizedPostgresService::class,
```

Usage
-----

[](#usage)

When writing migrations, be sure to remove the following use statement from the top of the file:

```
use Illuminate\Support\Facades\Schema;
```

This is included in the two default migrations provided with Laravel projects, but I don't believe is added when you `make` a new migration.

Future Updates
--------------

[](#future-updates)

- possibly expand to normalize numbers, more research needed.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance66

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community8

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 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 ~240 days

Recently: every ~295 days

Total

13

Last Release

409d ago

Major Versions

0.5.1 → 10.0.02023-05-20

10.0.0 → 12.0.02025-05-19

PHP version history (4 changes)0.1.1PHP &gt;=7.0.0

0.2.0PHP &gt;=7.1.3

0.5.0PHP ^8.0

10.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4374bfc5d8583aa8c25c5080f1fcfaf09027822f47724ba6b64abc564945c80a?d=identicon)[mikebronner](/maintainers/mikebronner)

---

Top Contributors

[![mikebronner](https://avatars.githubusercontent.com/u/1791050?v=4)](https://github.com/mikebronner "mikebronner (35 commits)")

---

Tags

laravellaravel-packagemigrationspostgresql

### Embed Badge

![Health badge](/badges/genealabs-laravel-optimized-postgres/health.svg)

```
[![Health](https://phpackages.com/badges/genealabs-laravel-optimized-postgres/health.svg)](https://phpackages.com/packages/genealabs-laravel-optimized-postgres)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[glushkovds/phpclickhouse-laravel

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

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[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)
