Book a Demo

Author Topic: Issue with upgrading DBMS (PostgreSQL) schema for Enterprise Architect repo  (Read 5014 times)

Vlada47

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Hello, I am in the process of upgrading DBMS schema in a PostgreSQL database of EA repository from the version 851 to version 1558 with scripts from here - https://www.sparxsystems.com/resources/repositories/index.html. I downloaded the necessary scripts EASchema_Alter851to1220_PostgreSQL.sql and EASchema_Alter1220to1558_PostgreSQL.sql, however, when I ran the first script I got an error:

psql:EASchema_Alter851to1220_PostgreSQL.sql:627: ERROR:  relation "public.t_files" does not exist
psql:EASchema_Alter851to1220_PostgreSQL.sql:630: ERROR:  relation "public.t_files" does not exist


From what I can tell, it's from this section of the script:

CREATE INDEX ix_files_appliesto ON t_files (appliesto ASC)
;
CREATE INDEX ix_files_appliestoname ON t_files (appliesto ASC,name ASC)
;
CREATE INDEX ix_files_appliestonamesize ON public.t_files (appliesto ASC,name ASC,filesize ASC)
;
CREATE INDEX ix_files_appliestonamedatesize ON public.t_files (appliesto ASC,name ASC,filedate
ASC,filesize ASC)
;
CREATE INDEX ix_files_category ON t_files (category ASC)
;
CREATE INDEX ix_files_filesize ON t_files (filesize ASC)
;
CREATE INDEX ix_files_name ON t_files (name ASC)
;


Here I can see that two CREATE INDEX commands are referencing the "t_files" table with "public" schema, unlike the other commands. The problem is that I have all EA repository objects in a custom schema called "ea_repo" and I am running the script as user called "ea_repo", so all other commands end successfully.

My question is - can I safely assume these two CREATE INDEX commands are just errors in the script and I can solve the situation by removing the "public" schema reference for any further runs, or is there some specific reason the "public" schema reference is here and I should alter something in my database?

Thank you for any help.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
All I  can say is that t_files does not seem to be used at all in EA. Probably some kind of legacy.

q.

pvickers

  • EA User
  • **
  • Posts: 44
  • Karma: +7/-0
    • View Profile
If you use the model "Chat" features, you will find the notes are stored in the t_files table.

This is the case using Sparx EA version 15.2 at least...

Regards,
Perry

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Perry,
thanks for the update. Of course, when I wrote my Inside book, I did not chat to myself xD

q.