An outline of work to change to Oracle database - v22-appfactory/appfactory-wiki GitHub Wiki

This page will serve as the rough outline to the plan for changing databases.

  1. Decide on the structure of the data in the Oracle database, whether it is using Packages to modularize the code or just loosely adding functions and procedures. All tables will stay the same as much as possible. The biggest thing here will be deciding on how to structure the app data and the metadata which are currently separated as two different schemas in Postgres.

  2. Copy all tables and data from Postgres into Oracle.

  3. The structure of the services project can be kept the same and keep the controllers that are currently being used. The models will no longer be used and can be deleted. Starting in any of the controllers, replace every usage of Sequelize with Knex. If the Sequelize query uses a stored function or procedure, convert it into PL/SQL and add it to the Oracle database. If needed, refactor the controllers methods.

  4. Repeat this process until all Sequelize calls have been removed and all stored functions and procedures have been converted to PL/SQL. There are over 70 stored database functions and 20 controllers, as well as the helper modules.

  5. Create new scripts that will load and unload test data that is used in the unit tests.

  6. If needed, make changes in the unit tests until they are correct and working.