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

Automatically replace old url with new url in database during change url action #2376

Open
zamentur opened this issue Apr 19, 2024 · 0 comments

Comments

@zamentur
Copy link
Member

Related to this issue: YunoHost-Apps/mobilizon_ynh#196

The problem

When we do a change url the url in database are not replaced if the packager doesn't think to do it.

In more, with new version, some field could be added or removed, so it's quite difficult to maintain this kind of script without bug and incident.

The feature request

I think it could be a nice idea to replace substring old url by new one's in all the database by default.

Thought on the implementation

I think doing a dump, sed and restore could work but some apps have db with 50GB...

So we could find a better way to do it by iterating on each text and json field to make the replace...
Maybe something like https://stackoverflow.com/a/49063440

@alexAubin alexAubin changed the title Automatically replace old url with new url during change url action Automatically replace old url with new url in database during change url action Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant