Skip to content

EP Review Changes to Database Schema

Robert Sheridan edited this page Nov 29, 2016 · 1 revision

#Process : Required review and approval of changes to database schema Date Accepted: 2016-11-23

Abstract: Before any code which would result in a change to the database schema is merged to one of our managed branches (master, rc, hotfix), a design proposal must first be reviewed and approved. When approved, the new schema will be assigned a permanent and constant DB_SCHEMA_VERSION tag which will not be used again for any future changes to the database schema.

Summary points:

  • developers are encouraged to propose change to the database schema early in the development process
  • we will stay with the current version numbering pattern (#.#.#) = (major.minor.point)
  • the assignment of numbers to database schema updates will naturally diverge from the cbioportal codebase version number
  • because of the logic in migrate_db.py changes to hotfix will be assigned increments in the point version component and rc will increment the minor version component (compared to master). Changes which result in a database schema which is not compatible with previous versions of the portal codebase will increment the major version number. Changes which increment the major version number will not be merged to hotfix (unless they are already merged to master)
  • In all branches, migration.sql is maintained in increasing numerical order.
  • If a merge (hotfix to rc, hotfix to master, rc to master) involves a version number change in which the merge source branch differs from the merge destination branch in both minor and point (or major and point) version numbers, the minor version number component will be incremented again creating a new version for the result of merge and conflict resolution (keeping the full history of both previous branches in migration.sql)

version transition image