Create a new view - postgres docs
Arguments:
viewName
[Name] - name of the new viewoptions
[object] - options:temporary
[boolean] - default falsereplace
[boolean] - default falserecursive
[boolean] - default falsecolumns
[string or array] - use if you want to name columns differently then inferred from definitioncheckOption
[string] -CASCADED
orLOCAL
definition
[string] - SQL of SELECT statement
Reverse Operation: dropView
Drop a view - postgres docs
Arguments:
viewName
[Name] - name of the view to deleteoptions
[object] - options:ifExists
[boolean] - drops view only if it existscascade
[boolean] - drops also dependent objects
Alter a view - postgres docs
Arguments:
viewName
[Name] - name of the view to alteroptions
[object] - options:checkOption
[string] -CASCADED
,LOCAL
ornull
to drop
Alter a view column - postgres docs
Arguments:
viewName
[Name] - name of the view to altercolumnName
[string] - name of the column to alteroptions
[object] - options:default
[string] - default value of column
Rename a view - postgres docs
Arguments: