node-pg-migrate
Advanced tools
Comparing version 2.10.1 to 2.11.0
# Change Log | ||
## [2.11.0] (2017-09-25) | ||
### Added | ||
- Schemas operations [#119](https://github.com/theoephraim/node-pg-migrate/pull/119) | ||
## [2.10.1] (2017-09-25) | ||
@@ -4,0 +10,0 @@ |
@@ -48,2 +48,6 @@ 'use strict'; | ||
var _schemas = require('./operations/schemas'); | ||
var schemas = _interopRequireWildcard(_schemas); | ||
var _other = require('./operations/other'); | ||
@@ -131,2 +135,6 @@ | ||
this.createSchema = wrap(schemas.create); | ||
this.dropSchema = wrap(schemas.drop); | ||
this.renameSchema = wrap(schemas.rename); | ||
this.sql = wrap(other.sql); | ||
@@ -133,0 +141,0 @@ |
@@ -22,3 +22,3 @@ { | ||
], | ||
"version": "2.10.1", | ||
"version": "2.11.0", | ||
"engines": { | ||
@@ -25,0 +25,0 @@ "node": ">=4.0.0" |
@@ -592,3 +592,3 @@ # pg-migrate | ||
> Create a new function - [postgres docs](https://www.postgresql.org/docs/current/static/sql-createtrigger.html) | ||
> Create a new trigger - [postgres docs](https://www.postgresql.org/docs/current/static/sql-createtrigger.html) | ||
@@ -637,2 +637,40 @@ **Arguments:** | ||
### Schema Operations | ||
#### `pgm.createSchema( schema_name, schema_options )` | ||
> Create a new schema - [postgres docs](https://www.postgresql.org/docs/current/static/sql-createschema.html) | ||
**Arguments:** | ||
- `schema_name` _[string]_ - name of the new schema | ||
- `schema_options` _[object]_ - options: | ||
- `ifNotExists` _[boolean]_ - adds `IF NOT EXISTS` clause | ||
- `authorization` _[string]_ - alternative user to own new schema | ||
**Reverse Operation:** `dropSchema` | ||
----------------------------------------------------- | ||
#### `pgm.dropSchema( schema_name, drop_options )` | ||
> Drop a schema - [postgres docs](http://www.postgresql.org/docs/current/static/sql-dropschema.html) | ||
**Arguments:** | ||
- `schema_name` _[string]_ - name of the the schema to drop | ||
- `drop_options` _[object]_ - options: | ||
- `ifExists` _[boolean]_ - drops schema only if it exists | ||
- `cascade` _[boolean]_ - drops also dependent objects | ||
----------------------------------------------------- | ||
#### `pgm.renameSchema( old_schema_name, new_schema_name )` | ||
> Rename a schema - [postgres docs](http://www.postgresql.org/docs/current/static/sql-alterschema.html) | ||
**Arguments:** | ||
- `old_schema_name` _[string]_ - old name of the schema | ||
- `new_schema_name` _[string]_ - new name of the schema | ||
----------------------------------------------------- | ||
### Miscellaneous Operations | ||
@@ -639,0 +677,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202433
36
1291
778