Projects:Installation in existing DB schema/Technical Documentation
Contents |
Introduction
This document explains technical issues of the Installation in existing database schema project.
Overview
Allowing installing and using Openbravo ERP in an existing schema, and without specifying the superuser password requires modifying 3 different Openbravo ERP components:
- Openbravo ERP: must not run any operation requiring superuser permissions.
- Installer: add a new option to select and existing database.
- Ant tasks: adequate the build scripts to respect this new option.
Technical design
Openbravo ERP
Problem
Currently some operations require superuser permissions in PostgreSQL, such a the Delete client process.
Solution
To be discussed with the platform team.
Ant tasks
Problem
The ant create.database automatically drops and creates a new user in Oracle and a new role and database in PostgreSQL.
Solution
Split it into 2 tasks:
- ant init.database: create the database user in Oracle and the role and database in PostgreSQL.
- ant create.database: populate the specified database.
Also, the database drop should be deleted. Optionally, this could be enabled with a special flag in Openbravo.properties called development.mode.
A complete list of subtasks requiring a review:
- clean.database.${rdbms}.
- ${rdbms}.structure.