dev-master
9999999-devLaravel package for managing postgres schemas.
MIT
The Requires
- php >=5.4.0
- illuminate/support 4.2.*
by Elton Luis Kolling
laravel postgres schemas
Wallogit.com
2017 © Pedro Peláez
Laravel package for managing postgres schemas.
With this package you can create, switch and drop postgres schemas., (*2)
Add the following to your composer.json:, (*3)
"eltonlk/laravel-pg-schemas": "dev-master"
Add to your app.php file in the services providers section., (*4)
'providers' => array(
...
'Eltonlk\LaravelPgSchemas\LaravelPgSchemasServiceProvider'
)
Assuming that you have your db configuration ready, meaning that your default connection is 'pgsql' and your pgsql credentials are setted in the usual way, you can use the next functions:, (*5)
PGSchema::create($schemaName);
if switchTo is call without arguments, it switches to the public schema (default), (*6)
PGSchema::switchTo($schemaName);
PGSchema::drop($schemaName);
PGSchema::migrate($schemaName);
You can also tell which database connection., (*7)
PGSchema::migrate($schemaName, ['--database' => 'pgsql2']);
Laravel package for managing postgres schemas.
MIT
laravel postgres schemas