Skip to content

Capturing ignored postgres Materialized Views #667

Description

@duckboy81

Issue: Materialized Views are ignored when using --views

Solution: Could either add another option flag --materializedViews OR update the existing showViewsQuery for postgres:

showViewsQuery: (schemaName?: string) => {

Possible inject:

    return `SELECT table_name, table_schema
             FROM information_schema.tables
            WHERE table_type = 'VIEW'
            AND table_schema NOT IN ('pg_catalog', 'information_schema')
              ${makeCondition("table_schema", schemaName)}

            UNION ALL

            SELECT matviewname AS table_name, schemaname AS table_schema
            FROM pg_matviews
            WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
              ${makeCondition("schemaname", schemaName)}`;

EDIT: Nevermind, this fix will not work due to the way sequelize-auto looks for information about the table's construct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions