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

Add primary keys to all tables in the subscription watch schema

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • True

      PostgreSQL logical replication doesn't allow UPDATE or DELETE operations on tables that don't have a primary key.  Most of our tables have primary keys by necessity, but our join tables and the Liquibase tables do not.  We need to add primary keys to those tables.

      Using this query:

      • contract_metrics
      • databasechangelog
      • databasechangelog_swatch_contracts
      • sku_child_sku
      • sku_oid
      • sku_product_tag

      PostgreSQL logical replication doesn't allow UPDATE or DELETE operations on tables that don't have a primary key.  Most of our tables have primary keys by necessity, but our join tables and the Liquibase tables do not.  We need to add primary keys to those tables.

      The databasechangelog table doesn't have a primary key, but according to the Liquibase developer "You can always manually add a primary key if you like; Liquibase will not care"

      Steps:

       

      Done Criteria

      • Stage is not broken when this is implemented on Postgres 12
      • Ephemeral is not broken when this is implemented on Postgres 12

              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: