Skip to content

Capturing ignored postgres Materialized Views #667

Open
@duckboy81

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions