Skip to content

Rename project_versions table to project_commits - #47085

Merged
maureensturgeon merged 1 commit into
stagingfrom
maureen/LP-2415-rename-project-versions-tbl
Jul 11, 2022
Merged

Rename project_versions table to project_commits#47085
maureensturgeon merged 1 commit into
stagingfrom
maureen/LP-2415-rename-project-versions-tbl

Conversation

@maureensturgeon

@maureensturgeon maureensturgeon commented Jul 5, 2022

Copy link
Copy Markdown
Contributor

NOTE for future table renames: dashboard table renames will cause shared tests in the test environment to fail due to the new table not existing in dashboard_test1. We use dashboard_test1 for pegasus/lib etc tests so that it doesn’t muddy up dashboard_test which is used for UI tests. However, dashboard_test1 (through dashboard_test16) are setup by the step that runs dashboard unit tests. In order for dashboard_test1-16 to be migrated, dashboard tests need to be manually run in test first. Once dashboard tests have been manually run in the test env, restart the test build.

More context in #47038

Rename db table project_versions to project_commits and update references to the table.

The rename migration also includes the creation of a db view with the old table name so that in the time between when the migration is run and the app code deploys the code referencing the old table name will still return data

Links

Testing

  • Tested that committing and viewing commits works after the migration
  • Tested that after running the migration, before updating the code references, committing and loading commits still worked

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@maureensturgeon maureensturgeon changed the title Rename project_versions table to project_commits, update references Rename project_versions table to project_commits Jul 5, 2022
@maureensturgeon
maureensturgeon marked this pull request as ready for review July 5, 2022 20:29
@maureensturgeon
maureensturgeon requested a review from a team as a code owner July 5, 2022 20:29
@maureensturgeon
maureensturgeon requested review from a team July 5, 2022 20:29
@sureshc

sureshc commented Jul 6, 2022

Copy link
Copy Markdown
Contributor

Is usage low enough that we could carry out a standard Rails migration? There would be a ~40 minute period of time between when the migration executions on production-daemon and when the new web application servers launch that the web servers would be querying the old table name. Perhaps that’s acceptable at this time of the year.

@sureshc

sureshc commented Jul 6, 2022

Copy link
Copy Markdown
Contributor

Is usage low enough that we could carry out a standard Rails migration? There would be a ~40 minute period of time between when the migration executions on production-daemon and when the new web application servers launch that the web servers would be querying the old table name. Perhaps that’s acceptable at this time of the year.

I retract my above comment! Provisioning a View to provide backwards compatibility for ~40 minutes does not add much complexity and guarantees an uninterrupted experience for students!

@maureensturgeon
maureensturgeon merged commit 711bb10 into staging Jul 11, 2022
@maureensturgeon
maureensturgeon deleted the maureen/LP-2415-rename-project-versions-tbl branch July 11, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants