Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store image URLs without server name. #9

Open
kmuw opened this issue Aug 29, 2023 · 1 comment
Open

Store image URLs without server name. #9

kmuw opened this issue Aug 29, 2023 · 1 comment

Comments

@kmuw
Copy link

kmuw commented Aug 29, 2023

When migrating a server or changing the hostname, the contents of the postgis database needs a lot of rewriting, e.g.

table public.command (possibly more tables are affected)

{"preview":"http://cytomine.local/api/abstractimage/123/thumb.png?maxSize=1024","thumb":"http://cytomine.local/api/abstractimage/123/thumb.png?maxSize=512","m
acroURL":"http://cytomine.local/ ...

Possible solution:

  • save only a global reference to the target host e.g. http://cytomine.local in another table
  • provide a migration tool (I did this with pg_dump in plaintext & sed, followed by re-importing the whole database)
@jgillardcytomine
Copy link
Contributor

Dear @kmuw thanks for the feedback.
It is indeed a tight coupling dependency that slows many deployments workflows. Having static full URLs in the database is something that should be avoided.
That change implies a deep refactoring, I'll keep commenting this issue if any step towards it is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants