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(12mo ago)58263.4k↓37.4%1[2 PRs](https://github.com/mikebronner/laravel-optimized-postgres/pulls)MITPHPPHP ^8.2

Since Jun 21Pushed 2mo 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 1mo 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 &gt;=7.0
- Laravel &gt;=5.4

### 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

Maintenance69

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

364d 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

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)

PHPackages © 2026

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