New serial columns do not own sequences D7

Created on 26 January 2019, over 5 years ago
Updated 9 May 2024, about 2 months ago

Problem/Motivation

Follow-up from πŸ› New serial columns do not own sequences Fixed .

Proposed resolution

  1. Add OWNED BY {table}.field to the create sequence statements.
  2. Add a database update to check serial fields to make sure they exist via pg_get_serial_sequence, and if not, alter the sequence with the same statement above.
  3. Potentially refactor as a protected (or public?) function for ease-of-use?
  4. Write a test to assert that sequence ownership exists on change field.
  5. Write a test to assert that the database update works.

Remaining tasks

  • backport patch

Release notes snippet

πŸ› Bug report
Status

Active

Version

7.0 ⚰️

Component
PostgreSQL driverΒ  β†’

Last updated 5 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

Live updates comments and jobs are added and updated live.
  • PostgreSQL

    Particularly affects sites running on the PostgreSQL database.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    No longer postponed, but I think maybe we should close this as won't fix with upcoming end of life. The fix from drupal 10 can be backported to a patch if anyone needs it for LTS.

Production build 0.69.0 2024