Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.12 KB

schemas.md

File metadata and controls

38 lines (23 loc) · 1.12 KB

Schema Operations

pgm.createSchema( schema_name, schema_options )

Create a new schema - postgres docs

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

Arguments:

  • schema_name [string] - name of 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

Arguments:

  • old_schema_name [string] - old name of the schema
  • new_schema_name [string] - new name of the schema