Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005487Openbravo ERPY. DBSourceManagerpublic2008-10-09 13:272024-10-21 05:57
gforcada 
marvintm 
normalminoralways
closedduplicate 
5
 
 
Core
No
0005487: Check if database and user exists before cleaning/creating
While trying to install Openbravo 2.40 I found this:

      [sql] Executing commands
      [sql] Failed to execute: DROP DATABASE openbravo240
      [sql] org.postgresql.util.PSQLException: ERROR: database "openbravo240" does not exist
      [sql] 0 of 1 SQL statements executed successfully

I didn't have used a database named openbravo240 it displays an error while trying to clean it

      [sql] Failed to execute: DROP ROLE tad
      [sql] org.postgresql.util.PSQLException: ERROR: role "tad" cannot be dropped because some objects depend on it
      [sql] Detail: owner of database openbravo
      [sql] 1963 objects in database openbravo
      [sql] 0 of 1 SQL statements executed successfully

prepare.database:

POSTGRE.structure:
      [sql] Executing commands
      [sql] Failed to execute: CREATE ROLE tad LOGIN PASSWORD 'TAD' SUPERUSER CREATEDB CREATEROLE VALID UNTIL 'infinity'
      [sql] org.postgresql.util.PSQLException: ERROR: role "tad" already exists
      [sql] 1 of 2 SQL statements executed successfully

I have a previous installation the user already exists so revoking permissions and creating gives errors.


I mark this issue as minor since this errors doesn't block the installation, but they should be fixed.
Create a new installation with a new database name and with a previously created postgreSQL user.
Before cleaning the database it should be checked if the database exists.

And before revoking and creating the user it should be checked if the user already exists.
dbsm_migrate
duplicate of defect 0002712 closed marvintm ant install.source tries to delete role under postgresql 
Issue History
2008-10-09 13:27gforcadaNew Issue
2008-12-06 16:49jpabloaeRelationship addedduplicate of 0002712
2008-12-06 16:49jpabloaeStatusnew => closed
2008-12-06 16:49jpabloaeDuplicate ID0 => 2712
2008-12-06 16:49jpabloaeResolutionopen => duplicate
2008-12-06 16:49jpabloaeAssigned To => jpabloae
2008-12-18 12:38jpabloaeSticky IssueNo => Yes
2008-12-18 12:39jpabloaeSticky IssueYes => No
2008-12-18 12:39jpabloaeTag Attached: dbsm_migrate
2008-12-18 12:41jpabloaeProject@4@ => Openbravo ERP
2008-12-18 12:41jpabloaeCategory => Y. DBSourceManager
2008-12-18 12:43jpabloaeAssigned Tojpabloae => marvintm
2009-03-18 11:02anonymoussf_bug_id0 => 2691355
2024-10-21 05:57RonnieMReyNote Added: 0170607

Notes
(0170607)
RonnieMRey   
2024-10-21 05:57   
With rigorous testing and prevention of unnecessary errors, just like how precise mechanics in https://geometrydash-scratch.com [^] ensure a seamless gaming experience. Addressing this oversight will improve user satisfaction and streamline future installations.