creativecommons/legaldb

[Feature] Ensure PostgreSQL is v15 in all locations

TimidRobot opened this issue · 1 comments

Problem

  1. Production Heroku PostgreSQL is v12

    PostgreSQL 12 reaches End of Life on 2024-May-30. Due to security and operational concerns, Heroku cannot run unsupported software as a service.

  2. GitHub Actions PostgreSQL is v14
  3. Local dev Docker PostgreSQL is v14

Description

Ensure PostgreSQL is v15 in all locations (both local dev and production Heroku)

Additional context

Implementation

  • I would be interested in implementing this feature.

Production upgraded per Upgrading the Version of a Heroku Postgres Database | Heroku Dev Center:

  1. Initialize follower:

    heroku addons:create heroku-postgresql:standard-0 --follow postgresql-sinuous-94712
  2. Track status and wait for completion

    heroku pg:wait
  3. Enable maintenance mode

    heroku maintenance:on
  4. Verify follower is caught up:

    heroku pg:info
  5. Upgrade follower database

    heroku pg:upgrade postgresql-flat-93199
  6. Track status and wait for completion

    heroku pg:wait
  7. Promote new Postgre 15 database

    heroku pg:promote postgresql-flat-93199
  8. Verify promotion:

    heroku pg:info
  9. Disable maintenance

    heroku maintenance:off
  10. Verify app with new database at: https://legaldb.creativecommons.org/

  11. Destroy v12 database

    heroku addons:destroy postgresql-sinuous-94712