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

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

rishi-ramawat/laravel-postgresql-inherit
========================================

Add inheritance in postgresql tables

v2.2(9y ago)627.1k—0%5[2 issues](https://github.com/rishi-ramawat/laravel-postgresql-inherit/issues)MITPHPPHP &gt;=5.4.0

Since Jul 31Pushed 5y agoCompare

[ Source](https://github.com/rishi-ramawat/laravel-postgresql-inherit)[ Packagist](https://packagist.org/packages/rishi-ramawat/laravel-postgresql-inherit)[ RSS](/packages/rishi-ramawat-laravel-postgresql-inherit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (7)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) **5.4+** and [Laravel](https://laravel.com) **5.2+** 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"
```

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

33

—

LowBetter than 75% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 74.1% 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 ~239 days

Total

5

Last Release

3346d ago

Major Versions

v1.0 → 2.02016-06-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d6832e0cc4756c5719399e43fc969dc88625ec90d3e88a2ea30590a61fa4d23?d=identicon)[rishi-ramawat](/maintainers/rishi-ramawat)

---

Top Contributors

[![ThibaudDauce](https://avatars.githubusercontent.com/u/1770543?v=4)](https://github.com/ThibaudDauce "ThibaudDauce (20 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)")

---

Tags

composer-packageinheritancelaravel-5-packagelaravel-packagepostgresqlserviceproviderlaraveldatabasepostgresmigrationsinheritancepostresql

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/rishi-ramawat-laravel-postgresql-inherit/health.svg)](https://phpackages.com/packages/rishi-ramawat-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)
