Skip to content

Remove schema compatibility fixes for PG 9.6

Andreas Brandl requested to merge ab/schema-cleanup into master

What does this MR do?

This removes compatibility fixes we introduced to support PG 9.6, while gdk was on PG11. Now that we can safely assume >= PG11 everywhere (also in CI), we can drop those fixes:

  1. Explicit plpgsql extension - we don't need to be explicit here anymore, this is present by default and pg_dump (from >=PG11) doesn't explicitly dump that anymore either.
  2. CREATE SEQUENCE ... as integer - this wasn't compatible syntax-wise with PG9.6.

(1) gets rid of this warning when resetting the gdk database:

psql:/home/abrandl-gl/workspace/gdk/gitlab/db/structure.sql:3: NOTICE:  extension "plpgsql" already exists, skipping

For (2) - I'm surprised as datatype doesn't show up in db/structure.sql after running rake db:structure:dump with the adjusted SchemaCleaner. Not sure exactly why that is - perhaps meanwhile something changed in Rails.

For reviewers: Can you please confirm a rake db:structure:dump doesn't produce changes in your local db/structure.sql? Specifically not for the sequences?

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading