thibaud-dauce / postgresql-schema
该软件包已被弃用且不再维护。未建议替代包。
在PostgreSQL表中添加继承
v1.0
2014-07-31 18:27 UTC
Requires
- php: >=5.4.0
- illuminate/database: 4.2.*
- illuminate/support: 4.2.*
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2022-02-01 12:37:42 UTC
README
在PostgreSQL表中添加继承
安装
需要PHP 5.4+ 和 Laravel 4.2+。
要获取PostgreSQL Schema的最新版本,只需在您的composer.json
文件中包含以下内容:"thibaud-dauce/postgresql-schema": "1.*"
。然后您需要运行composer install
或composer update
来下载它并更新自动加载器。
PostgreSQL Schema安装完成后,您需要注册服务提供者。打开app/config/app.php
文件,并在providers
键中添加以下内容。
'ThibaudDauce\PostgresqlSchema\PostgresqlSchemaServiceProvider'
使用方法
当在迁移文件中使用PostgreSQL数据库时,您可以使用新的addInheritedTable
方法。
<?php Schema::create('test', function(Blueprint $table) { $table->increments('id'); $table->addInheritedTable('users'); });