Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3802

Add primary key to databasechangelog_swatch_metrics_hbi

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • True
    • subs-swatch

      For logical replication to work correctly in Postgresql, all tables need to have a primary key.  The databasechangelog_swatch_metrics_hbi table was recently added without a primary key and needs to have one added.  We've done this to other databasechangelog tables so consult the migrations directories to find examples.

      Done Criteria:

      • Primary key added to databasechangelog_swatch_metrics_hbi
      • The query 
      select tab.table_schema,   tab.table_name from information_schema.tables tab left join information_schema.table_constraints tco   on tab.table_schema = tco.table_schema   and tab.table_name = tco.table_name   and tco.constraint_type = 'PRIMARY KEY' where tab.table_type = 'BASE TABLE'   and tab.table_schema not in ('pg_catalog', 'information_schema')   and tco.constraint_name is null order by table_schema, table_name; 

      returns no rows.

              awood1@redhat.com Alex Wood
              awood1@redhat.com Alex Wood
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: