kernelci/kcidb

Remove dataset/database version

Closed this issue · 1 comments

Now that we have (basic) online schema migration/upgrade implemented for databases, get rid of the previous mechanism for managing schema upgrades: dataset/database versions in their names. Start from the version argument to cloud, and work your way down the stack.

As the final step, when the code change is ready, something like the following will need to be done before deploying, for each project and namespace:

  1. Withdraw all Cloud Functions (at least the ones accessing the database).
  2. Rename the PostgreSQL database to not have the _<version> suffix.
  3. Copy the BigQuery dataset to a new one without the _<version> suffix.
  4. Deploy the change (this will deploy new code to the Cloud Functions).
  5. Check everything is working and the data is intact.
  6. Remove the original BigQuery dataset.

This is good to have before making the BigQuery dataset public, so we don't have to notify people afterwards.