PHPackages                             simo46/laravel-postgresql-inherit - 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. simo46/laravel-postgresql-inherit

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

simo46/laravel-postgresql-inherit
=================================

Add inheritance in postgresql tables

v2.7(3y ago)07MITPHPPHP &gt;=8.0

Since Jul 31Pushed 3y agoCompare

[ Source](https://github.com/Simo46/laravel-postgresql-inherit)[ Packagist](https://packagist.org/packages/simo46/laravel-postgresql-inherit)[ RSS](/packages/simo46-laravel-postgresql-inherit/feed)WikiDiscussions master Synced today

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

PostgresqlSchema
================

[](#postgresqlschema)

[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE.md)

Add inheritance in postgresql tables

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

[](#installation)

[PHP](https://php.net) **7.2+** and [Laravel](https://laravel.com) **7.x** are required.

For Laravel Versions **5.2.**\* &amp; **5.3.**\*, run the following command to install this package via composer

```
composer require "rishi-ramawat/laravel-postgresql-inherit ~2.1.0"
```

For Laravel Versions **5.4+**, run the following command to install this package via composer

```
composer require "rishi-ramawat/laravel-postgresql-inherit ~2.2"
```

For Laravel Versions **7.x**, run the following command to install this package via composer

```
composer require "rishi-ramawat/laravel-postgresql-inherit ~2.4"
```

For Laravel Versions **8.x**, run the following command to install this package via composer

```
composer require "rishi-ramawat/laravel-postgresql-inherit ~2.6"
```

Once PostgreSQL Schema is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` array.

```
RishiRamawat\PostgresSchema\PostgresqlSchemaServiceProvider::class,
```

Usage
-----

[](#usage)

In migration file when using a postgresql database, you can use the new method `inherits()`:

```
Schema::create('cities', function(Blueprint $table) {
  $table->increments('id');
  $table->string('name');
  $table->double('population');
  $table->integer('altitude')->comment('In Feet');
});

Schema::create('capitals', function(Blueprint $table) {
    $table->string('state');
    // Make capitals table inherits all the columns of its parent table, cities
    $table->inherits('cities');
});
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 58.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 ~357 days

Recently: every ~474 days

Total

9

Last Release

1445d ago

Major Versions

v1.0 → 2.02016-06-16

PHP version history (4 changes)v1.0PHP &gt;=5.4.0

v2.4PHP &gt;=7.2.0

v2.5PHP &gt;=7.3.0

v2.7PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9487a2d422cb4ffa1fedc4d54c9642a63bda05e7401c98811c9b8ff6528669da?d=identicon)[simone.c](/maintainers/simone.c)

---

Top Contributors

[![ThibaudDauce](https://avatars.githubusercontent.com/u/1770543?v=4)](https://github.com/ThibaudDauce "ThibaudDauce (20 commits)")[![itigosystems](https://avatars.githubusercontent.com/u/17855078?v=4)](https://github.com/itigosystems "itigosystems (4 commits)")[![rishi-ramawat](https://avatars.githubusercontent.com/u/13311878?v=4)](https://github.com/rishi-ramawat "rishi-ramawat (4 commits)")[![jumper423](https://avatars.githubusercontent.com/u/12099016?v=4)](https://github.com/jumper423 "jumper423 (3 commits)")[![simone-cavanna-t4u](https://avatars.githubusercontent.com/u/105913930?v=4)](https://github.com/simone-cavanna-t4u "simone-cavanna-t4u (2 commits)")[![Simo46](https://avatars.githubusercontent.com/u/22730565?v=4)](https://github.com/Simo46 "Simo46 (1 commits)")

---

Tags

laraveldatabasepostgresmigrationsinheritancepostresql

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/simo46-laravel-postgresql-inherit/health.svg)

```
[![Health](https://phpackages.com/badges/simo46-laravel-postgresql-inherit/health.svg)](https://phpackages.com/packages/simo46-laravel-postgresql-inherit)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[orptech/laravel-migration-partition

Laravel extensions that extends Illuminate to enable partitioned table creation within Laravel migrations.

3426.7k](/packages/orptech-laravel-migration-partition)[dragon-code/laravel-data-dumper

Adding data from certain tables when executing the `php artisan schema:dump` console command

3418.6k](/packages/dragon-code-laravel-data-dumper)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)[aimeos/laravel-nestedset

Nested Set Model for Laravel

292.0k2](/packages/aimeos-laravel-nestedset)

PHPackages © 2026

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