Clean up .env variables, migrations and group types
After the 2.0.0 release, we have a lot of .env variables that are no longer in use, and should be removed from docker-compose files, config code, .env.example
, and documentation.
We also should rename the current group types 'aperture', 'colab', 'elife' and 'ncrc' to (respectively) 'journal', 'prc', 'single_form' and ??.
By removing the .env variables we will prevent some older migrations from running, so we should also take the opportunity to replace all pre-2.0 migrations with a single, simplified migration for each table. These simplified migrations should each be written so as to not replace existing data, or else should use an existing migration name so they won't get rerun on existing installations. E.g. there are currently 20 migrations for the manuscripts
table, and these could be simplified to a single migration named 1581450834-manuscript.sql
(the same name/timestamp as the earliest of the current migrations).
Tables (and Objection.js model schemas) in some cases retain columns that aren't used, either to support old migrations or to allow rollback, and there are some redundant tables such as files_old
. All of this could be cleaned up.
CHANGES.md must include instructions that in order to upgrade from 1.x to 2.x you must upgrade to 2.0.0 as an intermediate step.