rishi-ramawat/laravel-postgresql-inherit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rishi-ramawat/laravel-postgresql-inherit

最新稳定版本:v2.2

Composer 安装命令:

composer require rishi-ramawat/laravel-postgresql-inherit

包简介

Add inheritance in postgresql tables

README 文档

README

Software License

Add inheritance in postgresql tables

Installation

PHP 5.4+ and Laravel 5.2+ are required.

For Laravel Versions 5.2.* & 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

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');
});

统计信息

  • 总下载量: 26.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-02