Skip to content

Change prerequisites to have integer scale

Otto Visser requested to merge backend_prerequisites_sql into dev

In this merge request, the prerequisites in the database are changed to not be on a boolean scale, but instead on a [0,1,2] scale. The backend and rest API have been adjusted accordingly.

In order to update the existing database, please use the following script:

ALTER TABLE Prerequisites MODIFY COLUMN ta_training int NOT NULL DEFAULT 0,
  MODIFY COLUMN english_test int NOT NULL DEFAULT 0,
  ADD COLUMN accepted int NOT NULL DEFAULT 1;

UPDATE Prerequisites SET is_accepted = 1 WHERE is_accepted = 0;

ALTER TABLE Prerequisites DROP COLUMN is_accepted;
Edited by Otto Visser

Merge request reports

Loading